Skip to main content
GET
/
api
/
markets
/
{marketId}
/
price
Get market price
curl --request GET \
  --url https://api-testnet.mayybee.com/api/markets/{marketId}/price
{
  "marketId": "jd7ay8vzqtcsyj48zyapp6aa9h7yfq2d",
  "tokenId": "259306054748570436...",
  "bestBid": 55,
  "bestAsk": 58,
  "spread": 3,
  "midpoint": 56.5,
  "lastUpdate": 1704067200000
}

Path Parameters

marketId
string
required

Market identifier

Query Parameters

tokenId
string
required

Token ID (YES or NO)

Response

Current price information

Current market price summary including best bid, best ask, spread, and midpoint.

marketId
string

Market identifier for this price data.

tokenId
string

ERC1155 token ID for this price data (YES or NO).

bestBid
number | null

Highest buy order price in cents. Null if no bids exist.

bestAsk
number | null

Lowest sell order price in cents. Null if no asks exist.

spread
number

Difference between best ask and best bid (ask - bid). Lower = more liquid market.

midpoint
number

Average of best bid and best ask ((bid + ask) / 2). Best estimate of 'true' price.

lastUpdate
integer

Unix timestamp (milliseconds) of last price update.