Market data
Public JSON-RPC methods for markets, assets, order books, tickers, trades, candles, platform totals, interest rates and funding, mark and index price history, plus the TradingView UDF feed.
On this page
- Market ids
- Markets
- atlas.getSymbols
- Assets
- atlas.getAssets
- Order book
- atlas.getOrderBook
- atlas.getBBO
- Tickers
- atlas.getTicker
- atlas.getTickers
- Trades
- atlas.getTrades
- Candles
- atlas.getCandles
- Platform totals
- atlas.getPlatformStats
- Interest rates
- atlas.getInterestRates
- atlas.getInterestRateHistory
- Price and funding history
- atlas.getFundingRateHistory
- atlas.getMarkPriceHistory
- atlas.getIndexPriceHistory
- TradingView UDF
- GET /udf/history
Market data is public. Call these methods over HTTP at POST /market/rpc. The /market/ws WebSocket carries streams only: subscribe there for live updates instead of polling.
- HTTP
POST /market/rpc- WebSocket
/market/ws, streams only- Auth
- None
- Params
- Named object. Send
{}or omitparamsfor a method with none - Market selector
- The numeric
marketIdfromatlas.getSymbols. A symbol is a display label - Unknown market
- Error
-20008(Symbol not found) - Charting
- TradingView UDF at
/market/udf/*
| Method | Use it for | Live equivalent |
|---|---|---|
atlas.getSymbols | Market list and static trading parameters | none |
atlas.getAssets | Every asset id, symbol, decimals and withdrawal limits | none |
atlas.getOrderBook | Book snapshot | stream.order_book |
atlas.getBBO | Top of book with sizes | stream.bbo |
atlas.getTicker | Quote, 24h stats, mark, funding and open interest for one market | stream.ticker |
atlas.getTickers | The same for several markets, or all of them, in one call | stream.ticker |
atlas.getTrades | Public trades, newest first, paged | stream.trades |
atlas.getCandles | OHLCV history | stream.candles |
atlas.getPlatformStats | Venue-wide volume, trade count, open interest and active traders | none |
atlas.getInterestRates | Each asset's current interest rate | none |
atlas.getInterestRateHistory | One asset's interest rates over time | none |
atlas.getFundingRateHistory | A perp's final funding rate for each completed session | none |
atlas.getMarkPriceHistory | Mark prices the venue applied | stream.mark_price |
atlas.getIndexPriceHistory | Index prices the venue applied, per asset | stream.mark_price |
atlas.getTime | Server clock, Unix ms | none |
Market ids
Every read and subscription names a market by its numeric marketId, from atlas.getSymbols. A symbol is a display label that more than one market can share, so don't key anything on it. Signed commands name the market in a tagged form instead; see MarketId. Refresh your ids from atlas.getSymbols rather than hard-coding them.
Markets
atlas.getSymbols
atlas.getSymbolsHTTP/market/rpcReturns the catalog of markets and their static parameters: the marketId every other read takes, decimals, tick and lot sizes, order limits, collars, margin config, status and mode. With no params you get every market open to new orders, sorted by symbol. This is static data. For prices, use atlas.getTicker or atlas.getTickers.
Fees depend on your wallet's fee tier, not the market: see Trading fees. For the funding schedule, see Funding.
atlas.getSymbolsHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getSymbols","params":{"kind":"perp"}}'Press Send to see the response.Values in the example are illustrative. Read live values, and the marketId to sign with, from this method before you sign an order. For the markets listed, see Perpetual markets and Spot markets.
kindenumperporspot. Filter by market kind. Absent returns all.sortByenum- One of
symbol,marketId,baseAsset,quoteAsset,kind,status,mode. Defaultsymbol. sortDirenumascordesc. Defaultasc.querystring- Case-insensitive substring match on symbol and base asset.
statusenumACTIVEorINACTIVE. Filter by status. Absent returns all.modeenumNORMAL,REDUCE_ONLYorCLOSE_ONLY. Filter by trading mode. Absent returns all.quoteAssetstring- Only markets settling in this asset, for example
"USDT". limitinteger- Maximum rows, applied after sorting. Must be at least 1. Absent returns all.
offsetinteger- Rows to skip before
limit. Default 0.
Result: SymbolInfo[]
SymbolInfo
symbolstringrequired- The market's display symbol. Markets can share one, so don't use it as a key.
marketIdinteger- The market's numeric id: what every read and subscription takes, and the source of the tagged id you sign orders with. See Market ids. Absent only while a new market is bootstrapping.
baseAssetstringrequired- Base asset display symbol.
quoteAssetstringrequired- Quote (settlement) asset display symbol.
baseAssetIdinteger- Numeric id of the base asset, as in
atlas.getAssets. Map balances onto this market with it; deposits key by it too. Absent until resolved. quoteAssetIdinteger- Numeric id of the quote asset. Absent until resolved.
kindperp or spot- Market kind.
tickSizePricerequired- Minimum price increment.
lotSizeSizerequired- Minimum size increment.
minOrderSizeSizerequired- Smallest order size.
maxOrderSizeSizerequired- Largest order size.
minOrderNotionalPositiveDecimalStringrequired- Smallest order notional (
size × price × multiplier), as a decimal amount of the quote asset, not raw units:"10"is 10 of the quote asset. maxOrderNotionalPositiveDecimalStringrequired- Largest order notional, as a decimal amount of the quote asset, like
minOrderNotional. passiveCollarBpsintegerrequired- Limit collar, passive side, in bps: how far from mark a limit may rest (below mark for a buy, above for a sell).
aggressiveCollarBpsintegerrequired- Limit collar, aggressive side, in bps: how far through mark a limit may reach (above mark for a buy, below for a sell). A market order is priced at this edge.
baseDecimalsintegerrequired- Decimal places of the base asset's raw amounts, for example
8. quoteDecimalsintegerrequired- Decimal places of the quote asset's raw amounts, for example
8. priceScaleintegerrequired- Decimal places of
tickSize. Listing and display only: a signed price always has 10 decimal places. qtyScaleintegerrequired- Decimal places of
lotSize. Listing and display only: a signed quantity always has 8 decimal places. multiplierPositiveDecimalStringrequired- Contract multiplier M, up to 8 decimal places. An order's notional is
size × price × multiplier.1when the market has none. statusACTIVE or INACTIVErequired- Currently always
ACTIVE. For whether a market takes new orders, see Market status and lifecycle. modeNORMAL or REDUCE_ONLY or CLOSE_ONLYrequired- Currently always
NORMAL. The ticker reports the same mode in lowercase. marginModePolicyenum- Perps.
cross_and_isolatedaccepts eithermarginMode;isolated_onlyaccepts onlyisolatedand refuses a cross order. Every perp carries it; it is absent on spot. imrBpsinteger- Perps. Initial margin in bps. Max leverage =
10000 / imrBps. mmrBpsinteger- Perps. Maintenance margin in bps.
liquidationPenaltyBpsinteger- Perps. Liquidation fee on liquidated notional, in bps, paid to the venue. See Liquidation.
maxPositionNotionalUsdPositiveDecimalString- Perps. Cap on absolute position notional per account, in USD, as a decimal string.
marginTiersMarginTier[]Perps. Progressive tiers. Field names are snake_case. Empty means flat
imrBps/mmrBpsat every size.›Show 3 child fieldsHide child fields
notional_cap_usdintegerrequired- Upper bound on position notional, whole USD, that this tier covers.
imr_bpsintegerrequired- Initial margin at this tier, in bps.
mmr_bpsintegerrequired- Maintenance margin at this tier, in bps.
- Say
imrBpsis 250. Max leverage is10000 / 250 = 40x. - With the tiers in the example response, notional up to 5,000,000 USD uses 250 bps (40x). Above that, up to 25,000,000 USD, it uses 500 bps (20x).
| Error | When |
|---|---|
-32602 | Unknown sortBy, sortDir, status or mode, or limit < 1, or offset < 0 |
A market closed to new orders refuses new orders and replaces with -10022. It drops out of atlas.getSymbols, the default atlas.getTickers list and UDF search, but stays readable by its marketId.
Assets
atlas.getAssets
atlas.getAssetsHTTP/market/rpcEvery asset the venue has created, sorted by assetId, with its scale and withdrawal limits. That includes assets no market references. Use it to turn the numeric assetId in deposits, transfers and balances into a symbol and a scale, and to check a withdrawal before you sign it. Takes no params. atlas.getSymbols only names the assets its markets reference.
atlas.getAssetsHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getAssets","params":{}}'Press Send to see the response.Values in the example are illustrative. A real response also lists the assets that only price a perp.
Result: AssetInfo[]
AssetInfo
assetIdintegerrequired- Numeric asset id.
0is ZRO, a real listed asset: don't treat it as a placeholder.1is USDT, the margin and settlement asset. Both are the same in every deployment. symbolstringrequired- Asset symbol.
decimalsintegerrequired- Fixed-point scale of the asset's raw amounts, for example
8. A rawamountof"100000000000"at 8 decimals is 1,000. Display amounts elsewhere in the API are already decimal strings: don't rescale them. withdrawalMinimumPositiveDecimalStringrequired- The smallest
withdrawof this asset, in the asset's own units. A lower amount is refused.0when none is set. withdrawalZonesinteger[]required- The Zero zones a
withdrawof this asset may name as its destination, ascending. Each is a configured route; it says nothing about whether the destination is live. Empty when the asset can't be withdrawn.
For the other withdrawal rules, see Withdrawals and transfers. Raw amounts use the asset's decimals, but prices and sizes don't: use each market's tickSize and lotSize for those.
Order book
atlas.getOrderBook
atlas.getOrderBookHTTP/market/rpcA point-in-time snapshot of the book. Pass depth to cap the levels per side. Live books come from stream.order_book, which sends levels as [price, size] pairs rather than objects.
atlas.getOrderBookHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getOrderBook","params":{"marketId":4294967297,"depth":3}}'Press Send to see the response.marketIdintegerrequired- The market, by market id.
depthinteger- Maximum levels per side, at least 1. Absent returns the full book.
Result: OrderBookSnapshot
OrderBookSnapshot
marketIdintegerrequired- The market's id.
symbolSymbolrequired- The market's display symbol.
bidsOrderBookLevel[]requiredBest (highest) first.
›Show 2 child fieldsHide child fields
priceDecimalStringrequired- Level price.
sizeDecimalStringrequired- Total size at the level.
asksOrderBookLevel[]requiredBest (lowest) first.
›Show 2 child fieldsHide child fields
priceDecimalStringrequired- Level price.
sizeDecimalStringrequired- Total size at the level.
timestampTimestampMsrequired- When the book reached this state, Unix ms.
A known market with no book yet returns empty bids and asks with timestamp 0. Sizes can carry trailing zeros ("0.080000"): compare them as decimals, not strings.
| Error | When |
|---|---|
-32602 | Missing or malformed marketId, or depth below 1 |
-20008 | Unknown market id |
-20003 | The book can't be read. Retry with backoff |
atlas.getBBO
atlas.getBBOHTTP/market/rpcBest bid and offer, with sizes. Field names are single letters.
atlas.getBBOHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getBBO","params":{"marketId":4294967297}}'Press Send to see the response.marketIdintegerrequired- The market, by market id.
Result: BBO
BBO
marketIdintegerrequired- The market's id.
sSymbolrequired- The market's display symbol.
bDecimalStringrequired- Best bid price.
BDecimalStringrequired- Size at the best bid.
aDecimalStringrequired- Best ask price.
ADecimalStringrequired- Size at the best ask.
TTimestampMsrequired- Book snapshot time, Unix ms.
A side with no resting orders is sent as price "0" and size "0". Read a zero price as "no orders on this side", never as a bid or ask at zero: no real price on ATLAS is zero or below.
Tickers
atlas.getTicker
atlas.getTickerHTTP/market/rpcOne market's live quote: best bid and ask, the last trade, the rolling 24-hour window and the trading mode, plus mark price, and for perps the index, funding, impact prices and open interest.
atlas.getTickerHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getTicker","params":{"marketId":4294967297}}'Press Send to see the response.marketIdintegerrequired- The market, by market id.
Result: Ticker
Ticker
marketIdintegerrequired- The market's id.
symbolstringrequired- The market's display symbol, which other markets can share.
bestBidDecimalStringrequired- Current top of book.
"0"when no bid rests. bestAskDecimalStringrequired- Current top of book.
"0"when no ask rests. lastPriceDecimalStringrequired- Price of the most recent trade.
lastSizeDecimalStringrequired- Size of the most recent trade.
open24hDecimalStringrequired- Price at the start of the rolling 24-hour window.
high24hDecimalStringrequired- Highest trade price in the window.
low24hDecimalStringrequired- Lowest trade price in the window.
volume24hDecimalStringrequired- Base-asset volume in the window.
volumeQuote24hDecimalStringrequired- Notional traded in the window, in the quote asset.
tradeCount24hUint64Numberrequired- Number of trades in the window, as a JSON integer.
priceChange24hDecimalStringrequired- Signed absolute change over the window.
priceChangePct24hDecimalStringrequired- Signed percent:
"2.53"means +2.53%. Can carry many decimal places; round it for display. modeenumrequired- Currently always
normal. Lowercase here, uppercase onatlas.getSymbols. timestampTimestampMsrequired- Snapshot time, Unix ms.
markPriceDecimalString- The live mark price. On a perp it values unrealized PnL and liquidation; on a spot pair it centres the market-order collar.
indexPriceDecimalString- The index price, in the quote asset. Omitted when the index is unavailable, never zero.
fundingRateDecimalString- Perps. The current funding rate for the open session, as a signed decimal fraction:
"0.0001"is 1 bp. Positive means longs pay shorts. It can change until the session closes. Omitted until the market has a rate; a zero rate is"0". nextFundingTimeTimestampMs- Perps. When the open funding session is due to close, Unix ms. It can briefly be in the past. Omitted when none is scheduled.
impactBidDecimalString- Perps. Input to the mark price. Omitted when the book is too thin on that side.
impactAskDecimalString- Perps. Input to the mark price. Omitted when the book is too thin on that side.
openInterestDecimalString- Perps. Open interest in base-asset units, with the contract multiplier applied (
"12.5"is 12.5 BTC). openInterestValueDecimalString- Perps.
openInterest × markPrice, in the quote asset.
| Error | When |
|---|---|
-32602 | Missing or malformed marketId |
-20008 | Unknown market id |
-20003 | Market state can't be read. Retry with backoff |
atlas.getTickers
atlas.getTickersHTTP/market/rpcSeveral tickers in one call, each exactly as atlas.getTicker returns it. Pass no selector for every listed market. Use it for a watchlist or a markets table.
atlas.getTickersHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getTickers","params":{"marketIds":[4294967297,1]}}'Press Send to see the response.The spot row has no perp fields.
marketIdsinteger[]- Markets to return, by market id. Each id appears once in the result.
symbolsstring[]- Display symbols to match. Each selects every listed market with that symbol.
symbolstring- One display symbol. Selects every listed market with it.
Send at most one of marketIds, symbols and symbol; more than one is -32602. With none, you get every listed market.
Result: Ticker[], in the order you asked, then catalog order within a symbol. An unknown market id or symbol fails the whole call with -20008: there is no partial result.
Trades
atlas.getTrades
atlas.getTradesHTTP/market/rpcPublic trades for one market, newest first, one page at a time. Pass nextCursor back as cursor, with the same marketId, for the next page; null ends the traversal. Paging reaches back only as far as the trades the service retains for that market. For live trades, subscribe to stream.trades.
atlas.getTradesHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getTrades","params":{"marketId":4294967297,"limit":2}}'Press Send to see the response.marketIdintegerrequired- The market, by market id.
limitinteger- Trades per page, 1 to 500. Default 50.
cursorstringnextCursorfrom the previous page, unchanged. Omit for the first page.
Result: TradeHistoryPage
TradeHistoryPage
rowsTrade[]required- Trades, most recent first.
nextCursorstring or nullrequired- Opaque. Pass it back as
cursorwith the samemarketId.nullends the traversal; don't infer the end from a short page.
Trade
marketIdintegerrequired- The market's id.
symbolSymbolrequired- The market's display symbol.
pricePricerequired- Trade price.
sizeSizerequired- Trade size.
sidebuy or sellrequired- Aggressor side: the order that crossed the spread.
timestampTimestampMsrequired- Match time, Unix ms.
tradeIdTradeIdrequired- Trade id, the same as on both sides' fills. Opaque.
liquidationbooleantruewhen the trade was a liquidation order's fill. Absent orfalseotherwise. Filterstream.tradeson it for a venue-wide liquidation feed.
| Error | When |
|---|---|
-32602 | Missing or malformed marketId, limit outside 1 to 500, or a cursor that is malformed, expired (older than the retained trades) or was issued for another market |
-20008 | Unknown market id |
-20003 | Trade history can't be read. Retry with backoff |
Candles
atlas.getCandles
atlas.getCandlesHTTP/market/rpcOHLCV candles, oldest first, at most limit of them. Three ways to ask:
| You pass | You get |
|---|---|
from and to | The latest limit candles in that range. Page back by setting to to the earliest t you got |
to only | The latest limit candles before to. Use this to page backwards |
| Neither | The most recent limit candles, the live one (x: false) included |
atlas.getCandlesHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getCandles","params":{"marketId":4294967297,"interval":"1h","to":1791210000000,"limit":2}}'Press Send to see the response.marketIdintegerrequired- The market, by market id.
intervalIntervalrequired1m,5m,15m,1h,4hor1d.fromTimestampMs- Range start, Unix milliseconds, inclusive. Not later than
to. toTimestampMs- Range end, Unix milliseconds, exclusive. Without
from, a backward paging cursor. limitinteger- Candles to return, for every form. 1 to 1000. Default 500.
Result: Candle[]
Candle
marketIdintegerrequired- The market's id.
tTimestampMsrequired- Open time, Unix ms.
TTimestampMsrequired- Close time, Unix ms:
tplus the interval. sSymbolrequired- The market's display symbol.
iIntervalrequired- Interval.
oDecimalStringrequired- Open price.
hDecimalStringrequired- High price.
lDecimalStringrequired- Low price.
cDecimalStringrequired- Close price.
vDecimalStringrequired- Base-asset volume.
nintegerrequired- Number of trades.
xbooleanrequiredtruewhen this candle is final.falsefor the live candle.
Candles are built from public trades. t is a multiple of the interval since the Unix epoch, UTC. x: true can arrive a moment after T, and a candle marked x: true can still be updated: upsert by t.
| Error | When |
|---|---|
-32602 | Malformed params or wrong types, an unsupported interval, from later than to, or limit outside 1 to 1000 |
-20008 | Unknown market id |
-20003 | Candle history can't be read. Retry with backoff |
Platform totals
atlas.getPlatformStats
atlas.getPlatformStatsHTTP/market/rpcTotals across every market for one trailing window, for a public dashboard: volume, trade count, open interest, trading wallets, active Builders and live markets. They are refreshed periodically; see asOf. Notional values are in the margin asset, USDT.
atlas.getPlatformStatsHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getPlatformStats","params":{"window":"day"}}'Press Send to see the response.windowenumday,week,monthorall_time: a trailing period ending atasOf.all_timestarts at the first record. Defaultday.
Result: PlatformStats
PlatformStats
windowenumrequired- The window you asked for.
volumeQuoteobjectrequiredNotional traded in the window, in USDT.
›Show 3 child fieldsHide child fields
perpsDecimalStringrequired- Perpetual markets.
spotDecimalStringrequired- Spot markets.
totalDecimalStringrequired- Both.
tradeCountobjectrequiredMatched fills in the window, each counted once. Best effort.
›Show 3 child fieldsHide child fields
perpsUint64Numberrequired- Perpetual markets.
spotUint64Numberrequired- Spot markets.
totalUint64Numberrequired- Both.
openInterestValueDecimalStringrequired- Open interest across perpetual markets now, not over the window, in USDT.
tradersUint64Numberrequired- Wallets with at least one fill in the window.
activeBuildersUint64Numberrequired- Builder ids attributed to at least one fill in the window.
marketsUint64Numberrequired- Markets open for trading now.
asOfTimestampMsrequired- When these totals were computed. The window ends here.
| Error | When |
|---|---|
-32602 | Unknown window |
-20003 | The totals for that window haven't been computed yet. Retry with backoff |
Interest rates
atlas.getInterestRates
atlas.getInterestRatesHTTP/market/rpcEach asset's current interest rate, in basis points per funding session, not an annualized rate. An asset without a rate is left out; a zero rate is listed as "0". No params.
atlas.getInterestRatesHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getInterestRates","params":{}}'Press Send to see the response.Result: InterestRate[], each { assetId, rateBps }. assetId is a decimal string here.
atlas.getInterestRateHistory
atlas.getInterestRateHistoryHTTP/market/rpcOne asset's interest rates over time, newest first: each rate as it was set, and the rate each closed session charged. Paged like the price and funding histories below.
atlas.getInterestRateHistoryHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getInterestRateHistory","params":{"assetId":"0","limit":2}}'Press Send to see the response.assetIdUint64Stringrequired- The asset, as a decimal string, for example
"0". fromTimestampMs- Inclusive lower bound, Unix ms.
toTimestampMs- Exclusive upper bound, Unix ms.
limitinteger- 1 to 500. Default 100.
cursorstringnextCursorfrom the previous page, with the same filters.
Result: { rows: InterestRatePoint[], nextCursor, coveredThrough }
InterestRatePoint
assetIdUint64Stringrequired- The asset.
rateBpsDecimalStringrequired- The rate in basis points per session, not annualized.
sessionIdUint64String | nullrequirednullfor a rate as it was set; the closed session's id for the rate that session charged.timestampTimestampMsrequired- When the rate was set or the session closed, Unix ms.
An absent rate has no row; a zero rate does. coveredThrough is how far the history has been processed, as below. Interest settles with funding: see Funding.
Price and funding history
These reads return the history the venue actually applied, newest first, one page at a time: { rows, nextCursor, coveredThrough }. Pass nextCursor back unchanged as cursor, with the same filters; null ends the traversal. coveredThrough is how far the history has been processed, not the time of the last row, or null when unknown. A history that can't be read is -20003, never an empty page. For their weight, see Rate limits.
atlas.getFundingRateHistory
atlas.getFundingRateHistoryHTTP/market/rpcA perp's final funding rate for each completed session, newest first. Predicted rates published during a session are not included. This is the market's rate. An account's payments are atlas.getFundingHistory.
atlas.getFundingRateHistoryHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getFundingRateHistory","params":{"marketId":4294967297,"limit":2}}'Press Send to see the response.marketIdintegerrequired- A perp market, by market id. A spot market is
-32602. fromTimestampMs- Inclusive lower bound, Unix ms. Must be earlier than
to. toTimestampMs- Exclusive upper bound, Unix ms.
limitinteger- 1 to 500. Default 100.
cursorstringnextCursorfrom the previous page.
Result: FundingRateHistoryPage
FundingRate
marketIdintegerrequired- The market's id.
symbolSymbolrequired- The market's display symbol.
sessionIdUint64Stringrequired- The completed session's id. Don't derive a time from it: use
timestamp. rateBpsDecimalStringrequired- The rate the closed session charged, in basis points, signed, with fractions.
timestampTimestampMsrequired- When the session closed, Unix ms.
History rates stay in basis points (rateBps), while the ticker and stream.mark_price give the current rate as a decimal fraction (fundingRate). "1" bp here is "0.0001" there.
Not every hour has a row; a zero rate does. See Funding.
-32602 also covers a from that isn't earlier than to, and a cursor that is malformed or was issued for other filters.
atlas.getMarkPriceHistory
atlas.getMarkPriceHistoryHTTP/market/rpcThe mark prices the venue applied to a market.
atlas.getMarkPriceHistoryHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getMarkPriceHistory","params":{"marketId":4294967297,"limit":2}}'Press Send to see the response.marketIdintegerrequired- The market, by market id.
limitinteger- 1 to 500. Default 100.
cursorstringnextCursorfrom the previous page.
Result: { rows: MarkPricePoint[], nextCursor, coveredThrough }. Each row has marketId, symbol, markPrice (DecimalString) and timestamp (when it was applied, Unix ms).
atlas.getIndexPriceHistory
atlas.getIndexPriceHistoryHTTP/market/rpcThe index prices the venue applied for one asset. Rejected inputs are not included.
atlas.getIndexPriceHistoryHTTP POSTcurl -s https://<api-host>/market/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"atlas.getIndexPriceHistory","params":{"asset":"BTC","limit":1}}'Press Send to see the response.assetstringrequired- Asset symbol, as
atlas.getAssetslists it, for exampleBTC. An assetatlas.getAssetsdoesn't list is-32602, as is a cursor that is malformed or was issued for another asset. limitinteger- 1 to 500. Default 100.
cursorstringnextCursorfrom the previous page.
Result: IndexPriceHistoryPage
IndexPricePoint
assetstringrequired- Asset symbol.
assetIdintegerrequired- Asset id.
indexPriceDecimalString or null- The index price applied, or
nullwhen the venue doesn't know the asset. anchorDecimalString or null- The anchor price the index was checked against, or
null. freshSourcesinteger or null- How many fresh sources backed it, or
null. regimeenum or null- The source market's session when it was computed, such as
open,pre,rth,ah,overnight,weekendorholiday, ornull. qualityenumrequiredok,degradedorheld.calcTimestampTimestampMs or null- When the index was calculated, or
null. timestampTimestampMsrequired- When the venue applied it.
A row backed by a committed live mark carries only the price, its quality and the time: anchor, freshSources, regime and calcTimestamp are null on it. Treat each of those as optional.
TradingView UDF
A REST adapter for the TradingView charting library, mounted at /market/udf/*. It is a charting convenience, not the canonical API. It needs your X-Api-Key header, like the rest of the API. TradingView's stock UDF datafeed can't add a header, so serve UDF through your own backend, which adds the key, and point the charting library at that backend. Don't ship the key to the browser. All UDF times are Unix seconds. UDF names a market by its market id as a decimal string, such as "4294967297": that is the ticker TradingView passes back to /udf/history. The display symbol is only a label here.
| Endpoint | Query | Returns |
|---|---|---|
GET /udf/config | none | UdfConfig: supported_resolutions (for example ["1","5","15","60","240","1D"]), and booleans supports_search, supports_group_request, supports_marks, supports_timescale_marks, supports_time |
GET /udf/time | none | Plain text Unix seconds, for example 1791210612. Not JSON |
GET /udf/symbols | symbol (required): the market id as a decimal string, for example 4294967297 | UdfSymbolInfo or { s: "error", errmsg } |
GET /udf/search | query (matched against display symbols; absent or empty returns every market), limit (1 to 50, default 10) | { symbol, full_name, description, type, exchange }[]. symbol is the market id as a decimal string; full_name is Atlas: and the display symbol |
GET /udf/history | symbol (the market id), resolution, from and to (all required), and optional countback | Bars. See below |
UdfSymbolInfo always has name (the display symbol), ticker (the market id as a decimal string), description, type, session, timezone, exchange, minmov, pricescale (price decimals are log10(pricescale)), has_intraday and supported_resolutions.
A missing required query parameter, or one that doesn't parse (such as a non-numeric from), gets HTTP 400 with a plain-text message, not a UDF object. Over the rate limit, every endpoint answers HTTP 429 with { "status": "err", "response": "[rate_limit_exceeded]", "limiter", "retryAfterMs" }: wait retryAfterMs milliseconds before retrying.
GET /udf/history
Returns the bars that open at or after from and before to (to is exclusive), with the live bar always appended. With countback, it returns the latest countback bars that open before to instead, the live bar included; from is still required but ignored, and a countback of 0 is refused. An unknown market id answers no_data.
| Resolution | Interval |
|---|---|
1 | 1m |
5 | 5m |
15 | 15m |
60 | 1h |
240 | 4h |
1D | 1d |
curl -s -H 'X-Api-Key: <key>' 'https://<api-host>/market/udf/history?symbol=4294967297&resolution=60&from=1791202800&to=1791210000'The response is tagged on s: ok with parallel arrays t (bar open times, Unix seconds) and o, h, l, c, v (decimal strings), where index i of each array is one bar; no_data when there are no bars; or error with an errmsg.
{
"s": "ok",
"t": [1791202800, 1791206400],
"o": ["70420", "70290"],
"h": ["70610", "70350"],
"l": ["70180", "69980"],
"c": ["70290", "70105"],
"v": ["84.315", "91.002"]
}For the full contract, see the OpenAPI spec.