TqSdk2.TqCtpMini - CTP MINI 交易类

class tqsdk2.TqCtpMini(self: tqsdk2.tqsdk2.TqCtpMini, td_url: str = '', broker_id: str = '', app_id: str = '', auth_code: str = '', user_name: str = '', password: str = '')

天勤2 CTP MINI 账户类.

创建 CTP MINI 账户实例.

Args:

td_url (str): [必填]柜台地址.

broker_id (str): [必填]交易前置的 Broker ID.

app_id (str): [必填]期货公司授权 ID.

auth_code (str): [必填]期货公司授权码.

user_name (str): [必填]帐号.

password (str): [必填]密码.

Example:

# 登录 CTP MINI 柜台
from tqsdk2 import TqApi, TqAuth, TqCtpMini
account = TqCtpMini(td_url="柜台地址", broker_id="交易前置 ID", app_id="期货公司授权 ID", auth_code="期货公司授权码", user_name="账户", password="密码")
api = TqApi(account = account, auth= TqAuth("信易账户","账户密码"))