Channel Name Schema
{subaccount_id}.trades.{tx_status}
{subaccount_id}.trades.{tx_status}Subscribe to user's trade settlement for a given subaccount ID.
Channel Parameters
|
subaccount_id
integer required Subaccount ID |
|
tx_status
string required Transaction status ( settled or reverted)enum settled reverted timed_out
|
Notification Data
|
channel
string required Subscribed channel name |
| data array of objects required |
|
data[].
direction
string required Order direction enum buy sell
|
|
data[].
expected_rebate
string required Expected rebate for this trade |
|
data[].
extra_fee
string required Extra fee in USDC added by the referring client (included in trade fee) |
|
data[].
index_price
string required Index price of the underlying at the time of the trade |
|
data[].
instrument_name
string required Instrument name |
|
data[].
is_transfer
boolean required Whether the trade was generated through private/transfer_position
|
|
data[].
label
string required Optional user-defined label for the order |
|
data[].
liquidity_role
string required Role of the user in the trade enum maker taker
|
|
data[].
mark_price
string required Mark price of the instrument at the time of the trade |
|
data[].
order_id
string required Order ID |
|
data[].
quote_id
string or null required Quote ID if the trade was executed via RFQ |
|
data[].
realized_pnl
string required Realized PnL for this trade |
|
data[].
realized_pnl_excl_fees
string required Realized PnL for this trade using cost accounting that excludes fees |
|
data[].
rfq_id
string or null required RFQ ID if the trade was executed via RFQ |
|
data[].
subaccount_id
integer required Subaccount ID |
|
data[].
timestamp
integer required Trade timestamp (in ms since Unix epoch) |
|
data[].
trade_amount
string required Amount filled in this trade |
|
data[].
trade_fee
string required Base_fee (only takers) + unit_fee (adjusted via rebates / discounts) + extra_fee (set by referrring client)) |
|
data[].
trade_id
string required Trade ID |
|
data[].
trade_price
string required Price at which the trade was filled |
|
data[].
transaction_id
string required The transaction id of the related settlement transaction |
|
data[].
tx_hash
string or null required Blockchain transaction hash |
|
data[].
tx_status
string required Blockchain transaction status enum requested pending settled reverted ignored timed_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}