pycryptobot icon indicating copy to clipboard operation
pycryptobot copied to clipboard

Insufficient Funds Error - Binance

Open Sibbern opened this issue 3 years ago • 4 comments

I'm experiencing a bug which prevents me from buying and selling.

I'm getting Insufficient Quote Funds error when running the Binance pycryptobot, even though I have sufficient funds in both EUR and ADA.

I started the bot with my initial funds in ADA currency. It should've sold it but threw me this error instead. I've also tried having the funds in EUR but every time it was about to buy it gave me that error.


! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:50:26 | ADAEUR (BEAR) | 1h | Current Price: 1.821 | Margin: 0.24047551 | Profit: 0.365353
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:51:31 | ADAEUR (BEAR) | 1h | Current Price: 1.824 | Margin: 0.40561633 | Profit: 0.61625045
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:52:34 | ADAEUR (BEAR) | 1h | Current Price: 1.825 | Margin: 0.46066327 | Profit: 0.69988294
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:53:37 | ADAEUR (BEAR) | 1h | Current Price: 1.826 | Margin: 0.5157102 | Profit: 0.78351542
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:54:41 | ADAEUR (BEAR) | 1h | Current Price: 1.825 | Margin: 0.46066327 | Profit: 0.69988294
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:55:44 | ADAEUR (BEAR) | 1h | Current Price: 1.823 | Margin: 0.35056939 | Profit: 0.53261797
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:56:47 | ADAEUR (BEAR) | 1h | Current Price: 1.825 | Margin: 0.46066327 | Profit: 0.69988294
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:57:51 | ADAEUR (BEAR) | 1h | Current Price: 1.823 | Margin: 0.35056939 | Profit: 0.53261797
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:58:54 | ADAEUR (BEAR) | 1h | Current Price: 1.822 | Margin: 0.29552245 | Profit: 0.44898548
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 09:59:57 | ADAEUR (BEAR) | 1h | Current Price: 1.821 | Margin: 0.24047551 | Profit: 0.365353
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 11:00:00 | ADAEUR (BEAR) | 1h | Close: 1.823 | ^ EMA12/26: 1.8039 > 1.7989 ^ | ^ MACD: 0.0049 > 0.0018 ^ | WAIT | Last Action: BUY | DF HIGH: 2.016 | DF LOW: 1.           692 | SWING: 19.15% | CURR Price is -9.57% away from DF HIGH | Range: 2021-11-03 00:00:00 <--> 2021-11-15 11:00:00 | 0.3505% (delta: 0.01)
support: 1.791, resistance: 1.825, fibonacci (l): 1.81, fibonacci (u): 1.85
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:02:09 | ADAEUR (BEAR) | 1h | Current Price: 1.824 | Margin: 0.40561633 | Profit: 0.61625045
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:03:12 | ADAEUR (BEAR) | 1h | Current Price: 1.823 | Margin: 0.35056939 | Profit: 0.53261797
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:04:15 | ADAEUR (BEAR) | 1h | Current Price: 1.819 | Margin: 0.13038163 | Profit: 0.19808803
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:05:20 | ADAEUR (BEAR) | 1h | Current Price: 1.818 | Margin: 0.07533469 | Profit: 0.11445555
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:06:25 | ADAEUR (BEAR) | 1h | Current Price: 1.821 | Margin: 0.24047551 | Profit: 0.365353
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:07:29 | ADAEUR (BEAR) | 1h | Current Price: 1.818 | Margin: 0.07533469 | Profit: 0.11445555
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:08:33 | ADAEUR (BEAR) | 1h | Current Price: 1.817 | Margin: 0.02028775 | Profit: 0.03082306
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:09:37 | ADAEUR (BEAR) | 1h | Current Price: 1.817 | Margin: 0.02028775 | Profit: 0.03082306
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:10:41 | ADAEUR (BEAR) | 1h | Current Price: 1.816 | Margin: -0.03475918 | Profit: -0.05280942
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:11:46 | ADAEUR (BEAR) | 1h | Current Price: 1.815 | Margin: -0.08980612 | Profit: -0.1364419
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:12:50 | ADAEUR (BEAR) | 1h | Current Price: 1.816 | Margin: -0.03475918 | Profit: -0.05280942
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:13:54 | ADAEUR (BEAR) | 1h | Current Price: 1.815 | Margin: -0.08980612 | Profit: -0.1364419
! Ignore Sell Signal (Within No-Sell Bounds)
2021-11-15 10:14:58 | ADAEUR (BEAR) | 1h | Current Price: 1.817 | Margin: 0.02028775 | Profit: 0.03082306
Error: GET (400) https://api.binance.com/api/v3/account - Timestamp for this request is outside of the recvWindow. (hint: increase recvWindow with --recvWindow <5000-60000           >)
Exception('Insufficient Quote Funds! (Actual: 0.09, Minimum: 10.0)')

This is my config:

{
    "binance": {
        "api_url": "https://api.binance.com",
        "api_key_file": "binance.key",
        "config": {
            "base_currency": "ADA",
            "quote_currency": "EUR",
            "sellatloss": 1,
            "sellatresistance": 0,
            "trailingstoploss": -1.5,
            "trailingstoplosstrigger": 5,
            "nosellmaxpcnt": 3,
            "nosellminpcnt": -3,
            "disablebullonly": 0,
            "disablebuynearhigh": 1,
            "disablebuymacd": 0,
            "disablebuyobv": 1,
            "disablebuyelderray": 1,
            "disablefailsafefibonaccilow": 1,
            "disableprofitbankreversal": 0,
            "disabletracker": 0,
            "autorestart": 0,
            "live": 1,
            "enabletelegrambotcontrol": 1,
            "disabletelegram": 0,
            "graphs": 1,
            "stats": 0
        }
    },
     "telegram": {
        "token": "HIDDEN",
        "client_id": "HIDDEN",
        "user_id": "HIDDEN"
    }
 }

Am I doing something wrong or is it actually a bug? I read the other related issues but I couldn't find anything that was able to solve the problem. Any help would be greatly appreciated.

Sibbern avatar Nov 15 '21 11:11 Sibbern

This error indicated a time issue with the host device, try syncing the clock with NTP more often and see if the error goes away.

https://www.tecmint.com/synchronize-time-with-ntp-in-linux/

Error: GET (400) https://api.binance.com/api/v3/account - Timestamp for this request is outside of the recvWindow. (hint: increase recvWindow with --recvWindow <5000-60000           >)

warrmr avatar Jan 25 '22 08:01 warrmr

same happened to me, insert --recvWindow 20000 solved the problem. If 20000 does not work, look for another number, as this is the response time between the server. Now I need to know how the bot works in futures binance, because I only got it in spots

eddy-ribeiro avatar Feb 03 '22 18:02 eddy-ribeiro

I did one trade and one failed with the same error as yours. I installed chrony now to sync the clock, but I wonder how I would change the --recvWindow - is that just an additional line in the config.json?

SpettV avatar Feb 21 '22 20:02 SpettV

Update: I set buypercent to 99, so I get no more insufficient funds error, but the time stamp is still an issue (not on all transactions)

SpettV avatar Feb 22 '22 11:02 SpettV