HomeDocumentationAPI Reference
Log In
API Reference

Trades (Instrument Type) (Currency) (Tx Status)

Channel Name Schema

trades.{instrument_type}.{currency}.{tx_status}

Subscribe to the status on on-chain trade settlement events for a given instrument type and currency.

Channel Parameters

currencystringrequired
Currency
instrument_typestringrequired
Instrument type
enum erc20optionperp
tx_statusstringrequired
Transaction status
enum settledrevertedtimed_out

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[].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[].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
Fee for this trade
data[].trade_idstringrequired
Trade ID
data[].trade_pricestringrequired
Price at which the trade was filled
data[].tx_hashstringrequired
Blockchain transaction hash
data[].tx_statusstringrequired
Blockchain transaction status
enum settledrevertedtimed_out
data[].walletstringrequired
Wallet address (owner) of the subaccount

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}