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