tqsdk.auth - 用户认证类

class tqsdk.auth.TqAuth(user_name: str = '', password: str = '')

信易用户认证类

创建信易用户认证类

Args:

user_name (str): [必填]信易账户,可以是 邮箱、用户名、手机号

password (str): [必填]信易账户密码

Example:

# 使用实盘帐号直连行情和交易服务器
from tqsdk import TqApi, TqAccount, TqAuth
api = TqApi(TqAccount("H海通期货", "022631", "123456"), auth=TqAuth("信易账户", "账户密码"))

# 等价于
# api = TqApi(TqAccount("H海通期货", "022631", "123456"), auth="信易账户,账户密码")