Skip to main content
GET
/
trading-view
/
order-book
Get order book
curl --request GET \
  --url https://api.example.com/trading-view/order-book
{
  "base": "<string>",
  "quote": "<string>",
  "spot": {},
  "bids": [
    {}
  ],
  "asks": [
    {}
  ]
}
Returns a snapshot of the orderbook for a trading pair, including price levels on both sides and the current spot price.

Query parameters

base
string
required
Base asset identifier. Use ADA for Cardano’s native asset, or <policy_id_hex>:<asset_name_hex> for native tokens.
quote
string
required
Quote asset identifier. Same format as base.

Response

base
string
Base asset identifier (echoed from query).
quote
string
Quote asset identifier (echoed from query).
spot
DecimalPrice | null
Most recent execution price. null if no trades have occurred.
bids
PriceLevel[]
Buy-side levels, highest price first.
asks
PriceLevel[]
Sell-side levels, lowest price first.

Example request

curl "https://api.shadowbook.io/trading-view/order-book?base=0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa:4e49474854&quote=ADA"
{
  "base": "ADA",
  "quote": "279c909f348e533da5808898f87f9a14bb2c3dfbbacccd631d927a3f:534e454b",
  "spot": "0.00001",
  "bids": [
    { "price": "0.0000110", "accumulated_liquidity": 3000000000 },
    { "price": "0.0000100", "accumulated_liquidity": 1500000000 },
    { "price": "0.0000090", "accumulated_liquidity": 500000000 }
  ],
  "asks": [
    { "price": "0.0000120", "accumulated_liquidity": 2000000000 },
    { "price": "0.0000130", "accumulated_liquidity": 800000000 }
  ]
}