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:
|
if exchange_id not in exchange_instances:
|
||||||
exchange_class = SUPPORTED_EXCHANGES[exchange_id]
|
exchange_class = SUPPORTED_EXCHANGES[exchange_id]
|
||||||
# 创建交易所实例时配置代理
|
# # 创建交易所实例时配置代理
|
||||||
proxy = PROXY_CONFIG['http'] or PROXY_CONFIG['https']
|
# proxy = PROXY_CONFIG['http'] or PROXY_CONFIG['https']
|
||||||
exchange_options = {}
|
# exchange_options = {}
|
||||||
|
|
||||||
if proxy:
|
# if proxy:
|
||||||
exchange_options.update({
|
# exchange_options.update({
|
||||||
'proxies': {
|
# 'proxies': {
|
||||||
'http': proxy,
|
# 'http': proxy,
|
||||||
'https': proxy
|
# 'https': proxy
|
||||||
}
|
# }
|
||||||
})
|
# })
|
||||||
|
|
||||||
exchange_instances[exchange_id] = exchange_class(exchange_options)
|
exchange_instances[exchange_id] = exchange_class()
|
||||||
|
|
||||||
return exchange_instances[exchange_id]
|
return exchange_instances[exchange_id]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user