SUBSCRIBE Fills

SUB wss://test-api.synquote.com/ws

Receive notifications about order fills.

SUBSCRIBE

HEADER PARAMS
msg_type string required
Message type: add_subscriptions
id number required
The ID of the request. This is returned in the response header.
version integer required
Version number: 1
BODY PARAMS
channel array of strings required
trading.fills.{account_id}.{instrument_id}
Wildcards are supported, e.g. trading.fills.{account_id}.* can be used to receive notifications about all instruments.
Example
[
  {
    "msg_type":"add_subscriptions",
    "id": 1002,
    "version": 1
  },
  {
    "channels": ["trading.fills.0x9f58498b98348b9bfbe53f0e18aa818a4be0ae49.ETH-PERPETUAL"]
  }
]

NOTIFICATION

order object
account_id string
The account address which placed the order.
transaction_ts string
The time the order was received by the system in UNIX epoch nanoseconds.
client_order_id string
The client-assigned order ID. Set automatically to order_id if absent.
execution_type string
The execution type of the order. Can be post_only or allow_cross.
expiration string
The expiration time of the order in UNIX epoch seconds.
initial_size string
The initial size of the order.
instrument_id string
The instrument of the order.
limit_price string
The limit price of the order.
nonce string
Used to make orders with otherwise identical signed fields unique.
order_id string
The unique ID of the order.
order_type string
The order type of the order. Can be limit, market, take_profit, or stop.
remaining_size string
The remaining unfilled portion of the order.
side string
The side of the order.
signature string
Signed order fields which are submitted to smart contracts for processing.
time_in_force string
The time in force of the order. Can be gtc, gte, ioc, or fok.
reduce_only string
Whether the order is reduce only.
trigger_price string
The trigger price of the order. Only present for take_profit and stop orders.
updates array of objects
event_type string
The type of event. Can be new, cancel, or fill.
transaction_ts string
The time the event occurred.
fill_price string
The price of the fill.
fill_size string
The size of the fill.
fill_total_fee string
The total fee of the fill.
is_maker boolean
Whether the fill was a maker order.
is_liquidation boolean
Whether the fill was a liquidation.
trade_pnl string
The realized profit and loss of the fill.
market_seqno string
The market sequence number of the fill. A monotonic sequence number updated for each book event. e.g. a fill, cancel, etc.
prev_order_type string
The original order type before it was triggered into a new state. This field will differ from order_type if the order transitioned to a different type upon triggering a condition (e.g., a stop order converting to a market order). If no such transition occurred, this field will match order_type.
trade_id string
The unique ID of the trade.
Example
[
  {
    "msg_type":"trading.fills.0x9f58498b98348b9bfbe53f0e18aa818a4be0ae49.ETH-PERPETUAL",
    "id": 4456,
    "version": 1
  },
  {
    "order": {
      "account_id": "0x9f58498b98348b9bfbe53f0e18aa818a4be0ae49",
      "transaction_ts": "1714629115912737987",
      "client_order_id": "9306712610120155944",
      "execution_type": "allow_cross",
      "expiration": "1723269115",
      "initial_size": "10",
      "instrument_id": "ETH-PERPETUAL",
      "limit_price": "0",
      "nonce": "1714629115448",
      "order_id": "9306712610120155944",
      "order_type": "market",
      "remaining_size": "0",
      "side": "sell",
      "signature": "0x89bdc6fcdd6434ebaa84a4f6f9f5913d3a3255ab2a53d3b9bdff2302fb3a3c6b1707256b364018d098c9b4d28d6799f8e322bbcc35f9d0e70f1310ec4d5497a01b",
      "time_in_force": "fok",
      "reduce_only": false,
      "prev_order_type": "market"
    },
    "updates": [
      {
        "event_type": "fill",
        "transaction_ts": "1714629115914498187",
        "fill_price": "2915.1",
        "fill_size": "10",
        "fill_total_fee": "1.25",
        "is_maker": false,
        "is_liquidation": false,
        "trade_pnl": "20.01",
        "market_seqno": 123457,
        "trade_id": "11416748077714502636"
      }
    ]
  }
]