[Mod]remove default proxy setting
This commit is contained in:
parent
0260aa0784
commit
f53f5ea7dd
@ -71,8 +71,8 @@ class BitmexGateway(BaseGateway):
|
||||
"Secret": "",
|
||||
"会话数": 3,
|
||||
"服务器": ["REAL", "TESTNET"],
|
||||
"代理地址": "127.0.0.1",
|
||||
"代理端口": 1080,
|
||||
"代理地址": "",
|
||||
"代理端口": "",
|
||||
}
|
||||
|
||||
def __init__(self, event_engine):
|
||||
@ -91,6 +91,11 @@ class BitmexGateway(BaseGateway):
|
||||
proxy_host = setting["代理地址"]
|
||||
proxy_port = setting["代理端口"]
|
||||
|
||||
if proxy_port.isdigit():
|
||||
proxy_port = int(proxy_port)
|
||||
else:
|
||||
proxy_port = 0
|
||||
|
||||
self.rest_api.connect(key, secret, session_number,
|
||||
server, proxy_host, proxy_port)
|
||||
|
||||
|
@ -73,8 +73,8 @@ class HuobiGateway(BaseGateway):
|
||||
"API Key": "",
|
||||
"Secret Key": "",
|
||||
"会话数": 3,
|
||||
"代理地址": "127.0.0.1",
|
||||
"代理端口": 1080,
|
||||
"代理地址": "",
|
||||
"代理端口": "",
|
||||
}
|
||||
|
||||
def __init__(self, event_engine):
|
||||
@ -95,6 +95,11 @@ class HuobiGateway(BaseGateway):
|
||||
proxy_host = setting["代理地址"]
|
||||
proxy_port = setting["代理端口"]
|
||||
|
||||
if proxy_port.isdigit():
|
||||
proxy_port = int(proxy_port)
|
||||
else:
|
||||
proxy_port = 0
|
||||
|
||||
self.rest_api.connect(key, secret, session_number,
|
||||
proxy_host, proxy_port)
|
||||
self.trade_ws_api.connect(key, secret, proxy_host, proxy_port)
|
||||
|
@ -74,8 +74,8 @@ class OkexGateway(BaseGateway):
|
||||
"Secret Key": "",
|
||||
"Passphrase": "",
|
||||
"会话数": 3,
|
||||
"代理地址": "127.0.0.1",
|
||||
"代理端口": 1080,
|
||||
"代理地址": "",
|
||||
"代理端口": "",
|
||||
}
|
||||
|
||||
def __init__(self, event_engine):
|
||||
@ -94,9 +94,13 @@ class OkexGateway(BaseGateway):
|
||||
proxy_host = setting["代理地址"]
|
||||
proxy_port = setting["代理端口"]
|
||||
|
||||
if proxy_port.isdigit():
|
||||
proxy_port = int(proxy_port)
|
||||
else:
|
||||
proxy_port = 0
|
||||
|
||||
self.rest_api.connect(key, secret, passphrase,
|
||||
session_number, proxy_host, proxy_port)
|
||||
|
||||
self.ws_api.connect(key, secret, passphrase, proxy_host, proxy_port)
|
||||
|
||||
def subscribe(self, req: SubscribeRequest):
|
||||
|
Loading…
Reference in New Issue
Block a user