Skip to main content
GET
/
api
/
markets
/
{marketId}
/
orderbook
Get orderbook
curl --request GET \
  --url https://api-testnet.mayybee.com/api/markets/{marketId}/orderbook
{
  "marketId": "jd7ay8vzqtcsyj48zyapp6aa9h7yfq2d",
  "tokenId": "25930605474857043641926317989588861972412542680030529942514995269236952683597",
  "bids": [
    {
      "price": 55,
      "size": "100000000000000000000",
      "numOrders": 3
    },
    {
      "price": 50,
      "size": "200000000000000000000",
      "numOrders": 5
    }
  ],
  "asks": [
    {
      "price": 52,
      "size": "50000000000000000000",
      "numOrders": 2
    },
    {
      "price": 55,
      "size": "100000000000000000000",
      "numOrders": 3
    }
  ],
  "lastUpdate": 1704067200000
}

Path Parameters

marketId
string
required

Market identifier (Convex ID)

Query Parameters

tokenId
string
required

Token ID (YES or NO token). Can be hex (0x...) or decimal format.

Response

Orderbook data

Aggregated orderbook showing bids (buy orders) and asks (sell orders) at each price level.

marketId
string

Market identifier (Convex ID) this orderbook belongs to.

tokenId
string

ERC1155 token ID (decimal) for this orderbook. Each market has 2 tokens: YES and NO.

bids
object[]

Buy orders sorted by price descending (highest bid first). Represents demand.

asks
object[]

Sell orders sorted by price ascending (lowest ask first). Represents supply.

lastUpdate
integer

Unix timestamp (milliseconds) of last orderbook update. Use for cache invalidation.