Get order book

A DEX market's buy and sell orders, added up by price. No key needed.

GET

A market's orders waiting to be filled, added up by price. Bids come best (highest) first, asks best (lowest) first, both in dollars of credit.

bInference's fresh offer is not in the asks. In the newest market it stands beside them as freshPrice, 1.000 for any size, so the best price a buyer can get there is never above 1.000.

The answer is cached for 1 second. It counts 1 weight up to depth=20 and 5 above.

No key needed. Anyone can read it.

Path parameters

  • idstringRequired

    The market's id, such as binference-2026-10-24: bInference credit that ends on that day at 00:00 UTC. GET /dex/markets lists the open ones.

Query parameters

  • depthinteger

    How many prices a side, 1 to 100. 20 when left out.

Response

  • marketstring

    The market's id.

  • seqinteger

    The market's change number. It grows with every change in the market, so a higher number is a newer book.

  • timeinteger

    When the book was read, in milliseconds.

  • bidsobject[]

    Buy orders by price, best (highest) first.

    • pricestring

      USDT per $1 of credit.

    • sizestring

      Dollars of credit in all orders at this price.

    • ordersinteger

      How many orders wait at this price.

  • asksobject[]

    Sell orders by price, best (lowest) first. bInference's fresh offer is not among them: see freshPrice.

    • pricestring

      USDT per $1 of credit.

    • sizestring

      Dollars of credit in all orders at this price.

    • ordersinteger

      How many orders wait at this price.

  • freshPricestring | null

    bInference's price for fresh credit, "1.000", in the newest market, for any size. null in the others.

Errors

Each comes as JSON, { "error": { "code", "message" } }, with a stable code to branch on.

  • invalid_depth400

    depth is not a whole number from 1 to 100.

  • unknown_parameter400

    A query parameter this endpoint does not take, or one sent twice. Send only the parameters listed here, each once and written as shown: anything else is refused before it counts toward your weight.

  • not_found404

    The DEX is not open yet.

  • unknown_market404

    No open market has this id. A market that has closed answers this too. Take the ids from GET /dex/markets.

  • rate_limited429

    This IP address used more than 1,200 weight in a minute. Wait the seconds in Retry-After, then ask again.

Request
curl "https://binference.io/api/v1/dex/markets/binference-2026-10-24/book?depth=5"
Response
{  "market": "binference-2026-10-24",  "seq": 4182,  "time": 1792173600000,  "bids": [    {      "price": "0.950",      "size": "120.00",      "orders": 3    },    {      "price": "0.948",      "size": "64.50",      "orders": 2    },    {      "price": "0.940",      "size": "210.00",      "orders": 4    }  ],  "asks": [    {      "price": "0.990",      "size": "50.00",      "orders": 1    },    {      "price": "0.995",      "size": "35.20",      "orders": 2    }  ],  "freshPrice": "1.000"}