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
}Retrieve the current orderbook for a market and token. Returns aggregated bids and asks with price levels.
Note: TokenId should be the decimal representation of the ERC1155 token ID.
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
}Market identifier (Convex ID)
Token ID (YES or NO token). Can be hex (0x...) or decimal format.
Orderbook data
Aggregated orderbook showing bids (buy orders) and asks (sell orders) at each price level.
Market identifier (Convex ID) this orderbook belongs to.
ERC1155 token ID (decimal) for this orderbook. Each market has 2 tokens: YES and NO.
Buy orders sorted by price descending (highest bid first). Represents demand.
Show child attributes
Sell orders sorted by price ascending (lowest ask first). Represents supply.
Show child attributes
Unix timestamp (milliseconds) of last orderbook update. Use for cache invalidation.