Skip to content

Commit c7ffd95

Browse files
committed
remove clent_config paper_account/standard_account
1 parent 016239a commit c7ffd95

File tree

3 files changed

+3
-37
lines changed

3 files changed

+3
-37
lines changed

tigeropen/examples/client_config.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ def get_client_config():
1818
client_config = TigerOpenClientConfig(sandbox_debug=is_sandbox)
1919
client_config.private_key = read_private_key('your private key file path')
2020
client_config.tiger_id = 'your tiger id'
21-
client_config.account = 'your account' # 账户. 不论是环球账户, 综合账户或是模拟账户, 都填在此处
22-
# standard_account 属性和 paper_account 属性只是为多账户时取用方便, 一般可忽略
23-
client_config.standard_account = None
24-
client_config.paper_account = None
21+
client_config.account = 'your account'
2522
client_config.secret_key = None # 机构交易员专有密钥 (机构用户需要填写, 个人开发者无需填写)
2623
client_config.language = Language.en_US
2724
return client_config

tigeropen/tiger_open_config.py

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ def __init__(self, sandbox_debug=False):
3838
self._tiger_id = ''
3939
# 授权账户
4040
self._account = ''
41-
# 综合账户
42-
self._standard_account = ''
43-
# 模拟账户
44-
self._paper_account = ''
4541
# 开发者应用私钥
4642
self._private_key = ''
4743
# 请求签名类型,推荐RSA2
@@ -83,22 +79,6 @@ def account(self):
8379
@account.setter
8480
def account(self, value):
8581
self._account = value
86-
87-
@property
88-
def standard_account(self):
89-
return self._standard_account
90-
91-
@standard_account.setter
92-
def standard_account(self, value):
93-
self._standard_account = value
94-
95-
@property
96-
def paper_account(self):
97-
return self._paper_account
98-
99-
@paper_account.setter
100-
def paper_account(self, value):
101-
self._paper_account = value
10282

10383
@property
10484
def sign_type(self):
@@ -173,16 +153,13 @@ def secret_key(self, value):
173153
self._secret_key = value
174154

175155

176-
def get_client_config(private_key_path, tiger_id, account, standard_account=None, paper_account=None,
177-
sandbox_debug=False, sign_type=None, timeout=None, language=None, charset=None,
178-
server_url=None, socket_host_port=None, secret_key=None):
156+
def get_client_config(private_key_path, tiger_id, account, sandbox_debug=False, sign_type=None, timeout=None,
157+
language=None, charset=None, server_url=None, socket_host_port=None, secret_key=None):
179158
"""
180159
生成客户端配置
181160
:param private_key_path: 私钥文件路径, 如 '/Users/tiger/.ssh/rsa_private_key.pem'
182161
:param tiger_id: 开发者应用 id
183162
:param account: 授权账户 (必填. 作为发送请求时的默认账户. 不论是环球账户, 综合账户或是模拟账户, 都使用此参数)
184-
:param standard_account: 多账户时可将综合账户填在此处, 一般可忽略
185-
:param paper_account: 多账户时可将模拟账户填在此处, 一般可忽略
186163
:param sandbox_debug: 是否请求 sandbox 环境
187164
:param sign_type: 签名类型
188165
:param timeout: 请求超时时间, 单位秒
@@ -197,10 +174,6 @@ def get_client_config(private_key_path, tiger_id, account, standard_account=None
197174
config.private_key = read_private_key(private_key_path)
198175
config.tiger_id = tiger_id
199176
config.account = account
200-
if standard_account:
201-
config.standard_account = standard_account
202-
if paper_account:
203-
config.paper_account = paper_account
204177
if sign_type:
205178
config.sign_type = sign_type
206179
if timeout:

tigeropen/trade/trade_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,10 @@ def __init__(self, client_config, logger=None):
3131
super(TradeClient, self).__init__(client_config, logger=logger)
3232
if client_config:
3333
self._account = client_config.account
34-
self._standard_account = client_config.standard_account
35-
self._paper_account = client_config.paper_account
3634
self._lang = client_config.language
3735
self._secret_key = client_config.secret_key
3836
else:
3937
self._account = None
40-
self._standard_account = None
41-
self._paper_account = None
4238
self._secret_key = None
4339

4440
def get_managed_accounts(self, account=None):

0 commit comments

Comments
 (0)