tpslBook
Get a snapshot of all active TP/SL trigger orders.
💧 New endpoint - this endpoint is not a part of original Hyperliquid API and is added by us for builder convenience.
Overview
The tpslBook endpoint returns a snapshot of all untriggered TP/SL orders (take profit, stop loss) across all markets. These are orders that exist on Hyperliquid but have not yet been triggered — they are not visible in the L4 orderbook.
Key details:
~110K trigger orders across ~330 markets (typical)
Updated in real-time (per-block)
Includes user address, trigger price, size, and order type for each order
Use with tpslUpdates WebSocket stream for real-time sync
Request
Endpoint: POST /info
All markets:
{
"type": "tpslBook"
}Specific coins:
{
"type": "tpslBook",
"coins": ["BTC", "ETH"]
}Parameters:
coins
string[]
No
Specific markets to fetch. Omit for all markets.
Response
Content-Type: application/octet-stream
The response is a binary multi-zstd payload (~4.2 MB for all markets, vs ~31 MB if served as JSON). Each market is compressed independently and concatenated with the same outer framing as l4Book. The SDK's TpslClient decodes this transparently — see Streaming sync below.
Response headers:
Content-Type
application/octet-stream
x-payload-format
multi-zstd
x-compression
inner-zstd
Logical content (after decode):
Response fields
height
int
Block height at the time of the snapshot
timestamp_ms
int
Block timestamp (ms since epoch)
markets
array
Array of markets with trigger orders
markets[].coin
string
Market symbol
markets[].orders
array
Trigger orders in this market
Order fields are the same as the tpslUpdates add diff — see that page for full field descriptions.
Wire format (for non-SDK decoders)
All integers are little-endian. The SDK's tpsl_formats.py is a ~100-line reference decoder.
Outer framing:
count
4
Number of market blobs that follow
height
8
Block height of the snapshot
timestamp_ms
8
Block timestamp (ms since epoch)
blob_len
4
Length in bytes of the next compressed blob
blob_bytes
blob_len
zstd-compressed market payload (see below)
Markets are sorted by coin name. Coins with no trigger orders are omitted.
Per-market blob:
Each blob is zstd(msgpack([coin, [order_tuples...]])). The msgpack uses positional arrays (not maps) for compactness — rmp_serde::to_vec on the Rust side. Each order is a 12-element array in struct-declaration order:
0
oid
uint64
Order ID
1
coin
string
Market symbol (matches outer coin)
2
user
string
User address (0x...)
3
side
string
"A" (sell) or "B" (buy)
4
trigger_px
string
Trigger price, decimal string
5
limit_px
string
Limit price, decimal string
6
sz
string
Size, decimal string
7
trigger_condition
string
Human-readable condition
8
order_type
string
E.g. "Take Profit Market", "Stop Market"
9
is_position_tpsl
bool
true if attached to a position
10
reduce_only
bool
true if reduce-only
11
timestamp
uint64
Order creation timestamp (ms)
Streaming sync
To maintain a real-time view of trigger orders:
Subscribe to tpslUpdates WebSocket stream
Fetch
tpslBooksnapshot — note theheightApply buffered WS updates where
height > snapshot_heightContinue applying live updates
See the TP/SL heatmap streaming guide for details.
Rate limits
10 requests per 5 minutes
Common errors
403: Permission denied - check API key
429: Rate limit exceeded
503: Service unavailable - heatmap service is bootstrapping
Last updated