For the complete documentation index, see llms.txt. This page is also available as Markdown.

Execution Reports

Real-time order and account event notifications via WebSocket

Execution reports are automatically streamed after calling subscribeTrading. All execution reports use the same wrapper format:

{
  "type": "executionReport",
  ...
}

Note: Execution reports echo back the signatures sent in requests. The signature.payload field contains the hex-encoded payload with type discriminator that was originally submitted (see Signatures for payload format details).

Execution reports provide:

  1. Resting order snapshot

    1. Initial snapshot - All resting orders as OrderStatus messages. The snapshot contains all active, pending, partially filled, and suspended orders for the account.

  2. Real-time updates - Ongoing execution reports

    1. Order status changes (new, filled, cancelled, etc.)

    2. Trade execution notifications

    3. Account events (deposits, withdrawals, leverage updates, liquidations, funding)


Message Types

Execution reports contain a messageType field indicating the event type:

Order Events

Message Type
Description

Add

Order accepted and added to book

Executed

Order partially or fully filled

Cancelled

Order cancelled

Modified

Order replaced

Suspended

Stop order waiting for trigger

OrderStatus

Order snapshot (sent during initial subscription)

TradeReport

Trade execution details

TradeCancel

Trade cancellation

Account Events

Message Type
Description

DepositMargin

Collateral deposit

WithdrawMargin

Collateral withdrawal

TransferMargin

Cross ↔ isolated margin transfer

UpdateLeverage

Leverage update

FundingRates

Funding rate payment

Liquidation

Position liquidation

ManualLiquidation

Manual liquidation / ADL execution


Order Execution Reports

Add

Order accepted and added to order book.

Executed

Order partially or fully filled.

Field
Description

filledQuantity

Total filled quantity (cumulative)

filledPrice

Weighted average filled price

lastFilledQuantity

Quantity filled in this execution

lastFilledPrice

Price of this execution

makerTaker

Maker or Taker

matchId

Unique match identifier

Cancelled

Order cancelled (by user or system).

Field
Description

cancelReason

Reason for cancellation

cancelledQuantity

Quantity cancelled in this event

Modified

Order replaced with new parameters.

Suspended

Stop order waiting for trigger price.

OrderStatus

Order snapshot (sent during initial subscription).

For a resting SL/TP leg, the snapshot also carries closePosition:

Order Status Values:

  • Active - Order resting in order book

  • Suspended - Stop order awaiting trigger

  • Executed - Order executed (partially or fully filled)

  • Cancelled - Order cancelled

  • Pending - Order accepted, awaiting processing

  • Ended - Order is no longer active (expired or otherwise terminated)

TradeReport

Report sent for every trade.

TradeCancel

Trade busted because its on-chain settlement failed (dropped or reverted). The fill is reversed.


Account Event Reports

DepositMargin

Collateral deposit event.

WithdrawMargin

Collateral withdrawal event.

TransferMargin

Cross ↔ isolated margin transfer event.

direction is crossToIsolated or isolatedToCross. A failed transfer carries status: "failed" and a reason field instead of transactionHash.

UpdateLeverage

Leverage update event.

Note: leverage value is leverage × 100 (e.g., 1000 = 10x leverage)

FundingRates

Funding rate payment event.

Liquidation

Position liquidation event.

Field
Type
Description

instrument

string

Instrument being liquidated

ManualLiquidation

Manual liquidation or ADL (auto-deleveraging) execution event.

Field
Type
Description

matchId

u64

Match identifier for the liquidation fill

status

string

Transaction status (see below)

reason

string

(Optional) Reason for the liquidation

transactionHash

string

(Optional) On-chain transaction hash


Transaction Status

Account events include a status field:

Status
Description

submitted

Operation submitted, pending processing

settled

Operation completed successfully

failed

Operation failed


Common Fields

All execution reports include:

Field
Type
Description

type

string

Always "executionReport"

messageType

string

Event type (see tables above)

eventTimestamp

i64

Event timestamp (Unix nanoseconds)

Order events include:

Field
Type
Description

side

string

Buy or Sell

instrument

string

Instrument symbol

orderId

u64

Exchange order ID

traderOrderId

u64

(Optional) Your client order ID. Omitted for system-generated orders (e.g. liquidations), which have no client ID

quantity

string

Order quantity

price

string

Order price

reduceOnly

boolean

(Optional) Whether the order was signed reduce-only. Omitted when the report carries no order payload, so absent means unknown, not false

closePosition

boolean

(Optional) SL/TP only: true = managed (auto-syncs to position size), false = unmanaged (fixed qty)

signature

Object

(Optional) Original signed payload echoed back. See Signatures for format

Note: reduceOnly tells you why a resting order changed size or was cancelled on its own — a reduce-only order is kept in step with your position. See Reduce-Only Orders.

Note: The signature field is included in Add, Executed, Cancelled, Modified, and Suspended messages to provide cryptographic proof of the original order. It is also included in OrderStatus snapshots, and omitted from TradeReport and TradeCancel messages.


Last updated