question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Occasional crash in bittrex parse_trades()

See original GitHub issue

bittrex 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kroitorcommented, Nov 11, 2017

@stonemonk I’ll do the same for all methods of bittrex then… Will be fixed soon.

0reactions
kroitorcommented, Dec 12, 2017

@stonemonk got it, will add a workaround for None-result…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Site Status - Bittrex
This page displays status information for Bittrex's wallets and markets, updated on a 5-minute interval. If you are experiencing a problem that is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found