Trading API · v1.0.0

Trading API

The client-level REST API: a trader's own software reads prices and trades their own accounts with a key they create in the trader. Same guards, same prices and same history as the web trader.

#Basics

Base URLhttps://api.your-brand.com/api/open/v1
AuthX-API-Key: qk_… or Authorization: Bearer qk_…. Created by the client in the trader under API access (Pro mode). Details →
Enabled byThe broker, per brand. Otherwise 403 open_api_disabled with details.reason.
Rate limit1 200 requests / min per key, 10 order actions / s; X-RateLimit-* headers on every answer. Details →
Errors{ "error": { "code", "message", "details" } }. All codes →
PricesTrading quotes - the bid / ask orders fill at, including the account type's spread. Chart bars are the platform's own history.
First call: GET /account
curl "https://api.your-brand.com/api/open/v1/account" \
  -H "X-API-Key: $OCTOLIT_API_KEY"

#All operations

#Account

The key, its client, limits and trading accounts.

#Market

Symbols and the trading quotes orders fill at, chart bars and trending instruments.

#Trading

Orders, positions and history. Writes need the trade scope and a client_order_id.

#Stream

Short-lived tickets for the WebSocket stream (quotes + account / execution events).

#Meta

This document and the reference page, served by your broker.

#Orders & idempotency

  • Every order action carries a client_order_id (body) or an Idempotency-Key header: 1-64 characters, letters, digits, _ - : .. Repeating it returns the same order with 200 instead of placing a second one.
  • Market orders fill at once and answer 201 with the position; limit and stop orders answer 201 pending and fill later (account event on the stream).
  • Quantity is lots or units (lots × contract size). sl / tp are absolute prices; 0 removes them on modify.
  • On a timeout, 500 unknown_outcome or 500 not_placed: call GET /orders/lookup?client_order_id=… before anything else.
  • MetaTrader accounts are not traded through this API (409 mt_account) - their orders are placed in MetaTrader.

#Scopes

readAccount, symbols, quotes, bars, trending, positions, orders, history, stream tickets. Every key has it.
tradePlace, change, close and cancel orders. Chosen when the key is created; the broker can stop API trading at any time.
fixLog on over FIX 4.4 with the same key (QUOTE and TRADE sessions).

#Limits

Requests per minute, per key1 200 (broker-set, 10 - 12 000)
Requests per minute, per client2 x the key limit, across all keys
Order actions per second, per key10 (broker-set, 1 - 50)
Order actions per second, per trading account10 (broker-set, 1 - 50)
Keys per client5 (broker-set, 1 - 20)
Wrong keys per minute, per address60, then 429 too_many_invalid_keys
Symbols per GET /quotes100
Bars per GET /bars5 000
Stream ticketsingle use, 60 s
Brokers tune these per brand. GET /account returns the limits that apply to your key.