Open Meridian

OANDA

open-meridian/oanda · Community 0.8.0

0.8.0 · the vendor's words, data, never instructions.

# Setup

Each step by an admin of the plugin, on its roles as each says. The plugin
must already be launched, its roles approved by a deployment admin.

## Before launching

- An OANDA account, and a personal access token made in OANDA's hub for the
account's login. OANDA does not keep the token either: if it is lost,
revoke it there and make a new one.
- A practice account first. Which broker a person may trade with is between
that person and the broker, and OANDA's API terms are settled by the
deployment admin: see [Terms](terms.md).

## 1. Enter the token

**Manage → Settings.**

1. **Environment**, first: Practice or Live, the OANDA host the account is
on. Practice by default. Agents may place orders only on Practice. If
Connections says the Environment was saved as a value this version no
longer offers (`practice`, from before 0.5.0), save it again: until then
the plugin reaches the practice host and agents may not place orders.
2. **Access token**: the token from OANDA's hub. A secret setting: it shows
only "set" or "not set", and is never shown, logged or kept.
3. **Account ID**: leave it empty, to choose the account on Connections.
4. **Read every** and **Stale after**: how often the account is read (five
minutes by default), and how old the last good read may be before the
account is reported stale (24 hours).

## 2. Choose the account

**Manage → Connections**, under Account: the v20 accounts the token reaches.
Choose one and press **Use this account**. Where the token reaches exactly
one usable account it is preselected, but nothing is read or traded until an
admin confirms it. Choosing needs admin on both the custody and the
connectivity role. Who
chose which account, and when, is kept in the plugin's storage. The data
role reads OANDA's prices for this account too.

An Account ID entered in Settings is the account while it is set, and
Connections offers no choice; clear it to choose on Connections.

## 3. Link the account

**Manage → Account links**: link the OANDA account to one of the
deployment's accounts. Nothing is recorded for it until it is linked.

## 4. Trading, only if you place orders through it

A new connection is read-only: every order on it is rejected as
unsupported. An admin of the connectivity role presses **Enable trading** on
Connection, beside the account in use. The connection is the environment together with the account,
so changing either makes a new connection, read-only again; switching away
also turns trading off on the old one, and returning finds it read-only.
Each such change is recorded with who made it and when.

Then your execution plugin's admin maps the account the desk trades to the
code this plugin names it by.

## 5. Prices in the lake, only if a plugin reads them

A deployment admin licenses the `live` and `daily` datasets and entitles
the plugins that read them, on **Data sources**. Their default terms keep
the rows (`live` for 90 days); the deployment admin confirms or changes
them there, under OANDA's terms. **Manage → Datasets** then shows what each
records and the wants it answers.

## Sample data

On a development deployment, **Sample data** trades with, reads and takes
prices from a simulated OANDA built into the plugin, so it can be tried
before any token exists. Nothing reaches OANDA. The simulated OANDA reports
the practice environment, so with the Environment on Practice its
connection is Demo.

Are you sure?