Trade
Order/execution push on the private topic. The Notification wrapper carries a JSON payload (event order_changed_lb; grid orders use gridtrading_order).
message Notification {
string topic = 1;
ContentType content_type = 2;
DispatchType dispatch_type = 3;
bytes data = 4;
}
enum ContentType { CONTENT_UNDEFINED = 0; CONTENT_JSON = 1; CONTENT_PROTO = 2; }
Push fields
| Name | Type | Required | Description |
|---|---|---|---|
topic | string | Optional | Topic |
content_type | int32 | Optional | Content type (JSON/PROTO) |
dispatch_type | int32 | Optional | Dispatch type |
data | bytes | Optional | Payload data (order-changed) |
└ side | string | Optional | Order side (Buy/Sell) |
└ stock_name | string | Optional | Stock name |
└ submitted_quantity | string | Optional | Submitted quantity |
└ symbol | string | Optional | Order symbol |
└ order_type | string | Optional | Order type |
└ submitted_price | string | Optional | Submitted price |
└ executed_quantity | string | Optional | Executed quantity |
└ executed_price | string | Optional | Executed price |
└ order_id | string | Optional | Order id |
└ currency | string | Optional | Currency |
└ status | string | Optional | Order status |
└ submitted_at | string | Optional | Submitted time (timestamp, second) |
└ updated_at | string | Optional | Last updated time |
└ trigger_price | string | Optional | LIT / MIT order trigger price |
└ msg | string | Optional | Rejected message or remark |
└ tag | string | Optional | Order tag (Normal/GTC/Grey) |
└ trigger_status | string | Optional | Conditional order trigger status |
└ trigger_at | string | Optional | Conditional order trigger time (timestamp, second) |
└ trailing_amount | string | Optional | TSLPAMT order trailing amount |
└ trailing_percent | string | Optional | TSLPPCT order trailing percent |
└ limit_offset | string | Optional | TSLPAMT / TSLPPCT order limit offset amount |
└ account_no | string | Optional | Account no |
└ remark | string | Optional | Remark message |
└ last_share | string | Optional | Last share |
└ last_price | string | Optional | Last price |
└ multi_leg | object | Optional | Multi-leg strategy information, only pushed for multi-leg option combination orders |
└ strategy | string | Optional | Multi-leg strategy |
└ strategy_name | string | Optional | Strategy name |
└ multileg_id | string | Optional | Multi-leg combination ID |
└ code | string | Optional | Multi-leg combination code |
└ legs | object[] | Optional | Legs of the combination order |
└ symbol | string | Optional | Option symbol, use ticker.region format |
└ side | string | Optional | Order side (Buy/Sell) |
└ position | string | Optional | Position direction (LONG/SHORT) |
└ ratio_quantity | string | Optional | Leg ratio quantity |
└ strike_price | string | Optional | Strike price |
└ expire_date | string | Optional | Option expiry date, format YYYYMMDD |
└ contract_direction | string | Optional | Contract type (C=Call/P=Put) |
Response JSON example
{
"event": "order_changed_lb",
"data": {
"side": "Buy",
"stock_name": "Tencent Holdings Ltd.",
"submitted_quantity": "1000",
"symbol": "700.HK",
"order_type": "LO",
"submitted_price": "213.2",
"executed_quantity": "1000",
"executed_price": "213.2",
"order_id": "27",
"currency": "HKD",
"status": "NewStatus",
"submitted_at": "1562761893",
"updated_at": "1562761893"
}
}