szferguson / Binance-Trailing-Stop-Loss

Provides a dynamic stop-loss that automatically adjusts as the price increases or decreases (depending on mode specified)
GNU General Public License v3.0
147 stars 44 forks source link

Didn't work for BTC/USD on stop loss: got InsufficientFunds #1

Open theogravity opened 6 years ago

theogravity commented 6 years ago

First off - thanks for writing this script - it was a good foundational script to learn off of.

I had an amount that was like 12.34567890 (not an actual amount, just showing that there's decimal 8 digits total).

When the stop loss triggered, I was presented with the InsufficientFunds error. I did a printout of the amount in the script, and it was the same as my actual balance. Unsure why the API call would not go through.

I did try it on XRP/USDT, and that worked (maybe because it's only 1 decimal digit).

szferguson commented 6 years ago

Hi,

Order likely did not execute due to the marker/taker fee. Check new commit.

Regards, Steven

theogravity commented 6 years ago

Ah, thanks

theogravity commented 6 years ago

I think you prob want to also apply the update to the sell side too (your commit only addresses buy)

Also, I had enough BNB in the sell side, but it didn't execute with the same error on BTC/USD (again, XRP/USD did work)

traderblakeq commented 5 years ago

First of all thank you for writing this script.

Im looking forward to use this in my automated trading system.