Get Single Book

Get a order book summary for a market.

HTTP REQUEST

GET /<clob-endpoint>/book

Request Parameters

NameRequiredTypeDescription
token_idyesstringtoken ID of market to get book for

Response Format

NameTypeDescription
marketstringcondition id
asset_idstringid of the asset/token
hashstringhash summary of the orderbook content
timestampstringunix timestamp the current book generation in milliseconds (1/1,000 second)
bidsOrderSummary[]list of bid levels
asksOrderSummary[]list of ask levels

A OrderSummary object is of the form:

NameTypeDescription
pricestringprice
sizestringsize
print(
    client.get_order_book(
        "71321045679252212594626385532706912750332728571942532289631379312455583992563"
    )
)

Get Books

Get order book summaries for a set of markets.

HTTP REQUEST

POST /<clob-endpoint>/books

Request Parameters

NameRequiredTypeDescription
paramsyesBookParamssearch params for books

A BookParams object is of the form:

NameRequiredTypeDescription
token_idyesstringtoken ID of market to get book for

Response Format

NameTypeDescription
-OrderBook[]list orderbooks

A OrderBook object is of the form:

NameTypeDescription
marketstringcondition id
asset_idstringid of the asset/token
hashstringhash summary of the orderbook content
timestampstringunix timestamp the current book generation in milliseconds (1/1,000 second)
bidsOrderSummary[]list of bid levels
asksOrderSummary[]list of ask levels

A OrderSummary object is of the form:

NameTypeDescription
pricestringprice
sizestringsize
print(
    client.get_order_books(
        params=[
            BookParams(
                token_id="71321045679252212594626385532706912750332728571942532289631379312455583992563"
            ),
            BookParams(
                token_id="52114319501245915516055106046884209969926127482827954674443846427813813222426"
            ),
        ]
    )
)