tqsdk2.TqCtp

class tqsdk2.TqCtp(self: tqsdk2.tqsdk2.TqCtp, td_url: str = '', broker_id: str = '', app_id: str = '', auth_code: str = '', user_name: str = '', password: str = '', default_trading_unit: int = 0)None

天勤2 实盘(直连CTP)账户类.

创建天勤实盘(直连CTP)实例。

Args:

td_url (str): [必填]CTP柜台地址. broker_id (str): [必填]CTP交易前置的Broker ID, eg: 2020. app_id (str): [必填]期货公司授权ID. auth_code (str): [必填]期货公司授权码. user_name (str): [必填]帐号. password (str): [必填]密码. default_trading_unit (int): [可选] 默认交易单元, 如果指定该参数, 后续下单查询等操作均视为对该交易单元的操作.

__init__(self: tqsdk2.tqsdk2.TqCtp, td_url: str = '', broker_id: str = '', app_id: str = '', auth_code: str = '', user_name: str = '', password: str = '', default_trading_unit: int = 0)None

天勤2 实盘(直连CTP)账户类.

创建天勤实盘(直连CTP)实例。

Args:

td_url (str): [必填]CTP柜台地址. broker_id (str): [必填]CTP交易前置的Broker ID, eg: 2020. app_id (str): [必填]期货公司授权ID. auth_code (str): [必填]期货公司授权码. user_name (str): [必填]帐号. password (str): [必填]密码. default_trading_unit (int): [可选] 默认交易单元, 如果指定该参数, 后续下单查询等操作均视为对该交易单元的操作.

Methods

__init__(self, td_url, broker_id, app_id, ...)

天勤2 实盘(直连CTP)账户类.