del proxy
This commit is contained in:
parent
f4922bd7d8
commit
7dbf4fe9c5
@ -60,19 +60,19 @@ async def get_exchange(exchange_id: str) -> ccxt.Exchange:
|
||||
|
||||
if exchange_id not in exchange_instances:
|
||||
exchange_class = SUPPORTED_EXCHANGES[exchange_id]
|
||||
# 创建交易所实例时配置代理
|
||||
proxy = PROXY_CONFIG['http'] or PROXY_CONFIG['https']
|
||||
exchange_options = {}
|
||||
# # 创建交易所实例时配置代理
|
||||
# proxy = PROXY_CONFIG['http'] or PROXY_CONFIG['https']
|
||||
# exchange_options = {}
|
||||
|
||||
if proxy:
|
||||
exchange_options.update({
|
||||
'proxies': {
|
||||
'http': proxy,
|
||||
'https': proxy
|
||||
}
|
||||
})
|
||||
# if proxy:
|
||||
# exchange_options.update({
|
||||
# 'proxies': {
|
||||
# 'http': proxy,
|
||||
# 'https': proxy
|
||||
# }
|
||||
# })
|
||||
|
||||
exchange_instances[exchange_id] = exchange_class(exchange_options)
|
||||
exchange_instances[exchange_id] = exchange_class()
|
||||
|
||||
return exchange_instances[exchange_id]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user