-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Manually support gate.io minimum cost #3032
Conversation
gate.io returns a minimum amount via the API, and ccxt uses that + a minim-based derived from the decimal places to set the minimum cost. However, the gate.io API says: ``` ccxt.base.errors.ExchangeError: gateio {"result":"false","message":"Your order size is too small. The minimum is 1 USDT","code":20} ``` It does so when I want to sell 2 XLM on XLM/USDT. 2 XLM is much more than the minimum amount given via the API (0.0001), but clearly not enough. It seems there is a hidden "cost"-based limit from the API that we do not yet know. I used trial an error here to figure those out.
load these into the .markets attribute, not the code |
Do you mean add them to the structure returned by Do you have an example of how to define per-currency limits in that structure? |
https://github.com/ccxt/ccxt/wiki/Manual#precision-and-limits |
Sorry for being thick. Can you link to an example, or to the line in the code where I am supposed to add these changes? It seems to me that we fetch the markets from the server, thus we construct |
Yeah load them in the .limits param - https://github.com/ccxt/ccxt/blob/master/js/base/Exchange.js#L523 |
I still don't get it. The code that you linked to:
In this case, some limits are different for each market. The limit is based on the quote currency of the market. For the markets Can I ask you to have a second look at the patch to confirm that I really need to change something? Maybe I was not clear about the kind of change this is. |
gate.io returns a minimum amount via the API, and ccxt uses that + a minim-based derived from the decimal places to set the minimum cost. However, the gate.io API says:
It does so when I want to sell 2 XLM on XLM/USDT. 2 XLM is much more than the minimum amount given via the API (0.0001), but clearly not enough. It seems there is a hidden "cost"-based limit from the API that we do not yet know.
I used trial an error here to figure those out.