Filled trade notification

When a new trade is filled after subscription to Websocket filled trades, the server will automatically push it to the client, and this message does not require a reply.

Name
Type
Description

trade_id

string

Trade id

maker_user_id

string

Maker's user id

taker_user_id

string

Taker's user id

maker_user_name

string

Maker's user name

taker_user_name

string

Taker's user name

currency

string

BTC / ETH

quantity

float

For single leg, quantity of the leg; For multileg, quantity of the combo.

direction

string

Taker's direction: buy/sell

price

float

Option value for single leg, net option value for multilegs (taking selling Bull Spread as an example, the meaning of bidding this price is the difference between the leg 1 sell atm call say 0.0500, and leg 2 buy otm call say 0.0100, net = -0.0500+0.0100 = -0.0400. Taker bid a minus price thus net collecting premiums. Maker ask a minus price thus net paying premiums.).

mark_price

float

mark price of combo

kind

string

Kind:option/future/spot

combo_type

string

Combo Type

ref_index_price

float

Index price at the time of transaction

ref_inquiry_id

string

Associated inquiry id

ref_quote_id

string

Associated quote id

create_at

datetime

Order filling time (UTC)

summary_greeks

json

summary greeks of taker,maker needs to be negated

legs.instrument

string

Contract name

legs.size

float

For single leg, legs.size is 1. For multilegs, legs.size is the quantity of other legs divided by the quantity of smallest leg (if the quantities of leg1 and leg2 are 50 and 30, then legs.size of leg1 is 1.667, legs.size of leg2 is 1).

legs.price

float

Unit price of each contract

legs.direction

string

The direction of single legs: buy/sell

legs.mark_price

float

Mark price

legs.bid_price

float

Screen bid price

legs.ask_price

float

Screen ask price

// push message
{
    "id" : 1,
    "jsonrpc" : 2.0,
    "method" : "subscription",
    "params" : {
        "channel":"trade.BTC",
        "data":{
            "trade_id":"xxxxxxxxxxx",
            "maker_user_id":"1231231",
            "taker_user_id":"4563452",
            "maker_user_name":"COOK",
            "taker_user_name":"Ryan",
            "currency":"BTC",
            "quantity":25,
            "direction":"buy",
            "price":0.0031,
            "ref_index_price":24012.2,
            "ref_inquiry_id":"aaaaaaa",
            "ref_quote_id":"bbbbbbb",
            "create_at":"2023-08-19 12:00:00",
            "summary_greeks":{
                "delta":12.2,
                "gamma":-0.01201,
                "vega":132,
                "theta":23
            },
            "legs":[
                {
                    "instrument":"BTC-25NOV22-19000-P",
                    "size":1,
                    "price":0.0031,
                    "direction":"buy",
                    "mark_price":0.003,
                    "bid_price":0.0025,
                    "ask_price":0.0035
                }
            ]
        }
    }
}

Last updated