0

Error: Response code 400 on Binance – How to fix

Error: Response code 400 is one of the most “popular” error messages since Gunbot v7 was launched. A lot of people is getting this error on Binance. But, why? What does it mean? Unfortunately, this error can be caused by several things, so we need to try several fixes one by one untl we get rid of it.

Loading config…
Loading the exchange – binance
error: fetchMyTrades
Error: Response code 400
at Request.module.exports._makeRequest.request [as _callback] (/snapshot/gunbot-build/ctx/helper/binance/binance-api.js:0:0)
at Request.init.self.callback (/snapshot/gunbot-build/node_modules/request/request.js:188:22)
at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request.<anonymous> (/snapshot/gunbot-build/node_modules/request/request.js:1171:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at IncomingMessage.<anonymous> (/snapshot/gunbot-build/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:312:19)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1045:12)
at _combinedTickCallback (internal/process/next_tick.js:102:11)
at process._tickCallback (internal/process/next_tick.js:161:9)
(node:8260) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Response code 400
(node:8260) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Ok, let’s go:

1- Be sure you have funds in your base coin. In some cases it’s fixed just by adding BTC to your Binance account (in the case you are using BTC as base coin).

2- Be sure your pairs are correctly added. If you put BTC_ETH instead of BTC-ETH, you get error 400. If you put btc-eth, what do you think you get?

3- Note that in some cases your base config.js file includes this:

“binance”: {
BTC-IOT“: {
“strategy”: “emotionless”,
“override”: {}
}
}

Note that “IOT” doesn’t exist. You need to change it for a real pair, that is, BTC-IOTA. If you edit your config.js manually, you would need to execute gunthy.exe directly. Why? Because if your edit config.js manually and after that you execute the bot through the GUI, config.js file would be overwritten. So, if you edit config.js manually, run the bot directly executin gunthy.exe, if you edit the config through GUI, run the bot through GUI.

4- Be sure your Api keys are correctly added / configured, that is, be sure you have added your key as both master and non master per exchange. Check your API permission settings, as always, you need to enable all permissions except withdrawal.

5- Be sure your firewall is not blocking ports 3000, 5000 or 5001.

6- If you reach to this point and you are still getting this error, try this fix:

a) Right click the clock in the task bar and click “Adjust date and time”
b) Disable “Set time automatically”
c) Change the computer time 5 minutes ahead
d) Enable “Set time automatically”
e) Start the bot

7- If you can’t get rid of Error: response code 400 after all these steps, try this: do a fresh install. The most simple install possible, that is, add only one pair: BTC-ETH, just put the basic things, api key, secret etc… and start the bot. Sometimes we add a lot of pairs and we do a lot of changes, then it’s very hard to find the root problem. In these cases, it’s better to do the most simple config possible and then start adding things slowly, so it will be easy to locate the problem.

8- The oldest and most popular fix: Restart your computer and try again. I’m not kidding, in some cases it can fix it.

9- If everything else fails, maybe your Api key is broken, change it for a new one.

Submit Your Comment