4.2. 订单查询(单条)

@abc.abstractmethod
def get_order_by_id(self, order_id: str):
    """
    :param order_id: 订单 ID
    :return:
        {
            "msg": null,
            "result_code": "60000",
            "result_data": {
                "account_id": "DU1234567",
                "average_price": 0.0,
                "children": null,
                "currency": "HKD",
                "exchange": "HKEX",
                "filled_quantity": 0,
                "group_id": null,
                "id": "1757579",
                "memo": "",
                "order_time": 1611419658000,
                "order_type": "STOP_LIMIT",
                "parent": null,
                "price": 100.0,
                "quantity": 100,
                "rth": true,
                "secondary_order_id": "004c4dab.000130a7.6601ad09.0002",
                "security_type": "STK",
                "side": "BUY",
                "snb_order_id": "1234567",
                "status": "WITHDRAWED",
                "stop_price": null,
                "symbol": "00700",
                "tif": "DAY"
            }
        }
    """
    pass

请求参数

参数名

类型

描述

是否必须

默认值

order_id

string

订单ID

返回值

参数名

类型

描述

是否必须

默认值

account_id

string

账户ID

average_price

float

平均价格

children

list

子订单列表

currency

string

货币类型 Currency

exchange

string

交易所

filled_quantity

int

已成交数量

group_id

string

组ID

id

string

订单ID

memo

string

异常信息

order_time

int

下单时间戳

order_type

string

订单类型 OrderType

parent

string

父订单ID

price

float

价格

quantity

int

数量

rth

bool

是否只在交易时间内有效

secondary_order_id

string

第三方订单ID

security_type

string

证券类型 SecurityType

side

string

买卖方向 OrderSide

snb_order_id

string

第三方订单ID

status

string

订单状态 OrderStatus

stop_price

float

触发价格

symbol

string

证券代码

tif

string

订单有效期 TimeInForce

4.2.1. 示例