Algo Trader Tools
v1.0.0Manage MetaTrader 4 and 5 trade copying: accounts, copiers, followers and their copy rules.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_accounts List accounts
Your connected MetaTrader accounts, newest first.
| Parameter | Type | Description |
|---|---|---|
cursor | string | The `next_cursor` of the previous page. Leave it out for the first page. |
limit | integer | Items per page, 1 to 100 (default 50). |
get_account Retrieve an account
The account with its status, role and freshest figures.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | The account's ID. |
disconnect_account Disconnect an account
Stops the account's terminal and deletes the account with its stored history. An account a copier uses is refused with `account_in_use`: delete the copier or remove the follower first.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | The account's ID. |
use_dedicated_ip Move an account onto a dedicated IP
Routes the account's terminal through one of your dedicated IPs, or back to a direct connection with `null`. No password is needed: the terminal restarts on the new route with the one it has, and answers with `status: connecting` until it's back. Counts against the connect limit.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | The account's ID. |
dedicated_ip * | integer | null | The ID of one of your dedicated IPs; null for a direct connection. |
list_dedicated_ips List dedicated IPs
Your dedicated IPs and the accounts on each. Buy them in the app, under Billing; Desk includes one.
list_copiers List copiers
Your copiers with their followers, oldest first.
| Parameter | Type | Description |
|---|---|---|
cursor | string | The `next_cursor` of the previous page. Leave it out for the first page. |
limit | integer | Items per page, 1 to 100 (default 50). |
create_copier Create a copier
A copier copies one master account to its followers. It starts without any: add them next. Masters must be hedging accounts (all of MT4, and MT5 hedging accounts). Retrying a failed request can create a second copier; list your copiers first.
| Parameter | Type | Description |
|---|---|---|
master_id * | string | One of your connected accounts that doesn't follow anything. Investor-password accounts can be masters. Several copiers can share a master. |
name * | string | A name to tell it apart. |
is_active | boolean | Start paused with `false`. |
get_copier Retrieve a copier
The copier with its master, its followers and what the engine reports about each.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
update_copier Update a copier
Rename, pause or resume a copier. Pausing stops new copies on every follower; copies already open stay and still follow the master's closes and changes. Resuming copies only what the master opens from then on.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
is_active | boolean | Pause every follower with `false`. Copies already open stay and still follow the master's closes and changes. Resuming copies only what the master opens from then on. |
name | string |
delete_copier Delete a copier
Deletes the copier, its followers and their activity log. The accounts stay connected. With `close_positions=true` every copy is closed first.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
close_positions | boolean | `true` pauses copying and closes every copy at market before deleting; if a terminal refuses, nothing is deleted (`close_failed`). `false` leaves the copies open on the followers as ordinary positions… |
list_followers List followers
The copier's followers, oldest first.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
cursor | string | The `next_cursor` of the previous page. Leave it out for the first page. |
limit | integer | Items per page, 1 to 100 (default 50). |
add_follower Add a follower
Attaches one of your accounts to the copier with its own rules; leave a rule out for its default. Copying starts at once (unless `is_active` is false), with what the master opens from then on. Retrying is safe: a second attempt fails with `already_following`.
get_follower Retrieve a follower
The follower's rules and what the engine reports about it.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
follower_id * | string | The follower's ID (not its account's). |
update_follower Update a follower
Change rules, or pause and resume this follower. Changes apply to what's copied from then on.
remove_follower Remove a follower
Detaches the account from the copier and deletes its activity log. The account stays connected. With `close_positions=true` its copies are closed first.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
follower_id * | string | The follower's ID (not its account's). |
close_positions | boolean | `true` pauses copying and closes every copy at market before deleting; if a terminal refuses, nothing is deleted (`close_failed`). `false` leaves the copies open on the followers as ordinary positions… |
list_copy_events List copy events
What the copier engine did, or decided not to do, on the copier's followers, newest first. Events are kept for 90 days.
| Parameter | Type | Description |
|---|---|---|
copier_id * | string | The copier's ID. |
cursor | string | The `next_cursor` of the previous page. Leave it out for the first page. |
follower_id | string | Only this follower's events. |
limit | integer | Items per page, 1 to 100 (default 50). |