Skip to main content
GET
Get live orderbook
Returns the live on-chain orderbook for all configured token pairs on a given chain. The cache is refreshed on every new block via eth_subscribe, so the response always reflects the most recent chain state. Use this endpoint to get current market prices before executing a swap, or to display market depth to users.

Selecting a Chain

Pass the target chain with the chainId query parameter:
Each chain quotes against its own stablecoin — the quoteToken: Every pair on a chain shares that chain’s quote token, and each pair echoes it in quoteToken. Read it on-chain with getQuoteToken() on the chain’s QuoteLens helper if you need to confirm it at runtime.
If chainId is omitted (or 0), the request targets Base (8453). The response echoes the resolved chain in chainId, and blockNumber / blockTime refer to that chain.
Chain-related failures:

Understanding the Orderbook

  • bids — prices at which PropAMM will buy the base token (you sell base, receive the quote token). Sorted descending.
  • asks — prices at which PropAMM will sell the base token (you buy base, pay the quote token). Sorted ascending.
  • price is always quote token per base token — USDC on Base, USDT on BNB Chain, USDG on Robinhood Chain.
  • Each level is marginal — independent price points, not cumulative depth.
  • Prices and amounts are decimal strings to preserve EVM-scale precision.
Quote-token decimals differ per chain — USDC and USDG use 6, BNB Chain’s USDT uses 18. price and amount are human-readable decimal strings and unaffected, but any wei-denominated value you compute from them (e.g. minAmountOut in Request Swap Verification) must be scaled with the right decimals for that chain.
A chain whose orderbook has not bootstrapped yet does not return an empty book — it returns 503 SERVICE_UNAVAILABLE. A 200 with an empty pairs array means the chain is live but currently tracks no pairs.

Alternative: On-chain Quote

For a precise quote for a specific input amount, use the on-chain quote() function with an EIP-712 signature. See the Integration Guide.

Query Parameters


Response Fields

Top-level

pairs[].PairOrderbook

bids[].OrderbookLevel / asks[].OrderbookLevel

Authorizations

X-API-KEY
string
header
required

API key issued by the Kipseli team. Required on every request. Authorization: Bearer <key> is accepted as an alternative.

Query Parameters

chainId
integer<int64>
default:8453

Chain to return the orderbook for, as a base-10 unsigned integer. Supported values: 56 (BNB Chain), 8453 (Base), 4663 (Robinhood Chain). Omit it (or pass 0) for the default chain, Base (8453).

A chain the service does not serve returns 400 UNSUPPORTED_CHAIN; a malformed value returns 422 VALIDATION_ERROR; a supported chain whose orderbook is not live yet returns 503 SERVICE_UNAVAILABLE.

Required range: x >= 0
Example:

8453

Response

Current orderbook snapshot for the selected chain

chainId
integer<int64>

The chain this orderbook belongs to — the requested chainId, or the default chain when the request omitted it. blockNumber, blockTime, and every token address below are scoped to it.

Example:

8453

blockNumber
integer<int64>

The on-chain block number at which the orderbook was last refreshed. Updates on every new block. Zero if the cache has not been populated yet.

Example:

29500000

blockTime
integer<int64>

Unix timestamp (seconds) of the block identified by blockNumber. Zero if the cache has not been populated yet.

Example:

1741737600

pairs
object[]

Orderbook for each pair configured on this chain, each quoted in the chain's quote token. Empty when the chain is live but currently tracks no pairs — a chain whose orderbook has not bootstrapped returns 503 instead.