For the complete documentation index, see llms.txt. This page is also available as Markdown.

Market data

Market data

Candles

Returns OHLCV candle data for one market. Results are paginated by time. Weight: 2.

{
  "type": "candles",
  "symbol": "PERP_BTC_USDC",
  "interval": "1h",
  "start_time": 1716100000000,
  "end_time": 1716200000000,
  "limit": 500
}
Field
Type
Required
Default / limits
Description

symbol

string

Yes

—

Market symbol.

interval

string

Yes

—

One of 1m, 5m, 15m, 30m, 1h, 4h, 1d, or 1w.

start_time

int64

No

—

Millisecond epoch; includes candles whose open time is at or after this value.

end_time

int64

No

—

Millisecond epoch; includes candles whose open time is at or before this value.

limit

int

No

500; 1–5000

Maximum number of candles.

cursor

string

No

—

Opaque pagination cursor.

Each item in data.rows contains open, high, low, close, and volume as decimal strings, plus timestamp as the candle-open time in milliseconds. volume is base-asset volume. data.next_cursor is null on the final page. Responses are cached for 60 seconds using the symbol, interval, time range, and cursor as the cache key.

Funding comparison

Returns current and rolling-average funding-rate figures by market and venue. Weight: 2. This response is not paginated and is cached per symbol for 60 seconds (up to 256 entries).

Field
Type
Required
Default
Description

symbol

string

No

Omitted: all markets

Restricts the response to one market.

data.rows contains a market symbol, next_funding_time (millisecond epoch), and exchanges[]. Each venue entry contains name, last, and the 1d, 7d, and 30d average rates. Rates are decimal strings. The venue name is an identifier, such as binance, bybit, or pangoperps.

Funding rate history

Returns historical funding rates and the mark price captured at each funding interval. Records are written at the 00:00, 08:00, and 16:00 UTC boundaries. Weight: 2; cache duration: 30 seconds.

Field
Type
Required
Default / limits
Description

symbol

string

Yes

—

Market symbol.

start_time

int64

No

—

Start of the requested window, in milliseconds.

end_time

int64

No

—

End of the requested window, in milliseconds.

limit

int

No

500; 1–5000

Maximum number of records.

cursor

string

No

—

Opaque pagination cursor.

Each row includes funding_rate (decimal string for the 8-hour interval), mark_price (decimal string at the funding boundary), and funding_rate_timestamp (UTC millisecond epoch). The response includes data.next_cursor for pagination.

Liquidations

Returns recent liquidation events across the platform. Each row includes position information and, when account lookup succeeds, the affected address and account. Weight: 2.

Field
Type
Required
Default / limits
Description

symbol

string

No

Omitted: all markets

Optional market filter.

limit

int

No

50; 1–500

Maximum number of events.

cursor

string

No

—

Opaque pagination cursor.

Each row includes symbol, side (LONG or SHORT), position_qty, notional, mark_price, est_liq_price, address, account_id, broker_id, and timestamp. Decimal quantities/prices are strings; timestamp is milliseconds. The address/account/broker fields can be null if lookup fails. Account enrichment is cached for 60 seconds. data.next_cursor is null when no further results are available.

Market detail

Returns one combined snapshot for a market: market information, orderbook, recent trades, funding history, and candles. The subqueries run in parallel. Weight: 2.

Field
Type
Required
Default / limits
Description

symbol

string

Yes

—

Market symbol.

include

string[]

No

All five sections

Select from market_info, orderbook, recent_trades, funding_history, and candles. An empty list also includes all sections.

orderbook_levels

int

No

20; 1–100

Number of orderbook levels; values are clamped to the supported range.

recent_trades_limit

int

No

20; 1–100

Maximum recent trades.

funding_history_limit

int

No

8; 1–100

Maximum funding records.

candles_interval

string

No

1h

Uses the interval values supported by candles.

candles_limit

int

No

24; 1–500

Maximum candle records.

data contains symbol and the selected sections. market_info uses the same fields as the marketSummary market row; orderbook uses the same book structure as orderbook; the other sections follow the corresponding marketTrades, fundingRateHistory, and candles row formats. A section excluded through include is absent from the response rather than set to null. Combined sections may have different freshness, and overall latency is determined by the slowest section.

Market summary

Returns mark/index prices, 24-hour activity, funding, open interest, and trading metadata across markets. Weight: 1.

Field
Type
Required
Default
Description

symbols

string[]

No

Omitted or empty: all active markets

Optional list of market symbols.

data includes total_24h_volume, total_open_interest, and markets[]. Each market row can contain symbol, mark_price, index_price, 24h_open, 24h_close, 24h_high, 24h_low, 24h_volume, 24h_amount, open_interest, last_funding_rate, est_funding_rate, next_funding_time, bid_price, ask_price, max_leverage, min_notional, quote_tick, and base_tick.

Prices, volumes, rates, open interest, and symbol metadata are decimal strings. next_funding_time is a millisecond epoch. est_funding_rate may be null before the first estimate is received; aggregate volume/open-interest values may be null when unavailable. Market rows are sorted lexically for stable rendering.

Omitting symbols uses an in-memory snapshot of all active markets. Supplying symbols fetches those markets concurrently with a 10-second overall budget; if some lookups time out, successful market rows are still returned. There is no pagination.

Market trades

Returns recent taker-side fills for one market. Each fill is enriched with the taker address, account, and broker when available. Weight: 1; no pagination.

Field
Type
Required
Default / limits
Description

symbol

string

Yes

—

Market symbol.

limit

int

No

50; 1–200

Maximum number of trades; values outside the range are clamped.

Each row contains symbol, side (BUY or SELL, from the taker's perspective), executed_price, executed_quantity, address, account_id, broker_id, and executed_timestamp. Prices and quantities are decimal strings; the timestamp is milliseconds. The wallet address is returned in full. The query filters for taker fills so each trade appears once; per-row address lookups are cached for 60 seconds.

Orderbook

Returns a market's current orderbook snapshot, with mid-price and spread. Weight: 1; no pagination.

Field
Type
Required
Default / limits
Description

symbol

string

Yes

—

Must be present in the market symbols table; an unknown symbol returns INVALID_PARAM.

max_level

int

No

100; 1–1000

Maximum number of levels on each side; values are clamped.

data contains symbol, mid_price, spread, asks[], bids[], and an inner ts timestamp. Each level has decimal-string price and quantity. Asks and bids are ordered best-first and trimmed to max_level. The mid-price is (best ask + best bid) / 2 rounded to eight decimals using HALF_DOWN; spread is best ask - best bid. Both are null if either side has no levels. An empty book returns empty arrays, not an error. The snapshot is served from memory and is typically available in under a millisecond.


Last updated