Overview
Subscribe touserFills to receive real-time notifications when your orders are executed (filled).
Subscribe
Request Body
| Parameter | Type | Description |
|---|---|---|
method* | string | Must be "subscribe" |
subscription* | object | See below |
subscription.type* | string | Must be "userFills" |
subscription.user* | string | Your wallet address (lowercase), e.g., "0x742d35cc6634c0532925a3b844bc9e7595f0beb" |
Response
Subscription Confirmation:Fill Fields
| Field | Type | Description |
|---|---|---|
coin | string | Asset symbol (BTC, ETH, etc.) |
px | string | Execution price |
sz | string | Fill size |
side | string | "B" (buy) or "A" (ask/sell) |
time | number | Timestamp in milliseconds |
startPosition | string | Position size before fill |
dir | string | Direction (e.g., “Open Long”, “Close Short”) |
closedPnl | string | Realized PnL from this fill |
hash | string | Transaction hash |
oid | number | Order ID |
crossed | boolean | Whether order crossed the spread |
fee | string | Fee charged |
tid | number | Trade ID |
feeToken | string | Token used for fee payment |
Unsubscribe
Notes
- Fills are sent in real-time as they occur
- Multiple fills may arrive in a single message
- User address must be lowercase
closedPnlshows realized profit/loss for position-reducing fills