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
Kraken - 403 forbidden error when trying to get minimal orders #6795
Comments
This has been reported previously, here:
Kraken's official answer:
In the meantime, you can workaround the issue, by setting exchange = ccxt.kraken({
'enableRateLimit': True,
'options': { # ←--------------------- inside 'options' subkey
'fetchMinOrderAmounts': False, # ←---------- set to False
}
}) That way you will effectively lose the information about the minimal limits, but the other functionality will keep working. Let me know if that does not answer the question. |
I'm sorry for the duplicate, I only searched for "Kraken" in the issues tab when you marked my issue as Duplicate (there was no mention of Kraken on the front page of the issues). However, yes, it confirms everything I thought. I fixed my production system by coming back to the version before the commit I mentioned. In the long run, I'll disable fetchMinOrderAmounts Thank you for your response, and your broader involvement in ccxt. |
@alextousss thx for the feedback, really appreciate it! Don't hesitate if you have further questions. Will keep you updated and will let you know when it's fixed on the Kraken's side. |
@alextousss As indicated in Kroitor's response above, the min order size for Kraken is retrieved via Kraken support page - https://support.kraken.com/hc/en-us/articles/205893708-What-is-the-minimum-order-size-. The html code from the Kraken support page is captured and the html tags My short term fix (until Kraken adds the minimum order sizes to the REST API AssetPairs endpoint ) was to provide the html code directly to the fetch_min_order_amounts() function in the ccxt/kraken.php file. Instead of I defined the variable $html with the text from the support page using a function that returned the relevant text. I simply created the following function that returned the relevant html code copied from the kraken support page:
and then defined the $html variable in the fetch_min_order_amounts() function n the ccxt/kraken.php file with a call to the above function:
This fix of course is not ideal, as the workaround will automatically be lost when ccxt is updated, but it works. Also, this fix does not represent a material change to the code, and can easily be added to any future updates. |
@mjoh090 yes, hardcoding the limits is one of the ways to workaround this issue, when you really need that information. |
From a broader perspective, would it be possible to have a "stable mode" that would disable that kind of feature that isn't relying on official and stable APIs? Is ccxt parsing help pages for other exchanges? This issue was already present for fees if I remember well and caused me a major headache. |
@alextousss yes, in general we are trying to make all "unofficial" endpoints optional, however, there may be some quirks still left in the derived exchanges – will do our best to clean it all up. I've switched it off for Kraken (in 1.26.20), so that option is now |
Hello,
The Kraken integration seems broken for me since this update: 89ee033#diff-5e85c8f10126d08bcbd8c3138002c7c0
In the commit, "fetchMinLimitOrder" has been set to true.
But, Kraken has a protection mechanism that requires users to complete a captcha on their website to access pages. I think when this protection is enabled, Kraken fails to load markets.
Please tell me if I'm wrong in my thinking and whether a fix is possible.
Thank you,
Alex
The text was updated successfully, but these errors were encountered: