Partner API · v1.2

Partner API

The company-level API for brokers, white-labels and introducing partners. Your backend manages clients by its own ids, opens accounts, books money, signs users in and reads what they trade.

34 operations17 webhook eventsOpenAPI 3.1Download spec

#Basics

Base URLhttps://api.your-brand.com/api/external/v1 (SSO login: /api/sso/brands/{brand_id}/login)
AuthX-Api-Key: <key> or Authorization: Bearer <key>. Keys are created in the CRM, Settings › API & Webhooks. Details →
Rate limitCompany-wide requests per minute (default 120); 429 rate_limited + Retry-After. Details →
Errors{ "error": { "code", "message", "details" } }. All codes →
Live documentsGET /openapi.yaml and GET /guide.txt on your own host always match the version you run.
First call: GET /me
curl "https://api.your-brand.com/api/external/v1/me" \
  -H "X-Api-Key: $OCTOLIT_PARTNER_KEY"

#All operations

#Account

Check the key you are calling with and fetch the live copies of this documentation from your own CRM host.

#Clients

Read every client of your company, page by change time. email / phone come masked unless the key carries clients:read_email / clients:read_phone.

#Users

Create or update clients by your client id (external_id), read them back and pause / resume their trading. The same external_id always maps to the same client in your company.

#Single sign-on

Two directions: your backend asks for a one-time login link (POST …/sso), or your platform signs a short JWT and sends the browser to /api/sso/brands/{brand_id}/login. Sessions can be listed and ended.

#Trading accounts

Open live or demo accounts under the brand's rules and read accounts, balance and positions of a user.

#Money

Book a deposit, withdrawal or credit on a user's account from your backend. Scope balance:write is off by default, an idempotency key is required and every posting is audited.

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

#Market

Market data for your middleware: current quotes from the platform's price mirror, the platform's own chart history and what the brand's clients trade most.

#Trading on behalf

Place, change and close orders FOR a mapped user through the same order path the trader uses. Leverage, spread, lot rules, margin and every guard apply; every action is written to the client's history as done by your key. MetaTrader accounts are not traded here (409 mt_account).

#Scopes

clients:readRead the clients of the company, page by change time (GET /clients?updated_since=…).
clients:read_emailE-mail addresses in clear instead of masked.
clients:read_phonePhone numbers in clear instead of masked.
clients:read_ftdFirst-deposit date on clients.
clients:read_commentsClient comments.
clients:read_custom_fieldsCustom fields of the client.
users:writePUT /users/{external_id} - create or update a client by your id.
sso:issuePOST /users/{external_id}/sso - one-time login links; list and end sessions.
accounts:readAccounts, balance and positions of a user; quotes, bars and trending for your middleware.
accounts:writeOpen a trading account for a user.
trading:controlPause and resume trading for a user.
mt:linkRecord which MT4 / MT5 login belongs to a user.
trading:actPlace, change and close orders FOR a user through the platform's own order path; every action lands in the client's history as done by your key.
balance:writePOST /users/{external_id}/transactions - book a deposit, withdrawal or credit. OFF by default: only the CRM owner (or an admin with the "Edit transactions" right) can put it on a key, and the brand's "Money posting" switch must be on.

#Typical flows

#Data protection

  • Export (right of access): the CRM client page offers a zip with profile, contacts, custom fields, sign-ins, accounts, positions, transactions, notes and documents. Every export is written to the client's history.
  • Erasure (right to be forgotten): personal data is removed, the client row stays as "Erased client <id>" for money history, your external_id is cleared and client.updated goes out. Refused while positions, pending money or a non-zero balance exist. The same external_id creates a new client afterwards.
  • Reduced-data mode (per brand): clients created by SSO get no name or e-mail from the token, and sign-in rows keep only the network part of the IP.
  • Retention: sign-in history 365 days and webhook delivery log 30 days by default; login links are one-time and removed hourly.
Go-live checklist
GET /me answers as expected · PUT /users/test creates in the right brand · a login link signs the test user in and fails on second use · your SSO token signs in and a replay fails with token_replayed · Send test event verifies · one demo trade produces trade.opened / trade.closed · a test posting repeated answers replayed: true · keys have IP allow-lists and expiry.