Trading API

Market

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

GET/api/open/v1/symbols

#Symbols of a trading account (spread, leverage, contract size)

Auth X-API-Key Trading API

Query parameters

trading_account_id integer optional

one trading account of this key (symbols: default the first)

market string optional

fx | crypto | stocks | indices | commodities ...

page integer optional

from 1

per_page integer optional

1..1000, default 200

Responses

200

OK

400

Bad request (invalid_json)

401

No / invalid / revoked / expired API key

403

Refused (IP, scope, brand switch, kill switch, account, inactive client)

404

Not found (also every path while the Open API is off on this server)

422

Invalid request or refused by the order checks (margin, levels, size, market closed ...)

429

Rate limited (Retry-After)

500

Internal error; unknown_outcome = look the order up before sending it again

503

Temporarily unavailable (prices, balance, quotes, rate-limit store)

curl "https://api.your-brand.com/api/open/v1/symbols" \
  -H "X-API-Key: $OCTOLIT_API_KEY"
Response 200
{
  "trading_account_id": 55,
  "symbols": [
    {
      "id": 1042,
      "symbol": "EURUSD",
      "name": "Main",
      "market": "string",
      "base": "string",
      "quote": "string",
      "pair": "string",
      "contract_size": 100000,
      "spread": 0.00009,
      "spread_on": 1,
      "leverage": 100,
      "leverage_type": "fixed",
      "tradable": true
    }
  ],
  "page": 1,
  "per_page": 1,
  "total": 1
}
GET/api/open/v1/symbols/{id}

#One symbol

Auth X-API-Key Trading API

Path parameters

id integer required

Query parameters

trading_account_id integer optional

one trading account of this key (symbols: default the first)

Responses

200

OK

400

Bad request (invalid_json)

401

No / invalid / revoked / expired API key

403

Refused (IP, scope, brand switch, kill switch, account, inactive client)

404

Not found (also every path while the Open API is off on this server)

422

Invalid request or refused by the order checks (margin, levels, size, market closed ...)

429

Rate limited (Retry-After)

500

Internal error; unknown_outcome = look the order up before sending it again

503

Temporarily unavailable (prices, balance, quotes, rate-limit store)

curl "https://api.your-brand.com/api/open/v1/symbols/1042" \
  -H "X-API-Key: $OCTOLIT_API_KEY"
Response 200
{
  "trading_account_id": 55,
  "symbol": {
    "id": 1042,
    "symbol": "EURUSD",
    "name": "Main",
    "market": "string",
    "base": "string",
    "quote": "string",
    "pair": "string",
    "contract_size": 100000,
    "spread": 0.00009,
    "spread_on": 1,
    "leverage": 100,
    "leverage_type": "fixed",
    "tradable": true
  }
}
GET/api/open/v1/quotes

#Trading quotes snapshot (the prices orders fill at)

Auth X-API-Key Trading API

Query parameters

symbol_ids string optional

comma list of symbol ids (max 100)

symbols string optional

comma list of symbols (max 100)

Responses

200

OK

400

Bad request (invalid_json)

401

No / invalid / revoked / expired API key

403

Refused (IP, scope, brand switch, kill switch, account, inactive client)

404

Not found (also every path while the Open API is off on this server)

422

Invalid request or refused by the order checks (margin, levels, size, market closed ...)

429

Rate limited (Retry-After)

500

Internal error; unknown_outcome = look the order up before sending it again

503

Temporarily unavailable (prices, balance, quotes, rate-limit store)

curl "https://api.your-brand.com/api/open/v1/quotes" \
  -H "X-API-Key: $OCTOLIT_API_KEY"
Response 200
{
  "quotes": [
    {
      "symbol_id": 42,
      "symbol": "EURUSD",
      "pair": "string",
      "bid": 1.08452,
      "ask": 1.08461,
      "mid": 1.084565,
      "ts": 1762862400123
    }
  ],
  "source": "trading",
  "mirror_at": 1
}
GET/api/open/v1/bars

#Chart history: the newest OHLCV bars of one symbol up to `to` (any chart timeframe)

Auth X-API-Key Trading API

Query parameters

symbol_id integer optional

or symbol

symbol string optional

or symbol_id

resolution string optional

1m, 5m, 15m, 30m, 1h, 4h, 1D, 1W, 1M (default 1h; aliases 60, H1, D, W1, MN ...)

to string optional

newest bar open time: epoch seconds, epoch ms or ISO 8601 (default now)

from string optional

oldest bar open time (optional, before to)

count integer optional

1..5000, default 500; the newest count bars

Responses

200

OK

400

Bad request (invalid_json)

401

No / invalid / revoked / expired API key

403

Refused (IP, scope, brand switch, kill switch, account, inactive client)

404

Not found (also every path while the Open API is off on this server)

422

Invalid request or refused by the order checks (margin, levels, size, market closed ...)

429

Rate limited (Retry-After)

500

Internal error; unknown_outcome = look the order up before sending it again

503

Temporarily unavailable (prices, balance, quotes, rate-limit store)

curl "https://api.your-brand.com/api/open/v1/bars" \
  -H "X-API-Key: $OCTOLIT_API_KEY"
Response 200
{
  "symbol_id": 42,
  "symbol": "EURUSD",
  "pair": "string",
  "resolution": "1h",
  "from": 1,
  "to": 1,
  "count": 500,
  "bars": [
    {
      "t": 1,
      "o": 1.5,
      "h": 1.5,
      "l": 1.5,
      "c": 1.5,
      "v": 1.5
    }
  ],
  "complete": true,
  "next_to": 1
}
GET/api/open/v1/trending

#Trending instruments: the symbols this brand's clients traded the most (live, prop / bot / demo trades not counted; 403 trending_disabled unless the brand offers it)

Auth X-API-Key Trading API

Query parameters

window string optional

1h, 24h, 7d (default 24h)

limit integer optional

1..50, default 10

Responses

200

OK

400

Bad request (invalid_json)

401

No / invalid / revoked / expired API key

403

Refused (IP, scope, brand switch, kill switch, account, inactive client)

404

Not found (also every path while the Open API is off on this server)

422

Invalid request or refused by the order checks (margin, levels, size, market closed ...)

429

Rate limited (Retry-After)

500

Internal error; unknown_outcome = look the order up before sending it again

503

Temporarily unavailable (prices, balance, quotes, rate-limit store)

curl "https://api.your-brand.com/api/open/v1/trending" \
  -H "X-API-Key: $OCTOLIT_API_KEY"
Response 200
{
  "now": 1,
  "as_of": 1,
  "scope": "brand",
  "window": "24h",
  "from": 1,
  "min_clients": 1,
  "total_trades": 1,
  "symbols": [
    {
      "rank": 1,
      "symbol": "EURUSD",
      "ticker": "string",
      "ticker_id": 42,
      "name": "Main",
      "trades": 1,
      "clients": 1,
      "share_pct": 1.5,
      "buy_pct": 1.5
    }
  ]
}