OrderbookService
Get Order Book
Retrieve a spot order book depth snapshot for a symbol. Bids are ordered best price first (descending), asks are ordered best price first (ascending), and each level is returned as a [price, quantity] tuple of decimal strings.
Method
GET
Path
/v1/orderbook/{symbol}
Visibility
Public endpoint
GET
/v1/orderbook/{symbol} Request
Testnet
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/orderbook/BTC-USDT?depth=1' \ --header 'Accept: */*'
Responses
{
"asks": [
[
"0.005",
"100000"
]
],
"bids": [
[
"0.005",
"100000"
]
],
"bookSeq": "984321",
"symbol": "BTC-USDT",
"ts": 1735689600000
} symbol string
Trading pair symbol, e.g. BTC-USDT.
depth enum
Number of price levels per side. Defaults to 50 when omitted.
asks string[]
Best ask first; ascending price. Empty when there is no current liquidity.
Example
[["0.005","100000"]] bids string[]
Best bid first; descending price. Empty when there is no current liquidity.
Example
[["0.005","100000"]] bookSeq string
Monotonic book sequence for this symbol.
Example
984321 symbol string
Trading pair symbol, e.g. BTC-USDT.
Example
BTC-USDT ts integer (int64)
Snapshot timestamp as Unix epoch milliseconds.
Example
1735689600000| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |