Channel Name Schema
{subaccount_id}.trades
{subaccount_id}.tradesSubscribe to user's trades (order executions) for a given subaccount ID.
Channel Parameters
| subaccount_idintegerrequired Subaccount ID |
Notification Data
| channelstringrequired Subscribed channel name |
| dataarray of objectsrequired |
| data[].directionstringrequired Order direction enum buysell |
| data[].expected_rebatestringrequired Expected rebate for this trade |
| data[].extra_feestringrequired Extra fee in USDC added by the referring client (included in trade fee) |
| data[].index_pricestringrequired Index price of the underlying at the time of the trade |
| data[].instrument_namestringrequired Instrument name |
| data[].is_transferbooleanrequired Whether the trade was generated through private/transfer_position |
| data[].labelstringrequired Optional user-defined label for the order |
| data[].liquidity_rolestringrequired Role of the user in the trade enum makertaker |
| data[].mark_pricestringrequired Mark price of the instrument at the time of the trade |
| data[].order_idstringrequired Order ID |
| data[].quote_idstring or nullrequired Quote ID if the trade was executed via RFQ |
| data[].realized_pnlstringrequired Realized PnL for this trade |
| data[].realized_pnl_excl_feesstringrequired Realized PnL for this trade using cost accounting that excludes fees |
| data[].rfq_idstring or nullrequired RFQ ID if the trade was executed via RFQ |
| data[].subaccount_idintegerrequired Subaccount ID |
| data[].timestampintegerrequired Trade timestamp (in ms since Unix epoch) |
| data[].trade_amountstringrequired Amount filled in this trade |
| data[].trade_feestringrequired Base_fee (only takers) + unit_fee (adjusted via rebates / discounts) + extra_fee (set by referrring client)) |
| data[].trade_idstringrequired Trade ID |
| data[].trade_pricestringrequired Price at which the trade was filled |
| data[].transaction_idstringrequired The transaction id of the related settlement transaction |
| data[].tx_hashstring or nullrequired Blockchain transaction hash |
| data[].tx_statusstringrequired Blockchain transaction status enum requestedpendingsettledrevertedignoredtimed_out |
Example
Subscriptions are only available via websockets.
{request_example_javascript}{request_example_python}Notification messages on this channel will look like this:
{response_example_json}