user.trades.{kind}.{currency}.{interval}
Description
Subscribe to user trades for a specific kind, currency, and interval. This channel can receive both RFQ trades and normal trades.
Request Path And Method
wss path:
/ws/private
method:
private/subscribe
Request Example
{
"method": "private/subscribe",
"rid": 7,
"params": {
"channels": [
"user.trades.any.any.agg2"
]
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| kind | string | true | Instrument kind. Valid values: future, option, spot, future_combo, option_combo, combo (for any combo), any (for all) |
| currency | string | true | The currency symbol or "any" for all. Valid values: BTC, ETH, USDC, USDT, EURR, any |
| interval | string | true | Frequency of notifications. Events will be aggregated over this interval. Valid values: agg2, 100ms |
Notification Message
| Name | Type | Description |
|---|---|---|
| method | string | Equals to "subscription" |
| channel | string | Equals to "user.trades" |
| result | array | Detailed trade information |
| > tradeId | string | Unique trade identifier |
| > tickDirection | integer | Direction of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick) |
| > feeCurrency | string | Currency used for fee calculation |
| > api | boolean | Whether the trade was made via API |
| > orderId | string | Order identifier that generated this trade |
| > liquidity | string | Liquidity type (maker/taker) |
| > postOnly | boolean | Whether the order was post-only |
| > side | string | Trade direction (buy/sell) |
| > mmp | boolean | Whether market maker protection was triggered |
| > fee | string | Fee amount |
| > indexPrice | string | Index price at trade time |
| > price | string | Trade execution price |
| > orderType | string | Order type that generated this trade |
| > profitLoss | string | Realized profit/loss from this trade |
| > timestamp | long | Trade execution timestamp (milliseconds since Unix epoch) |
| > state | string | Trade state |
| > tradeSeq | integer | Trade sequence number |
| > reduceOnly | boolean | Whether this was a reduce-only trade |
| > amount | string | Trade amount |
| > riskReducing | boolean | Whether the trade reduces risk |
| > instrumentName | string | Instrument identifier |
| > advanced | string | (Optional) Advanced order information |
| > contracts | string | (Optional) Number of contracts |
| > quoteId | string | (Optional) Quote identifier |
| > label | string | (Optional) User-defined label |
| > blockTradeId | string | (Optional) Block trade identifier |
| > matchingId | string | (Optional) Matching identifier |
| > tradeAllocations | array | (Optional) Trade allocation details |
| >> amount | string | Allocated amount |
| >> fee | string | Allocated fee |
| >> userId | integer | User identifier |
| >> clientInfo | object | (Optional) Client information |
| >>> clientId | integer | Client identifier |
| >>> clientLinkId | integer | Client link identifier |
| >>> name | string | Client name |
| > iv | string | (Optional) Implied volatility |
| > underlyingPrice | string | (Optional) Underlying asset price |
| > blockRfqQuoteId | string | (Optional) Block RFQ quote identifier |
| > quoteSetId | string | (Optional) Quote set identifier |
| > markPrice | string | (Optional) Mark price at trade time |
| > blockRfqId | string | (Optional) Block RFQ identifier |
| > comboTradeId | string | (Optional) Combo trade identifier |
| > liquidation | string | (Optional) Liquidation type |
| > comboId | string | (Optional) Combo identifier |
| > legs | array | (Optional) Trade legs for multi-leg instruments |
| >> tradeId | string | Trade identifier for this leg |
| >> instrumentName | string | Instrument name for this leg |
| >> amount | string | Trade amount for this leg |
| >> price | string | Execution price for this leg |
| >> side | string | Trade direction for this leg (buy/sell) |
| >> timestamp | long | Execution timestamp for this leg |