65 浏览
0

{‘CZCE.PRT SF611&SF611C6900’: <tqsdk.objs.Position object at 0x0000005BC0EAA160>, D({‘exchange_id’: ‘CZCE’, ‘instrument_id’: ‘PRT SF611&SF611C6900’, ‘pos_long_his’: 2, ‘pos_long_today’: 0, ‘pos_short_his’: 0, ‘pos_short_today’: 0, ‘volume_long_today’: 0, ‘volume_long_his’: 2, ‘volume_long’: 2, ‘volume_long_frozen_today’: 0, ‘volume_long_frozen_his’: 0, ‘volume_long_frozen’: 0, ‘volume_short_today’: 0, ‘volume_short_his’: 0, ‘volume_short’: 0, ‘volume_short_frozen_today’: 0, ‘volume_short_frozen_his’: 0, ‘volume_short_frozen’: 0, ‘open_price_long’: nan, ‘open_price_short’: nan, ‘open_cost_long’: 0, ‘open_cost_short’: nan, ‘position_price_long’: nan, ‘position_price_short’: nan, ‘position_cost_long’: 0, ‘position_cost_short’: nan, ‘float_profit_long’: nan, ‘float_profit_short’: nan, ‘float_profit’: nan, ‘position_profit_long’: nan, ‘position_profit_short’: nan, ‘position_profit’: nan, ‘margin_long’: 5984.8, ‘margin_short’: nan, ‘margin’: 5984.8, ‘market_value_long’: nan, ‘market_value_short’: nan, ‘market_value’: nan, ‘pos’: 2, ‘pos_long’: 2, ‘pos_short’: 0, ‘last_price’: ‘-‘, ‘margin_long_his’: ‘-‘, ‘margin_long_today’: 5984.8, ‘margin_short_his’: ‘-‘, ‘margin_short_today’: ‘-‘, ‘market_status’: 1, ‘open_cost_long_his’: ‘-‘, ‘open_cost_long_today’: 0, ‘open_cost_short_his’: ‘-‘, ‘open_cost_short_today’: ‘-‘, ‘position_cost_long_his’: ‘-‘, ‘position_cost_long_today’: 0, ‘position_cost_short_his’: ‘-‘, ‘position_cost_short_today’: ‘-‘, ‘user_id’: ‘1065999’, ‘volume_long_yd’: 2, ‘volume_short_yd’: 0})}

chaos 已回答的问题 10小时 前
0

`CZCE.PRT SF611&SF611C6900` 不是把 `SF611C6900` 错误改成了另一个普通合约,而是郑商所的组合持仓代码。

`PRT` 表示有保护期权期货组合,这条记录包含 `SF611` 期货腿和 `SF611C6900` 期权腿。调用不带参数的 `get_position()` 时,返回的是账户全部持仓,TqSdk 会按交易柜台返回的持仓标识展示,因此可能同时看到单腿持仓和这种组合持仓。

如果只想查询该期权,可以将 `get_position()` 的 `symbol` 参数显式设为 `CZCE.SF611C6900`。

但持仓已经组成交易所组合后,单腿持仓、组合持仓及保证金的展示口径可能不同,建议同时核对结算单或交易软件中的“组合持仓”。如果本人从未申请过该组合,则需要携带脱敏后的账户日志向期货公司确认组合来源。

不要把 `CZCE.PRT SF611&SF611C6900` 当作普通单腿合约代码直接下单。

chaos 发表新评论 10小时 前

有其他问题欢迎加入官方Q群748265037一起交流

您正在查看1个答案中的1个,单击此处查看所有答案。