Interface: AdvTradeGlobalWSUserTrade
WS examples use booleans and null here, despite string fields in the shared schema.
Extends
Omit<AdvTradeGlobalUserTrade,"post_only"|"reduce_only"|"matching_id"|"legs">
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
advanced? | "usd" | "implv" | Advanced type of user order: "usd" or "implv" (only for options; omitted if not applicable) | AdvTradeGlobalUserTrade.advanced |
amount | number | Trade size. Use base-coin units for spot, options, and linear instruments, including linear perpetuals; use USD for inverse futures and inverse perpetuals. | AdvTradeGlobalUserTrade.amount |
api? | boolean | true if user order was created with API | AdvTradeGlobalUserTrade.api |
block_rfq_id? | number | ID of the Block RFQ - when trade was part of the Block RFQ | AdvTradeGlobalUserTrade.block_rfq_id |
block_rfq_quote_id? | number | ID of the Block RFQ quote - when trade was part of the Block RFQ | AdvTradeGlobalUserTrade.block_rfq_quote_id |
block_trade_id? | string | Block trade id - when trade was part of a block trade | AdvTradeGlobalUserTrade.block_trade_id |
block_trade_leg_count? | number | Block trade leg count - when trade was part of a block trade | AdvTradeGlobalUserTrade.block_trade_leg_count |
combo_id? | string | Optional field containing combo instrument name if the trade is a combo trade | AdvTradeGlobalUserTrade.combo_id |
combo_trade_id? | string | Optional field containing combo trade identifier if the trade is a combo trade | AdvTradeGlobalUserTrade.combo_trade_id |
contracts? | number | Trade size in contract units (optional, may be absent in historical trades) | AdvTradeGlobalUserTrade.contracts |
direction | AdvTradeGlobalDirection | Trade direction of the taker | AdvTradeGlobalUserTrade.direction |
fee | number | User's fee in units of the specified fee_currency | AdvTradeGlobalUserTrade.fee |
fee_currency | string | Currency, i.e "BTC", "ETH", "USDC" | AdvTradeGlobalUserTrade.fee_currency |
index_price | number | Index Price at the moment of trade | AdvTradeGlobalUserTrade.index_price |
instrument_name | string | Unique instrument identifier | AdvTradeGlobalUserTrade.instrument_name |
isolated? | boolean | Flag indicating whether the trade belongs to an isolated margin subaccount. Present and true on isolated trades only. | AdvTradeGlobalUserTrade.isolated |
iv? | number | Option implied volatility for the price (Option only) | AdvTradeGlobalUserTrade.iv |
label? | string | User defined label (presented only when previously set for order by user) | AdvTradeGlobalUserTrade.label |
legs? | AdvTradeGlobalWSUserTrade[] | - | - |
liquidation? | "M" | "T" | "MT" | Optional field (only for trades caused by liquidation): "M" when maker side of trade was under liquidation, "T" when taker side was under liquidation, "MT" when both sides of trade were under liquidation | AdvTradeGlobalUserTrade.liquidation |
liquidity? | "M" | "T" | Describes what was role of users order: "M" when it was maker order, "T" when it was taker order | AdvTradeGlobalUserTrade.liquidity |
main_uid? | number | User identifier for the owning main account. Present on isolated trades only. | AdvTradeGlobalUserTrade.main_uid |
mark_price | number | Mark Price at the moment of trade | AdvTradeGlobalUserTrade.mark_price |
matching_id | string | null | - | - |
mmp? | boolean | true if user order is MMP | AdvTradeGlobalUserTrade.mmp |
order_id | string | Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade | AdvTradeGlobalUserTrade.order_id |
order_type? | "limit" | "market" | "liquidation" | Order type: "limit", "market", or "liquidation" | AdvTradeGlobalUserTrade.order_type |
original_order_type? | AdvTradeGlobalOriginalOrderType | Original API order type when an order is represented internally as a limit order. For example, Starbase market orders use "limit" as order_type with "market" in this optional field. | AdvTradeGlobalUserTrade.original_order_type |
post_only? | boolean | - | - |
price | number | The price of the trade | AdvTradeGlobalUserTrade.price |
profit_loss? | number | Profit and loss in base currency. | AdvTradeGlobalUserTrade.profit_loss |
quote_id? | string | QuoteID of the user order (optional, present only for orders placed with private/mass_quote) | AdvTradeGlobalUserTrade.quote_id |
quote_set_id? | string | QuoteSet of the user order (optional, present only for orders placed with private/mass_quote) | AdvTradeGlobalUserTrade.quote_set_id |
reduce_only? | boolean | - | - |
risk_reducing? | boolean | true if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users) | AdvTradeGlobalUserTrade.risk_reducing |
starbase_client_order_id? | string | Client order id of the user's own order (maker or taker side) submitted directly to Starbase via direct access; not returned for orders placed through the Deribit API; for self-trades this is the taker order's client order id | AdvTradeGlobalUserTrade.starbase_client_order_id |
starbase_match_id? | number | Optional field containing the Starbase match identifier (present only for trades matched via Starbase) | AdvTradeGlobalUserTrade.starbase_match_id |
starbase_order_id? | number | Raw Starbase order id of the user's order, in Starbase's own (non currency-prefixed) id namespace (present only for trades matched in Starbase) | AdvTradeGlobalUserTrade.starbase_order_id |
starbase_timestamp? | number | Optional field: the Starbase causal timestamp of the trade, in nanoseconds since the UNIX epoch (present only for trades matched in Starbase) | AdvTradeGlobalUserTrade.starbase_timestamp |
state | AdvTradeGlobalOrderStateInUserTrade | Order state: "open", "filled", "rejected", "cancelled", "untriggered" or "archive" (if order was archived) | AdvTradeGlobalUserTrade.state |
tick_direction | number | Direction of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick). | AdvTradeGlobalUserTrade.tick_direction |
timestamp | number | The timestamp of the trade (milliseconds since the UNIX epoch) | AdvTradeGlobalUserTrade.timestamp |
trade_allocations? | AdvTradeGlobalTradeAllocations[] | List of allocations for Block RFQ pre-allocation. Each allocation specifies user_id, amount, and fee for the allocated part of the trade. For broker client allocations, a client_info object will be included. | AdvTradeGlobalUserTrade.trade_allocations |
trade_id | string | Unique (per currency) trade identifier | AdvTradeGlobalUserTrade.trade_id |
trade_seq | number | The sequence number of the trade within instrument | AdvTradeGlobalUserTrade.trade_seq |
underlying_price? | number | Underlying price for implied volatility calculations (Options only) | AdvTradeGlobalUserTrade.underlying_price |
user_id? | number | User identifier for the account that executed the trade. For isolated trades, this is the subaccount ID. | AdvTradeGlobalUserTrade.user_id |