QV18
- ago
I am autotrading BTC and ETH via WL8 and Binance.US API.

Recently, I purchased XX.04148 ETH and after commission I was left with XX.96939704 ETH.

When WL8 created a sell order, it matched the position in my account of XX.96939704 ETH. However, the order did not go through, as it received a "account has insufficient balance" error.

In discussing this error with Binance.US support, it turns out that for ETH they only support orders of 5 decimal places, so one can only enter an order of XX.96939 ETH. One cannot add the last 3 decimal places of 704. This will leave a minute balance of .00000704 ETH in my account. For BTC, 6 decimal places are allowed. Therefore, I believe that WL8 orders to Binance.US need to be truncated to 5 decimal places for ETH and 6 decimal places for BTC (Truncated and not rounded). Can you help?

From Binance support (they mistakenly said 6 decimals for ETH when it is 5)...

I hope all is well today. I understand you are facing some issues when attempting to sell your ETH, I recently went through a similar issue. Let's get this all sorted out for you.

When attempting to create an order, Binance.US only allows 6 decimal places per order. Therefore, anything above that will not execute an order. This will result in a "leftover" amount in your account.
0
999
9 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.32% )
- ago
#1
So this is from the User Guide: Extensions > Binance

Position Sizing
If you are trying to sell your entire balance of a crypto, you may see a LOT_SIZE error. This is because of the Binance fees. To avoid this, don't try to sell 100% of a position, or maintain a balance of BNB in your Binance account, which Binance will use for fees before going to the sold asset.

Consequently, if you're going to use Portfolio Sync with Binance you'll need to have a BNB balance for the fees.
0
QV18
- ago
#2
Cone,

I am familiar with the error you describe, but this is not it. It is simply a matter that WL8 is attempting to send an order with more decimal places than allowed. To prove this, in order manager I manually entered an order with 8 decimal places XX.96939704 and it was rejected for insufficient balance. I then manually entered an order of XX.96939 (i.e. with the allowed 5 decimal places), and the order went through fine. The difference in actual dollar value is .00000704 ETH which is less than $0.01, so this could not account for the commission issue, as the commission was about $100 for this order.

Also, if you go to the Binance advanced trading web based order entry, you will see that one can only input 5 decimal place orders for ETH and 6 decimal place orders for BTC. Finally, please recall that Binance customer service has verified that orders are limited in decimal places, so I do think that too many decimal places a problem.
0
Cone8
 ( 6.32% )
- ago
#3
What was the error code that you got? There should be an order message or one in the Log Viewer.
0
QV18
- ago
#4
Binance Broker: Error Placing Order: Account has insufficient balance for requested action.
0
Cone8
 ( 6.32% )
- ago
#5
We'll look into it, but that message isn't indicating a misconfigured order. It's even possible that just removing 1 digit may have been enough, and we're dealing with a rounding error.
0
Glitch8
 ( 12.10% )
- ago
#6
Binance allows 8 decimals for ETHUSD. We use whatever decimals are instructed to us by Binance for each symbol.

0
QV18
- ago
#7
Cone,

I have found that you are correct that the Binance API allows 8 decimal places. However, there is still a problem that is keeping my auto trading from working for which I need help.

In summary, with order manager, when I place a stoplimit sell for my entire position of xx.96939704 ETH, I still receive an error. Therefore, I started experimenting with stoplimit orders to sell slightly lower amounts such as xx.96939604, xx.96939504, etc. Ultimately, I found that xx.96939500 would not go through, but xx.96939499 would work. The dollar value of this difference of 0.00000205 ETH is less than $0.01, so it seems likely this is some sort of a rounding error like you said earlier.

Can you suggest a solution? My system is a very minor modification of a building block system, and I'm not sure I could code a stoplimit order for "my entire position minus $0.01", and it seems like it might be better if the Binance API could account for this issue without such programming.
0
Cone8
 ( 6.32% )
- ago
#8
I think I see where the problem may be. How many digits to the left of the decimal are in your position quantity?

Edit:
Although the rounding issue I see would explain only a difference of 0.00000001, not 0.00000205.
0
QV18
- ago
#9
2
0

Reply

Bookmark

Sort