Quick start
A key, an address, a first request — BTCUSDT candles from Binance in five minutes.
The LootX market data API serves the same data the terminal runs on: second-based candles, time and sales, footprint, order book heatmap, open interest, funding rate, liquidity walls, and the screener. All exchanges through one address and one key, with identical instrument names and one time format.
In five minutes
Get a key
Open Dashboard → API Keys and click Create Key. Give the key a meaningful name — for example, after the script or server where it will live.
The key looks like lx_live_ plus 43 more characters. It is shown once: save it to a password manager or an environment variable. If you lose it, revoke the key and issue a new one.
The key works as long as the account has an active API plan. The plan is selected on the same page, if it is open for purchase, or assigned by a LootX administrator.
Note the address and how to pass the key
The base URL is https://market-api.lootx.trade. Pass the key via a header:
Authorization: Bearer lx_live_...or X-API-Key: lx_live_.... Never put the key in the URL: query strings end up in proxy and browser logs, so a request with the key in the URL gets 400 key_in_query.
Make the first request
The three most recent minute candles of the BTCUSDT perpetual contract on Binance (the last one is the current minute, still open):
export LOOTX_API_KEY="lx_live_..."
curl -s "https://market-api.lootx.trade/v1/candles?instrument=binance:perp:BTCUSDT&tf=1m&limit=3" \
-H "Authorization: Bearer $LOOTX_API_KEY"The response is a table with columns: names in columns, rows in rows, values in the same order (the numbers below are examples):
{
"instrument": "binance:perp:BTCUSDT",
"tf": "1m",
"columns": ["ts", "open", "high", "low", "close", "volume", "quote_volume",
"buy_volume", "buy_quote_volume", "trades", "buy_trades"],
"rows": [
[1793750400000, 104250.5, 104262.0, 104241.1, 104255.3, 41.27, 4302517.62, 22.91, 2388563.12, 1824, 1003],
[1793750460000, 104255.3, 104270.0, 104249.8, 104266.9, 28.04, 2923450.40, 15.33, 1598336.46, 1310, 702],
[1793750520000, 104266.9, 104268.4, 104230.2, 104233.0, 36.58, 3813166.95, 14.02, 1461540.90, 1597, 688]
],
"next_cursor": null,
"coverage": { "oldest": 1792741800000, "newest": 1793750520000 }
}ts— candle start time in milliseconds UTC;volume— volume in coins,quote_volume— in quote currency (for USDT pairs, dollars);next_cursor: null— no more pages; otherwise pass it ascursor=(pagination details);coverage— the total period available in storage for this instrument. Candle history in the API starts on 23.10.2026 (more in Candles).
If something goes wrong
Any gateway error is an HTTP code plus JSON with a machine-readable code. Without a key — 401 with the header WWW-Authenticate: Bearer realm="lootx" and the body:
{
"error": {
"code": "missing_key",
"message": "нужен ключ: заголовок Authorization: Bearer <ключ> или X-API-Key",
"request_id": "a553713a48d85b96-VIE",
"docs_url": "https://docs.lootx.trade/ru/market-api/error-codes#missing_key"
}
}Parse the code field, not the message text — the text may change. The API only reads GET (and HEAD, OPTIONS): any other method gets 405 method_not_allowed. Include request_id when contacting support about an unclear error: we can find the request by it. All codes are in the Errors section.
What’s next
How to name instruments, how time is handled, and how to get the next page.
Candles and seriesCandles from one second to one day, CVD, delta, and volume alongside.
WebSocket streamsLiquidity walls, screener, trades, OI, and second-based candles in real time.
Limits and plansWhat a plan restricts, which headers to watch, and what to do on 429.
Interactive spec — market-api.lootx.trade/docs, machine-readable — /v1/openapi.json (OpenAPI 3.1, no key needed).