Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API
books.depth

Order books

books.depth

Live bids and asks of one DeepBook pool, with mid price and spread.

Details

Endpoint
GET /v1/books/:pool/depth
Credits
3
Rate class
Light. Counts against your light requests per second.

Reads the current order book of a DeepBook v3 pool straight from the chain with a read-only call, no signature needed. Returns up to levels price levels on each side (default 20, at most 100): bids from the highest price down and asks from the lowest up, each with the decimal price (quote per base) and the total size in base coin. Also returns the best bid, best ask, mid price, spread and spread in basis points. Cached for 1 second.

Parameters

NameTypeDescription
poolrequiredstringPool object id (0x...). List them with books.list.
levelsintegerPrice levels per side, default 20.From 1 to 100.

Request

Send your key in the x-api-key header, or leave it out to use the keyless tier.

curl
curl "https://api.tide.ad/v1/books/0xe05dafb5133bcffb8d59f4e12465dc0e9faeaa05e3e342a08fe135800e3e4407/depth?levels=10" \
  -H "x-api-key: YOUR_API_KEY"
TypeScript
const res = await fetch("https://api.tide.ad/v1/books/0xe05dafb5133bcffb8d59f4e12465dc0e9faeaa05e3e342a08fe135800e3e4407/depth?levels=10", {
  headers: {
    "x-api-key": process.env.TIDE_API_KEY!,
  },
});
const data = await res.json();

Response

JSON
{
  "poolId": "0xe05dafb5133bcffb8d59f4e12465dc0e9faeaa05e3e342a08fe135800e3e4407",
  "bids": [
    {
      "price": 0.8911,
      "size": 1200,
      "total": 1200
    }
  ],
  "asks": []
}