tpslUpdates
Stream real-time TP/SL trigger order updates per block.
Every live data message includes both routing identifiers with the same value:
{"type": "tpslUpdates", "channel": "tpslUpdates"}Other payload fields are omitted above. Existing clients may continue routing on either field.
Subscribe
{
"method": "subscribe",
"subscription": {
"type": "tpslUpdates",
"coins": ["ETH", "BTC"]
}
}Parameters:
coins
string[]
No
Perp coins to subscribe to. Omit for all markets (needs tpslUpdatesAll add-on).
Per-tier coin limits: Starter 5 · Growth 50 · Scale 200. See rate-limits-user-limits-and-heartbeats.md for the full table.
Trigger orders only exist on perpetual markets. Spot and outcome markets do not have TP/SL orders, so no marketTypes filter is needed.
Unsubscribe
Update data format
Updates are streamed per-block with trigger order changes for subscribed markets:
Diff types
add
New trigger order placed (or re-opened)
All order fields (see below)
remove
Trigger order removed
oid, coin, reason
Trigger orders are immutable — there is no update diff type. An order is either open (add) or terminal (remove). If a user cancels and replaces a trigger order, you'll see a remove + add with a new oid.
Add fields
oid
int
Unique order ID
coin
string
Market symbol (e.g., "BTC", "ETH")
user
string
User address (0x...)
side
string
"B" = buy, "A" = sell
triggerPx
string
Trigger price as decimal string
limitPx
string
Limit price as decimal string
sz
string
Order size as decimal string
triggerCondition
string
Human-readable condition (e.g., "Price above 50000")
orderType
string
Order type — "Take Profit Market", "Stop Market", etc.
isPositionTpsl
bool
True if this is a position-level TP/SL (attached to a position)
reduceOnly
bool
True if reduce-only order
timestamp
int
Order creation timestamp (ms since epoch)
Remove handling
A remove diff is always terminal — drop the order from your local state. The optional reason field is informational only; you don't need to branch on it.
Common errors
Too many coins- Reduce number of coins or upgrade tierSubscribing to all markets requires permission- Needs tpslUpdatesAll add-onRate limit exceeded- Reduce subscription frequencyAuthentication failed- Check API key
Last updated