4.3. 订单查询(列表)

@abc.abstractmethod
def get_order_list(self, page: int = 1, size: int = 10, status: str = None,
                   security_type: str = "STK,OPT,WAR,IOPT,FUT") -> HttpResponse:
    """
    :param page: 页码
    :param size: 每页大小
    :param status: 订单状态
    :param security_type: 证券类型,多个类型用逗号分隔,参见数据字典:SecurityType
    :return:
        {
            "msg": null,
            "result_code": "60000",
            "result_data": {
                "count": 3,
                "items": [
                {
                    "account_id": "DU123456",
                    "average_price": 0.0,
                    "children": null,
                    "currency": "HKD",
                    "exchange": "HKEX",
                    "filled_quantity": 0,
                    "group_id": null,
                    "id": "",
                    "memo": "",
                    "order_time": 1711419658000,
                    "order_type": "STOP_LIMIT",
                    "parent": null,
                    "price": 100.0,
                    "quantity": 100,
                    "rth": true,
                    "secondary_order_id": "004c4d6b.000130f7.66010d09.0002",
                    "security_type": "STK",
                    "side": "BUY",
                    "snb_order_id": "5588468353849584",
                    "status": "WITHDRAWED",
                    "stop_price": null,
                    "symbol": "00700",
                    "tif": "DAY"
                },
                {
                    "account_id": "DU123456",
                    "average_price": 0.0,
                    "children": null,
                    "currency": "HKD",
                    "exchange": "HKEX",
                    "filled_quantity": 0,
                    "group_id": null,
                    "id": "1711419657579",
                    "memo": "",
                    "order_time": 1711419658000,
                    "order_type": "STOP_LIMIT",
                    "parent": null,
                    "price": 100.0,
                    "quantity": 100,
                    "rth": true,
                    "secondary_order_id": "004c4d6b.000130f7.66010d09.0002",
                    "security_type": "STK",
                    "side": "BUY",
                    "snb_order_id": "5588456391694560",
                    "status": "WITHDRAWED",
                    "stop_price": null,
                    "symbol": "00700",
                    "tif": "DAY"
                },
                {
                    "account_id": "DU123456",
                    "average_price": 0.0,
                    "children": null,
                    "currency": "HKD",
                    "exchange": "HKEX",
                    "filled_quantity": 0,
                    "group_id": null,
                    "id": "1711361650250",
                    "memo": "委托单已过期",
                    "order_time": 1711361650000,
                    "order_type": "STOP_LIMIT",
                    "parent": null,
                    "price": 100.0,
                    "quantity": 100,
                    "rth": true,
                    "secondary_order_id": "004c4d6b.000130f7.6600fbf3.0001",
                    "security_type": "STK",
                    "side": "BUY",
                    "snb_order_id": "5587483178948816",
                    "status": "EXPIRED",
                    "stop_price": null,
                    "symbol": "00700",
                    "tif": "DAY"
                }
                ],
                "page": 1,
                "size": 10
            }
        }
    """
    pass

请求参数

参数名

类型

描述

是否必须

默认值

page

int

页码

1

size

int

每页大小

10

status

string

订单状态 OrderStatus(查询条件)

security_type

string

证券类型,多个类型用逗号分隔,参见数据字典:SecurityType

STK,OPT,WAR,IOPT,FUT

返回值

参数名

类型

描述

是否必须

默认值

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.3.1. 示例