-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitfinex v2 fetch_ohlcv empty / null response handling #399
Comments
@ralondo hi! Thanks for reporting! I'll take a look into it. In the meantime, can you show your code, please? These symptoms may indicate that you are hitting their rate limit... Do you actually throttle your requests? |
What code do you need? How can I check with ccxt if I hit the rate limit? Anyway, I do throttle my requests by having my own scheduler, in average only one call every 12 seconds to bitfinex. According to their API-docs the the rate limit on the REST-API is 10-90 calls per minute, so I could make at least 1 call every 6 seconds. |
@ralondo ok, no need for the code... Unfortunately, they state it clear, v2 is beta. We will add more checks to handle for empty responses. Thx! |
No problem. I just changed the code for me a bit to get rid of those annoying warnings: |
With examples/php/bitfinex2-fetch-ohlcv.php I'm also having some errors from Bitfinex v2:
So, yes, I am adding the handling for it now. |
This issue was addressed and fixed in 1.9.262. Thx again for your feedback! Really appreciate it! |
fix: capitalization of `formatScientificNotationFTX()` call
It seems, that bitfinex v2 fetch_ohlcv sometimes returns empty / null responses. I guess some problems on bitfinexs side. I get these warnings in my errorlog:
PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /srv/www/htdocs/crypt/includes/classes/ccxt.php on line 4772
PHP Warning: array_values() expects parameter 1 to be array, null given in /srv/www/htdocs/crypt/includes/classes/ccxt.php on line 917
PHP Warning: Invalid argument supplied for foreach() in /srv/www/htdocs/crypt/includes/classes/ccxt.php on line 918
The $response in line 4771 is empty, the parameters for the fetch2 call are:
$body: (is empty)
$path:candles/trade:{timeframe}:{symbol}/hist
$params (print_r): Array\n(\n [symbol] => tBTCUSD\n [timeframe] => 1m\n)\n
Would it be possible to have some kind of handling there for empty responses?
The text was updated successfully, but these errors were encountered: