-
Notifications
You must be signed in to change notification settings - Fork 241
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
USDT Purchase coins on exchange when exchange is set to Binance #918
Comments
The code was written on the 1.4.6 version of the server_extensions_extra |
This is the code for the changed PurchaseCoinsTask class:
And this is the code for the getExchangeRateLast class
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We've been working on implementing USDT purchases on our machines for quite some time. However, we encountered an issue due to our strategy of buying coins on the exchange when a transaction occurs.
The choice for exchange is Binance and EUR is the fiat currency for trading.
What happens then is we set the parameters as key:secret:EUR and the symbol of the order trying to be placed is USDT/EUR
The binance API returns invalid symbol error due to the pair on binance being EUR/USDT.
We decided to implement our own fix but since the pair is in reverse the pricing of it is also in reverse and instead of a purchase order a sell order needs to be placed.
The rate source when the exchange is binance and the coin is usdt is also tinkered in our implementation.
I'm attaching the compiled class of our own version of the XChangeExchange.java file which fixes those problems.
You can get a better sense of what I'm talking about when you check the code.
Our way of fixing it was with simple if and else statements but I'm sure an even cleaner approach can be taken.
USDT-implemenation.zip
The text was updated successfully, but these errors were encountered: