Pricing and Books
Get Price
Get one price
GET
Get Price
Get the price for a market (best bid or best ask).
HTTP REQUEST
GET /<clob-endpoint>/price
Request Payload Parameters
Name | Required | Type | Description |
---|---|---|---|
token_id | yes | string | token ID to get price for |
side | yes | string | buy or sell (ask and bid) |
Response
{"price": ".512"}
Get Prices
Get the prices for a group of markets (best bid or best ask).
HTTP REQUEST
POST /<clob-endpoint>/prices
Request Payload Parameters
Name | Required | Type | Description |
---|---|---|---|
params | yes | BookParams | search params for books |
A BookParams
object is of the form:
Name | Required | Type | Description |
---|---|---|---|
token_id | yes | string | token ID of market to get book for |
side | yes | string | BUY or SELL |
Response
{[asset_id]: {[side]: price}}
Query Parameters
Token ID to get the price for.
Whether to get the buy (bid) or sell (ask) price.
Available options:
buy
, sell
Response
200
application/json
Price successfully retrieved
The response is of type object
.