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

Orderbook Data (ob )

Orderbook Data (ob_) is a read-focused API surface that provides access to markets and orderbook activity without requiring clients to run their own indexer or interact with the orderbook contracts directly. It is powered by a native indexer built into the Pod protocol, ensuring fast, consistent, and up-to-date views of on-chain state.

The API exposes live orderbook snapshots, historical OHLCV candles, account-level order history and positions, making it ideal for trading interfaces, analytics, and monitoring services.

📝 This is a JSON-RPC 2.0 API. The request path is not important; the method to execute is defined by the method field in the request body. You can send all requests to /, and any path after / is optional and used only for documentation clarity.

Get All Markets

post

Retrieves a list of all available markets/orderbooks with their metadata and statistics. Each market includes token information, current pricing, 24-hour statistics, and fee structure.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getMarkets
idintegerRequiredDefault: 1
paramsarrayOptionalDefault: []
Responses
200

Array of market objects with metadata and statistics

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getMarkets
200

Array of market objects with metadata and statistics

Get Orderbook Snapshot

post

Retrieves the current orderbook snapshot for a specified market, showing buy and sell orders aggregated by price level.

Orders are grouped by price and include total volume and minimum expiry at each level. Buy orders are sorted by price descending (best bid first), sell orders by price ascending (best ask first).

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getOrderbook
idintegerRequiredDefault: 1
Responses
200

Orderbook snapshot with aggregated buy and sell orders

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getOrderbook
200

Orderbook snapshot with aggregated buy and sell orders

Get Historical Candles

post

Retrieves historical candle (OHLCV) data for a specified orderbook.

Candles represent aggregated price and volume data over specified time intervals. Results are returned sorted by timestamp in descending order (newest first).

All prices are in quote/base units with 1e18 scale (hex-encoded).

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getCandles
idintegerRequiredDefault: 1
Responses
200

Array of candle objects sorted by timestamp (newest first)

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getCandles
200

Array of candle objects sorted by timestamp (newest first)

Get Account Orders

post

Retrieves orders for a specific address in a given orderbook, with support for cursor-based pagination.

Orders are returned in descending order by timestamp/nonce. Use the next_cursor from the response to fetch subsequent pages.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getOrders
idintegerRequiredDefault: 1
Responses
200

Object containing orders array and pagination cursor

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getOrders
200

Object containing orders array and pagination cursor

Get Account Positions

post

Retrieves trading positions for a specific address across all orderbooks.

Positions track the cost basis of acquired tokens (from buys and deposits) and compute unrealized PnL using the current clearing price. The response includes per-token positions (balance, position size, unrealized PnL) and aggregate metrics (total realized PnL, total invested, total unrealized PnL).

All amounts use 1e18 fixed-point scale.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getPositions
idintegerRequiredDefault: 1
paramsstring[]Required

Parameters:

  1. address (address): The address to get positions for
Example: ["0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28"]
Responses
200

Positions response with per-token positions and aggregate PnL

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getPositions
200

Positions response with per-token positions and aggregate PnL

Get Account Fills

post

Retrieves trade fills for a specific address within a time range.

Fills represent individual trade executions from batch auction settlements. A single order may produce multiple fills across different batches. Each fill includes the clearing price, base and quote amounts, and the associated orderbook and token addresses.

Results are returned in descending order by timestamp (most recent first).

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getFills
idintegerRequiredDefault: 1
Responses
200

Object containing fills array

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getFills
200

Object containing fills array

Get Account Backstop Transfers

post

Retrieves the backstop transfers for a specific address, with cursor-based pagination.

A backstop transfer is recorded when a perp position is swept to the backstop during liquidation: the position's remaining size and cash are moved off the account. Each entry captures the swept size, cash, the mark price at the sweep, and the account equity at that moment.

Results are returned in descending order by timestamp (most recent first). Use next_cursor from the response to fetch subsequent pages.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getBackstopTransfers
idintegerRequiredDefault: 1
Responses
200

Object containing the backstop transfers array, total count, and pagination cursor

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getBackstopTransfers
200

Object containing the backstop transfers array, total count, and pagination cursor

Get Account Triggers

post

Retrieves the armed TP/SL trigger orders owned by an address, with cursor-based pagination.

Triggers are conditional perp orders: when the pair's mark price crosses trigger_price in the direction implied by trigger_type and the sign of size, the engine emits a synthetic order (surfaced through ob_getOrders with kind = triggered). Triggers themselves have no fill history, so this response is leaner than ob_getOrders.

Triggers are returned sorted by (orderbook_id, order_id). Use next_cursor from the response to fetch subsequent pages.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getTriggers
idintegerRequiredDefault: 1
Responses
200

Object containing the triggers array, total count, and pagination cursor

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getTriggers
200

Object containing the triggers array, total count, and pagination cursor

Get Ranked Positions (Leaderboard)

post

Returns accounts ranked by combined realized + unrealized PnL (total_realized_pnl + total_unrealized_pnl) descending, paginated by offset/limit.

Because the unrealized component moves with mark prices, the ordering can shift between calls even without trades. When an address is supplied, the response also includes that account's own positions and rank (queried), independent of the returned page.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getRankedPositions
idintegerRequiredDefault: 1
Responses
200

Ranked window of accounts plus the total count and optional queried account

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getRankedPositions
200

Ranked window of accounts plus the total count and optional queried account

Get Oracle & Mark Prices

post

Returns the latest oracle and mark prices recorded for perp orderbooks by the indexer.

Pass an orderbook_id to fetch a single orderbook, or omit it for every perp orderbook. Numeric fields are 0 and as_of is epoch until the orderbook has run a perp batch. Funding state is not included here — call ob_getFundingRates for that.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getOraclePrices
idintegerRequiredDefault: 1
paramsstring[]Optional

Positional parameters:

  1. orderbook_id (Bytes32, optional): Restrict to a single orderbook; omit for all perp orderbooks
Example: ["0x0000000000000000000000000000000000000000000000000000000000000007"]
Responses
200

Array of oracle/mark price objects

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getOraclePrices
200

Array of oracle/mark price objects

Get Funding Rates

post

Returns the latest funding state for perp orderbooks, with the mark and oracle prices included for context.

Pass an orderbook_id to fetch a single orderbook, or omit it for every perp orderbook.

Body
jsonrpcstringRequiredDefault: 2.0
methodstringRequiredDefault: ob_getFundingRates
idintegerRequiredDefault: 1
paramsstring[]Optional

Positional parameters:

  1. orderbook_id (Bytes32, optional): Restrict to a single orderbook; omit for all perp orderbooks
Example: ["0x0000000000000000000000000000000000000000000000000000000000000007"]
Responses
200

Array of funding rate objects

application/json
jsonrpcstringOptional
idintegerOptional
post/ob_getFundingRates
200

Array of funding rate objects

Last updated