Solvedzenbot The Error at the Binance "More than 1 hours between startTime and endTime"

Hi, guys,
While trading, an error occurred below.
Do you know the reason?

I use ubuntu 16.04.

An error occurred { Error: binance GET 400 Bad Request {"code":-1127,"msg":"More than 1 hours between startTime and endTime."} (possible reasons: invalid API keys, bad or old nonce, exchange is down or offline, on maintenance, DDoS protection, rate-limiting)
at binance.defaultErrorHandler (/home/satoko/zenbot/node_modules/ccxt/js/base/Exchange.js:400:15)
at response.text.then.text (/home/satoko/zenbot/node_modules/ccxt/js/base/Exchange.js:413:25)
at process._tickCallback (internal/process/next_tick.js:188:7) constructor: [Function: ExchangeNotAvailable] }

11 Answers

✔️Accepted Answer

Change this in extensions/exchanges/binance/exchange.js

  getTrades: function (opts, cb) {
        var func_args = []

        var args = {};
        if (opts.from) {
          args.startTime = opts.from
        if ( {
          args.endTime =
        if (args.startTime && !args.endTime) {
          // add 1 hour instead of 12
          args.endTime = args.startTime + 3600000
        else if (args.endTime && !args.startTime) {
          // subtract only 1 hour instead of 12
          args.startTime = args.endTime - 3600000

// Credit to jadedgeek on discord

Related Issues:

zenbot The Error at the Binance "More than 1 hours between startTime and endTime"
Change this in extensions/exchanges/binance/exchange.js // Credit to jadedgeek on discord ...
zenbot Cannot find module './build/Release/analytics.node'
Guys please upgrade to nodejs 8 that should solve the build problem Please make sure to rm -rf node_...
axios Axios catch error returns javascript error not server response
I have exactly the same environment Try this: Modify from console.log(error) to console.log(
nvm .nvmrc example?
If you're currently using the Node version you want for .nvmrc you can run this command: node -v > ....
nvm -bash: nvm: command not found
I had the same issue until I added the following lines to my .bash_profile Running terminal in Mac O...
nvm nvm install node fails to install on macOS Big Sur M1 Chip
For anything under v15 you will need to install node using Rosetta 2 You can do this by running the ...
react starter kit How to call child component method from parent?
For example you can use Refs to Components approach like so: Demo:
svgo no such file or directory .svgo.yml
I noticed this problem with Yarn after someone had run yarn clean Deleting the .yarnclean file delet...
electron Requiring electron outside of main.js causes a TypeError
For anyone encountering this problem in the future and reading this thread Electron version: 1.3.5 O...
meteor [] Error: ENFILE: file table overflow
I was getting the same after an upgrade to macOS Sierra Turns out macOS have a harsh limit on number...
node gyp Is this an Issue with MACOS catalina?
This worked for me EDITED FOR PEOPLE JUST GETTING HERE: node-gyp v7 should solve these issues ...
axios POST request works in Browser but not on Node
This might be considered a duplicate of #789 I was able to use the form-data package with Axios in n...
node gyp trying to 'npm install', getting node-gyp rebuild errors
Delete your $HOME/.node-gyp directory and try again Aside many tools don't handle spaces in path nam...
ts node Custom typings not working with ts-node 8.0.2
When using with ts-node you have to add --files flag After updating to ts-node version 8.0.2 the cus...
nvm How to uninstall nvm?
@mibamur There is no need for such emphasis in your comments And it is probably better to use the $N...
date fns Can't resolve 'date-fns/_lib/format/longFormatters'
You probably forgot to install date-fns or Code: import DateFnsUtils from '@date-io/date-fns'; ...
sheetjs How to simply export a Worksheet to xlsx?
There are two issues: each object is mapped to a row so if you want a row with name John and city Se...
axios Adding headers to method
Edit: I had to add Authorization to allowed headers in my CORS filter @jffernandez I'm having the sa...
electron Error while importing electron in react | import { ipcRenderer } from 'electron'
@MarshallOfSound my mistake I found the solution in issue #7300 if it can help anyone Please note th...
passenger passenger-install-apache2-module fails with OpenSSL development headers not found on OSX El Capitan
After upgrading to El Capitan I'm unable to install the Apache module by running passenger-install-a...
axios Adding Retry Parameter
@mericsson I am too in need of exponential backoff when retrying I've put together the following whi...
jsdom jest : SecurityError: localStorage is not available for opaque origins
@gokulkrishh I set it to http://localhost/ but any valid URL seems to work. When I run a jest with m...
mocha timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
just add in your package.json under scripts Then you can just run I'm getting the following error wh...
electron Failed to load resource: net::ERR_FILE_NOT_FOUND file:///D:/css/app.css
If this occur when having <base href=/> in the index.html just replace it by <base href=./>. ...
axios BaseURL not being used
Please IGNORE THIS ISSUE Found the problem: I was setting baseUrl but it should be baseURL. ...
axios How to ignore SSL issues
You can configure axios to use a custom agent and set rejectUnauthorized to false for that agent: Ho...
electron Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
Try It should output a progress bar for the download 👍 Electron version: latest (That Try) Operatin...
cli [BUG] Missing required argument #1
Same problem It appears something was released that breaks older versions of npm (we were using 3.5....
axios How to send Raw http for Instagram Authentication?
Yes StringClient uses the application/x-www-form-urlencoded format by default while axios uses appli...
axios CORS error No 'Access-Control-Allow-Origin' header is present on the requested resource
My solution is axios.get('' + yourUrl) update: doesn't work ...
nvm NVM is not compatible with the npm config "prefix" option warning (OS X)
nvm unalias default worked for me! Much appreciated @MwumLi 🍻 Split off from #855 ; see that issue ...
electron How do I open a url from <a> on default OS browser?
I found this code snippet on S.O.: Dropped it in my main index file it seems to be working as far as...
axios request progress?
@slim12kg Depending on the way you coded your project it may change if my code confuses you ...
node gyp Warning "root" does not have permission to access the dev dir
Solved it be adding --unsafe-perm In my case with sails: Works well! For people coming here through ...
ts node ts-node fails when ES Modules are in the dependency graph in Node.js 13+
It seems that ts-node fails to run with module: esnext in the tsconfig.json and type: module in the ...
node gyp error C2373: '__pfnDliNotifyHook2': redefinition;
npm -g install npm@next? ERR WHILE ENV ...
axios Missing documentation for downloading binary files
In case other stumple upon this thread when looking for an answer to serve external images from node...
node Error: Cannot find module 'internal/fs' when npm install on mac
If you run rm -rf /usr/local/lib/node_modules/npm and then re-install Node.js does it work? ...
axios Is it possible to add a retry method to axios?
You can do that with an interceptor that handles authentication errors Something like: ...
freeCodeCamp Test failing in: Applied Visual Design: Create a Horizontal Line Using the hr Element
Try to switch you <p><em> tag like this. This work for me. Hope it helps for someone who want to pas...
express What is the default timeout of a req in express?
@flickz @vitoravale I've found two ways to make it work Uploading a blob on azure storage and at tim...
node Missing stack traces from async functions after the first await
Thanks! And to put a point on the real problem Version: v7.7.3 Platform: Windows 7x64 The purpose of...
axios Example for how to chain multiple requests?
You can chain the results as they are regular promises: Can anyone point me to an example or share a...
electron 9.0.0 does not display local images
A recap for anyone else who's having this issue: Make sure you've enabled webSecurity from your Brow...
apostrophe PayloadTooLargeError: request entity too large when trying to POST to apostrophe-headless API
This seems to have worked: I am using apostrophe-headless and my payloads are slightly big since I a...
axios Can't get a .post with 'Content-Type': 'multipart/form-data' to work
@rafaelbiten I've just tried to reproduce the issue but to no avail I used the following code: The d...
axios Set a code/status for "Network Error"
I'm having this issue I'm trying to detect when my server is down so that I can display an appropria...
nvm NVM fails to load within nested shell
For me Operating system and version: macOS High Sierra 10.13.1 (17B48) nvm debug output: nvm ls outp...
prisma Prisma Migrate: Error creating shadow database
I just want to add a quick note for folks coming here from googling the error message that if you ar...