Occasional crash in bittrex parse_trades()
See original GitHub issuebittrex fetch_trades()
sometimes triggers a crash from parse_trades()
because trades
is None and it raises a TypeError because NoneType is not iterable. In other words the response['result']
is sometimes None in the following line and should be checked:
return self.parse_trades(response['result'], market)
To be exact, bittrex returned this:
response == { 'message': '', 'result': None, 'success': True }
This is some degenerate case that I had observed with Bittrex service prior to using CCXT so its definitely something on the bittrex end. My solution prior to using CCXT was to check but the success
flag and that result
is not None for this and some other request types, although as far as I can remember trade history was the only endpoint which I had actually observed this with.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
@stonemonk I’ll do the same for all methods of bittrex then… Will be fixed soon.
@stonemonk got it, will add a workaround for
None
-result…