5.2. 持仓管理

@abc.abstractmethod
def get_position_list(self, security_type: str = "STK,OPT,WAR,IOPT,FUT") -> HttpResponse:
    """
    持仓查询
    :param security_type: 证券类型,多个类型用逗号分隔,参见数据字典:SecurityType
    :return:
        {
            "msg": null,
            "result_code": "60000",
            "result_data": [
                {
                    "account_id": "DU1234567",
                    "average_price": 176.4124,
                    "exchange": "USEX",
                    "market_price": 152.55,
                    "position": 378753,
                    "realized_pnl": 0.0,
                    "security_type": "STK",
                    "symbol": "EL"
                },
                {
                    "account_id": "DU1234567",
                    "average_price": 900.0016,
                    "exchange": "USEX",
                    "market_price": 892.43,
                    "position": 100,
                    "realized_pnl": 0.0,
                    "security_type": "STK",
                    "symbol": "NVDA"
                }
            ]
        }
    """
    pass

请求参数

参数名

类型

描述

是否必须

默认值

security_type

string

证券类型,多个类型逗号分隔 SecurityType

返回值

参数名

类型

描述

是否必须

默认值

account_id

string

账户ID

average_price

float

持仓均价

market_price

float

市价

position

int

持仓数量

realized_pnl

float

已实现盈亏

security_type

string

证券类型 SecurityType

symbol

string

证券代码

5.2.1. 示例