Partner API

MT links

Record which MT4 / MT5 login on which server belongs to a user. Link only - execution stays on your MT server.

POST/api/external/v1/users/{external_id}/mt_links

#Link an existing MT4 / MT5 login to the user

Auth X-Api-Key mt:link Partner API

Scope mt:link. Records that the login on the named server belongs to this user (the MT side itself is not touched). One login per server belongs to one user (409 already_linked); at most 20 links per user.

Path parameters

external_id string required

Your client id (1-191 letters, digits, . _ @ : + -). Stored on the client as external_user_id.

Request body · application/json

platform enum required
mt4mt5
server string required

The MT server name as the broker calls it. 0-120 characters.

login string required

0-64 characters.

label string optional

0-64 characters.

trading_account_id integer optional

One of the user's trading accounts (optional).

Responses

201

The link.

403

insufficient_scope, ip_not_allowed, api_disabled, company_inactive, brand_disabled, sso_disabled, trending_disabled (trading on behalf also: brand_inactive, client_inactive, trading_inactive, trading_denied).

409

email_taken, brand_fixed, limit_reached, already_linked, no_brand, no_app_domain.

422

invalid_request with details.errors = { field: reason }.

curl -X POST "https://api.your-brand.com/api/external/v1/users/cust_10042/mt_links" \
  -H "X-Api-Key: $OCTOLIT_PARTNER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "platform": "mt5",
  "server": "Broker-Live",
  "login": "string",
  "label": "string",
  "trading_account_id": 55
}'
Response 201
{
  "mt_link": {
    "id": 1042,
    "platform": "mt5",
    "server": "Broker-Live",
    "login": "string",
    "label": "string",
    "trading_account_id": 55,
    "status": "open",
    "created_at": "2026-11-11T09:30:00.000000Z",
    "updated_at": "2026-11-11T09:31:12.000000Z"
  }
}
DELETE/api/external/v1/users/{external_id}/mt_links/{link_id}

#Remove an MT link

Auth X-Api-Key Partner API

Path parameters

external_id string required

Your client id (1-191 letters, digits, . _ @ : + -). Stored on the client as external_user_id.

Responses

200

Removed.

404

not_found / user_not_found / account_not_found / symbol_not_found.

curl -X DELETE "https://api.your-brand.com/api/external/v1/users/cust_10042/mt_links/42" \
  -H "X-Api-Key: $OCTOLIT_PARTNER_KEY"
Response 200
{
  "unlinked": true
}