Pricing and Books
Get Price(s)
Get one or multiple prices
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 |
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}}