Closed reteps closed 6 years ago
possible fix: adding await exchange.close()
to load_exchange_graph
in single_exchange.py
Still getting AttributeError: 'binance' object has no attribute 'close'
Your code does not work because load_exchange_graph
returns a DiGraph, not a ccxt Exchange
object. Networkx Graph objects have no close
method.
How should I modify my code then? I thought load_exchange_graph was the one interacting with ccxt
Change it from:
loop = asyncio.get_event_loop()
exchange = load_exchange_graph('binance', fees=True)
graph = loop.run_until_complete(exchange)
exchange.close()
to
loop = asyncio.get_event_loop()
graph = loop.run_until_complete(load_exchange_graph('binance', fees=True))
The exchange's connection is now closed in load_exchange_graph
so it does not have to be done manually.
seems to be a problem with ccxt, see this issue.
Trying
await exchange.close()
fails b/c it's not in a coroutineexchange.close()
seems to do nothing.