Code Monkey home page Code Monkey logo

node-binance-trader's Issues

Profit/Loss stats are not correct

I had issues with the API key settings in Binance, which meant that the trader couldn't communicate with Binance API. However, I was able to manually close a trade and now it shows 0.444% profit for that trade, while the API wasn't working. How can I manually correct these stats?

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Signals no longer received

I'm trying to debug an issue wherein I seem no longer to receive any signals. This is using master. I have a strategy favourited. With the trader running in node, if I watch the signals being transmitted by the strategy using the bva website, I can see that signals are happening but they aren't being received by the trader. This was working (thus my other bug about unknown pairs), but seems to have stopped.

The startup messages don't reveal much:

user@user-7490-mint:~/localdev/node-binance-trader$ npm run trader

> [email protected] trader /home/user/localdev/node-binance-trader
> node ./src/trader.js

NBT auto trader running.
Exchange Minimums: [
  'ETHBTC',   'LTCBTC',   'BNBBTC',   'NEOBTC',  'QTUMETH', 'EOSETH',
  'SNTETH',   'BNTETH',   'BCCBTC',   'GASBTC',  'BNBETH',  'BTCUSDT',
  'ETHUSDT',  'HSRBTC',   'OAXETH',   'DNTETH',  'MCOETH',  'ICNETH',
  'MCOBTC',   'WTCBTC',   'WTCETH',   'LRCBTC',  'LRCETH',  'QTUMBTC',
  'YOYOBTC',  'OMGBTC',   'OMGETH',   'ZRXBTC',  'ZRXETH',  'STRATBTC',
  'STRATETH', 'SNGLSBTC', 'SNGLSETH', 'BQXBTC',  'BQXETH',  'KNCBTC',
  'KNCETH',   'FUNBTC',   'FUNETH',   'SNMBTC',  'SNMETH',  'NEOETH',
  'IOTABTC',  'IOTAETH',  'LINKBTC',  'LINKETH', 'XVGBTC',  'XVGETH',
  'SALTBTC',  'SALTETH',  'MDABTC',   'MDAETH',  'MTLBTC',  'MTLETH',
  'SUBBTC',   'SUBETH',   'EOSBTC',   'SNTBTC',  'ETCETH',  'ETCBTC',
  'MTHBTC',   'MTHETH',   'ENGBTC',   'ENGETH',  'DNTBTC',  'ZECBTC',
  'ZECETH',   'BNTBTC',   'ASTBTC',   'ASTETH',  'DASHBTC', 'DASHETH',
  'OAXBTC',   'ICNBTC',   'BTGBTC',   'BTGETH',  'EVXBTC',  'EVXETH',
  'REQBTC',   'REQETH',   'VIBBTC',   'VIBETH',  'HSRETH',  'TRXBTC',
  'TRXETH',   'POWRBTC',  'POWRETH',  'ARKBTC',  'ARKETH',  'YOYOETH',
  'XRPBTC',   'XRPETH',   'MODBTC',   'MODETH',  'ENJBTC',  'ENJETH',
  'STORJBTC', 'STORJETH', 'BNBUSDT',  'VENBNB',
  ... 1263 more items
]
Open Trades #: 1
Open Trades: { ONGUSDT608: true }

Additionally, where I use to see the message "NBT HUB => user strategies + trading setup updated" when I made changes on BVA, those messages no longer come through when I make a change.

Two questions:

  1. Should there always be a connection to https://nbt-hub.herokuapp.com:443 open, continuously? I'm seeing it be established but then drop after 4 minutes - no messages in the console. Still no strategy change messages even when it is connected.
  2. At line 80 of trader.js I see
socket.on("connect", () => {
    console.log("Auto Trader connected.".grey)
})

This message is never emitted. Is that expected?

Cannot read property 'toString' of undefined

(node:7419) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined
at start_trading (/home/tony/node-binance-trader/index.js:319:28)
at inquirer.prompt.then.answers (/home/tony/node-binance-trader/index.js:309:7)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:7419) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7419) [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.

UnhandledPromiseRejectionWarning

Receiving the following when trying to run the trader.

? Enter the Trailing Loss Percentage: 1 ? Start the trade now? Yes (node:14223) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined at start_trading (/home/tony/dev/node-binance-trader/index.js:319:28) at inquirer.prompt.then.answers (/home/tony/dev/node-binance-trader/index.js:309:7) at process.internalTickCallback (internal/process/next_tick.js:77:7) (node:14223) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:14223) [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.

fully auto?

Hello , This bot is amazing but cannot fully auto trading ...hope you can dev for fully auto .like auto tracking all symbols and auto select the uptrend symbols and place order and sell it by hit the target profit % after placing order .Thanks You !

Running Trader in EC2

Hello,
I'm trying to get the trader bot running in EC2 instance.

My binance and BvA keys are set and it looks to communicate, a strategy is set on bitcoinvsaltcoins profile, real trade activated with available BTC.
However I don't see any trades comming up or any other logs.

The only logs that I have :

NBT auto trader running.
Exchange Minimums: [
  'ETHBTC',   'LTCBTC',   'BNBBTC',   'NEOBTC',  'QTUMETH', 'EOSETH',
  'SNTETH',   'BNTETH',   'BCCBTC',   'GASBTC',  'BNBETH',  'BTCUSDT',
  'ETHUSDT',  'HSRBTC',   'OAXETH',   'DNTETH',  'MCOETH',  'ICNETH',
  'MCOBTC',   'WTCBTC',   'WTCETH',   'LRCBTC',  'LRCETH',  'QTUMBTC',
  'YOYOBTC',  'OMGBTC',   'OMGETH',   'ZRXBTC',  'ZRXETH',  'STRATBTC',
  'STRATETH', 'SNGLSBTC', 'SNGLSETH', 'BQXBTC',  'BQXETH',  'KNCBTC',
  'KNCETH',   'FUNBTC',   'FUNETH',   'SNMBTC',  'SNMETH',  'NEOETH',
  'IOTABTC',  'IOTAETH',  'LINKBTC',  'LINKETH', 'XVGBTC',  'XVGETH',
  'SALTBTC',  'SALTETH',  'MDABTC',   'MDAETH',  'MTLBTC',  'MTLETH',
  'SUBBTC',   'SUBETH',   'EOSBTC',   'SNTBTC',  'ETCETH',  'ETCBTC',
  'MTHBTC',   'MTHETH',   'ENGBTC',   'ENGETH',  'DNTBTC',  'ZECBTC',
  'ZECETH',   'BNTBTC',   'ASTBTC',   'ASTETH',  'DASHBTC', 'DASHETH',
  'OAXBTC',   'ICNBTC',   'BTGBTC',   'BTGETH',  'EVXBTC',  'EVXETH',
  'REQBTC',   'REQETH',   'VIBBTC',   'VIBETH',  'HSRETH',  'TRXBTC',
  'TRXETH',   'POWRBTC',  'POWRETH',  'ARKBTC',  'ARKETH',  'YOYOETH',
  'XRPBTC',   'XRPETH',   'MODBTC',   'MODETH',  'ENJBTC',  'ENJETH',
  'STORJBTC', 'STORJETH', 'BNBUSDT',  'VENBNB',
  ... 1189 more items
]
Open Trades #: 2
Open Trades: { MTLBTC446: true, BNBBTC446: true }

I tried before on Heroku (that's why I already have 2 open trades), and when I was selecting another strategy on my profile, I could see logs in the command line interface which is not the case now.

Any ideas if i'm doing something wrong ?

Thanks and thanks for the job done !

Can't connect to NBT anymore: "Crypto Operation Failed"

Hi there, since a few day, I can't connect the trader to NBT anymore.

I added a socket.on('connect_error', (e) => .... hook to see what's going on.
this is the error i got back:

NBT auto trader running.
Connection error Error: xhr poll error
    at XHR.Transport.onError (/home/joe/projects/trader/node-binance-trader/node_modules/engine.io-client/lib/transport.js:68:13)
    at Request.<anonymous> (/home/joe/projects/trader/node-binance-trader/node_modules/engine.io-client/lib/transports/polling-xhr.js:132:10)
    at Request.Emitter.emit (/home/joe/projects/trader/node-binance-trader/node_modules/component-emitter/index.js:145:20)
    at Request.onError (/home/joe/projects/trader/node-binance-trader/node_modules/engine.io-client/lib/transports/polling-xhr.js:314:8)
    at Timeout._onTimeout (/home/joe/projects/trader/node-binance-trader/node_modules/engine.io-client/lib/transports/polling-xhr.js:274:12)
    at listOnTimeout (node:internal/timers:556:17)
    at processTimers (node:internal/timers:499:7) {
  type: 'TransportError',
  description: Error: Unable to load PFX certificate
      at Object.createSecureContext (node:_tls_common:334:17)
      at Object.connect (node:_tls_wrap:1602:48)
      at Agent.createConnection (node:https:137:22)
      at Agent.createSocket (node:_http_agent:334:26)
      at Agent.addRequest (node:_http_agent:285:10)
      at new ClientRequest (node:_http_client:322:16)
      at Object.request (node:https:333:10)
      at Object.<anonymous> (/home/joe/projects/trader/node-binance-trader/node_modules/agent-base/patch-core.js:25:22)
      at /home/joe/projects/trader/node-binance-trader/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js:23:20
      at XMLHttpRequest.send (/home/joe/projects/trader/node-binance-trader/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js:495:17) {
    code: 'ERR_CRYPTO_OPERATION_FAILED'
  }
}

docker support

Awesome app and used it in a node docker but cannot get the backtrack function to work. Perhapse someone can create a dockerfile with postsql support that is a one click run option :) ?

Error: ETIMEDOUT request

Error: ETIMEDOUT
at Timeout. (/root/node-binance/node_modules/request/request.js:848:19)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
code: 'ETIMEDOUT',
connect: true
}
(node:88756) UnhandledPromiseRejectionWarning: Error: ETIMEDOUT
at Timeout. (/root/node-binance/node_modules/request/request.js:848:19)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
(node:88756) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:88756) [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.

multiple pair auto trade

Hello if this project can do auto tracking all pair on binance and auto place order depends of best trend pair (like Dollar cost average) and auto sell order on hit profit% or stoploss , i will donate some BTC to you anyway this bot is awesome really fast trade (open order ) i never seen before compare to other project , Thanks You !

Futures support?

As far as I can see it only supports margin trading, any chance it will also support futures trading with leverage in the near future? If I have the time I might be able to do a PR

Errors noticed

I noticed that besides the error to execute, it is also giving error in the command npm i -g

image

image

Does anyone have a solution?

Express usage on trader.js

Hey guys, I do have a question about the express usage on trader.js.

Does anyone know why we just listen to a port and serve empty string to the address?

help on run trailling stop

(node:22014) UnhandledPromiseRejectionWarning: FetchError: request to https://api.binance.com/api/v3/order?symbol=BNBETH&orderId=33545358&timestamp=1531445349308&signature=295756b3ebc8a9f053d6f5eb7779c9c76315cedcae8996783daa76a964d1f1c8 failed, reason: getaddrinfo ENOTFOUND api.binance.com api.binance.com:443
at ClientRequest. (/home/user/Desktop/cd/node_modules/node-fetch/index.js:133:11)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:22014) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:22014) [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.

Error: API-key format invalid

Hi,

Upon trying your trading bot I stumbled upon the error:
Error: API-key format invalid
I'm sure I copied and pasted the right API Key and Secret, twice.
Anything I'm doing wrong?

Cheers,

Richard

nbt will stop request binance after serveral minutes

BUYING 6.79300000 OF ONT AT MARKET PRICE
⚠️ Press [ CTRL + c ] or q to cancel the trade and sell everything at market price. ⚠️

⠴ 2:40:46 ONTUSDT qty:15.189 @ 4.41900000 pnl:0.000 INITAL BUY ORDER FULLY EXECUTED
⠇ 2:40:46 ONTUSDT qty:15.189 @ 4.41900000 pnl:0.000 FINAL BUY PRICE @ 4.419
⠙ 2:40:47 ONTUSDT qty:29.318 @ 4.41900000 pnl:0.000 STOP LOSS READY (0) @ 4.384
⠧ 2:57:22 ONTUSDT qty:5.899 @ 4.41900000 pnl:0.000

the time、qty、price 、pnl will keep static after serveral minutes,the node terminal process will never connect to binance api interface...

track all pair

hello , can you teach me how to setting for auto tracking all pair and auto place order for the bull trend pair and auto sell these pair for profit or stoploss , Thanks !

MongoDB on Heroku

Hello there,

I'm here to tell my issues to run the script on Heroku. I'm using @iyenal version of script(autobalance), and it does need mongodb to work. In this case it stores the data to Atlas cloud not to a local mongodb.

I think there's an issue caused by package-lock.json, so the error was xxx module is not found, even after you inserted that module you will somehow stuck at module named b1, I deleted package-lock.json to solve this issue.
You can check my error logs, before deleting package-lock.json
error (2).txt

I edited package.json to this,
https://gist.github.com/dederaditya/86c55a55e25fbcac0a975091acce4a80

I think this version of package.json only support trader function? Because original package.json has "main": "./src/server.js"

Question: why use `node-binance-api` and `binance-api-node`

hi, first of all, great project.

I hope you are not reading this and instead are celebrating your 600%+ gains on the bahamas.

Should you still be reading this, I have a question:
Why do you use 2 different libraries for accessing binance?

Also I published a PR for a crash that occured on my system
Thanks

INSTALL ON WINDOWS

HI I HAVE WINDOWS 10
AND I DONT KNOW HOW TO INSTALL ON WINDOWS MAYBE HELP ME
FOR EXAMPLE
WHATS EQUAL BELOW COMMAND IN WINDOWS?
cp .env.example .env

No margin pair available for some coins

For some coins, the trader.js script fails to margin buy them. Since they are not available for margin trading, the script fails to trade with them. An example of such coins is MTLBTC and ENJBTC.

The error looks like this:
ERROR 55555555555 ENJ 177 {"statusCode":500,"body":"{\"code\":-3027,\"msg\":\"Not a valid margin asset.\"}", ...

I made a pull request #80 for an automatic update of the margin pairs, but this doesn't solve the problem. In line 354 bnb_client.mgBorrow( the script should be checking if the pair is available as a margin buy/sell first.

PAIR UNKNOWN on every buy - USDT strategy support

Running the trader locally to establish everything is working before running in Docker. Version is current master. Every time a buy signal is received the message PAIR UNKNOWN is emitted:

DENTUSDT  ===> BUY 0.00578750 0.01
PAIR UNKNOWN DENTUSDT

Looking at the code I can see the conditional that is failing is line 119 in trader.js:

            if (minimums[alt + "BTC"] && minimums[alt + "BTC"].minQty) {

At startup, the exchange info does seem to be retrieved successfully:

> [email protected] trader /home/user/localdev/node-binance-trader
> node ./src/trader.js

NBT auto trader running.
Auto Trader connected.
NBT Message: Welcome user to the NBT Auto Trading Hub v.0.2.2
NBT HUB => user strategies + trading setup updated
Exchange Minimums: [ 'ETHBTC',
  'LTCBTC',
  'BNBBTC',
  'NEOBTC',
<snip>
  'BNBUSDT',
  'VENBNB',
  ... 1260 more items ]
Open Trades #: 0
Open Trades: {}

So I can see that the minimums variable has been populated there. I added a debug line just before the failing conditional:

            console.log(minimums[alt + "BTC"]);
            if (minimums[alt + "BTC"] && minimums[alt + "BTC"].minQty) {

and now I get:

DENTUSDT  ===> BUY 0.00578750 0.01
undefined
PAIR UNKNOWN DENTUSDT

so it seems the minimums variable is no longer defined. Node is version active LTS, fermium 14.6.0. The same thing happens if I build the Dockerfile provided and run that. Please could you help me diagnose further.

Trades not considering fees

Hi, first of all, amazing tool!

I'm exploring node-binance-trader with BvA, and I'm seeing that the trades doesn't consider fees, so it tries to sell the same amount of coins it has bought, causing insufficient funds error in Binance.

I'm using the "BVA3H+ ALTS" strategy and deployed the trader to Heroku from https://github.com/jsappme/nbt-binance-auto-trader project.

Am I missing something?
Thank you

Continue autotrade after interrupt

Is it possible to continue the autotrade after an interrupt of the internet connection. Sometimes it happens that my internet connection is disconnected.

Got error with Telegram when running trader mode

I set token and chat_id for telegram.
When run trader mode, the error message was as below

my-pc:node-binance-trader-master user$ npm run trader

[email protected] trader folder/node-binance-trader-master
node trader.js

[bot.plugin] loaded 'regExpMessage' plugin
[bot.plugin] loaded 'shortReply' plugin
[bot.plugin] loaded 'askUser' plugin
folder/node-binance-trader-master/trader.js:729
telBot.on('/info', async (msg) => {
^

ReferenceError: telBot is not defined
at Object. (/folder/node-binance-trader-master/trader.js:729:1)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] trader: node trader.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] trader script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

auto trade ?

hello, can i know this project can do auto trade or not , because i has runs three days , no one order on my binance acc ...hope you can help , Thanks You!

Trailing Stop Loss

When using the trailing stop loss the bot sets a Stop-Limit Ask rather than just a Limit. Therefore the Stop is set at the percentage requested but the actual limit is set at a level not specified by the user.

For E.g when I used a trailing stop loss, I set 1% as the trailing stop loss, for my first test the Stop was at 1% but the limit 5% so I ended up losing a lot more than anticipated!

Error running npm install

$ npm i --unsafe-perm 
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> [email protected] install /Users/myself/Documents/node-binance-trader/node_modules/tulind
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://tulipnode.s3.amazonaws.com/tulind/v0.8.18/Release/tulind-v0.8.18-node-v83-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, unknown) (falling back to source compile with node-gyp) 
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/Cellar/node/14.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/myself/Documents/node-binance-trader/node_modules/tulind/lib/binding/Release/node-v83-darwin-x64/tulind.node" "--module_name=tulind" "--module_path=/Users/myself/Documents/node-binance-trader/node_modules/tulind/lib/binding/Release/node-v83-darwin-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /Users/myself/Documents/node-binance-trader/node_modules/tulind
gyp ERR! node -v v14.8.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/14.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/myself/Documents/node-binance-trader/node_modules/tulind/lib/binding/Release/node-v83-darwin-x64/tulind.node --module_name=tulind --module_path=/Users/myself/Documents/node-binance-trader/node_modules/tulind/lib/binding/Release/node-v83-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/myself/Documents/node-binance-trader/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1051:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Darwin 19.6.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/14.8.0/bin/node" "/Users/myself/Documents/node-binance-trader/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/myself/Documents/node-binance-trader/node_modules/tulind
node-pre-gyp ERR! node -v v14.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node/14.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/myself/Documents/node-binance-trader/node_modules/tulind/lib/binding/Release/node-v83-darwin-x64/tulind.node --module_name=tulind --module_path=/Users/myself/Documents/node-binance-trader/node_modules/tulind/lib/binding/Release/node-v83-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myself/.npm/_logs/2021-02-18T10_27_15_866Z-debug.log

Timestamp

Hello Thanks For This Awesome project I guess ,
I've an issue , please
I Answer All questions then Type Y to start trading but ...
it doesn't Trade , Shows me this instead
.
'Error: Timestamp for this request is outside of the recvWindow'
i hope you can help me fixing this
thanks in advanced
Notes:
my time >> UTC
my OS >> Parrot On VM

async function without a catch block

⠼ 2:08:33 NEOUSDT qty:0.610 @ 39.66000000 pnl:0.000(node:37888) UnhandledPromiseRejectionWarning: Error: Order does not exist.
at /Users/sky/Downloads/nbt3/node_modules/binance-api-node/dist/http.js:47:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:37888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:37888) [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.

Socket documentation

I am developing my own strategy and I had a lot of problems to connect with websockets.

I was using the version 4 of the socket.io-client. Then I used 2.2 version when I look your package json.

I think that will be in the documentation, in the sockets section.

install error

npm ERR! path /usr/lib/node_modules/.staging/node-binance-trader-042c8784/node_modules/accepts
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/node-binance-trader-042c8784/node_modules/accepts' -> '/usr/lib/node_modules/.staging/accepts-3b7c53a8'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/bitnami/.npm/_logs/2019-05-29T13_20_52_651Z-debug.log

ERRROR #1233 - Error: Account has insufficient balance for requested action.

Hello, I get very often this error. Maybe possible is set a little delay before set stop loss? or it's other kind problem?

⠏ 3:33:42 RVNBTC qty:3986.000 @ 0.00000810 pnl:0.000 INITAL BUY ORDER FULLY EXECUTED
⠸ 3:33:42 RVNBTC qty:1746.000 @ 0.00000808 pnl:-0.737 FINAL BUY PRICE @ 0.0000081
⠇ 3:33:42 RVNBTC qty:1746.000 @ 0.00000808 pnl:-0.737 ERRROR #1233 STOP PRICE (0.00000802) Error: Account has insufficient balance for requested action.

Errors running scripts

Hi

I followed your guide to the best of my ability but when I get to the part npm run start my console freezes with this message.

When I run the npm run trader script again my console freezes looking like this.

I have checked all my API and BvA keys were input correctly so I have no clue what the problem is.

Hope somebody can help me out here.

Cheers,
Alex

Connection issue with BvA on new version

I run the bot on VPS located in Japan, runing on NPM version 7.5.6.
What I did to recreate this issue?

sudo apt install npm
git clone https://github.com/jsappme/node-binance-trader
cd node-binance-trader
npm i --unsafe-perm
npm run trader

Here is the new version I cloned few minutes ago
image
Seems like the bot can't connect to BvA
image

But it's working on old and version in heroku
image
It is working.

Thanks

Pairs in ENV

In trader, at this moment, the pair is hardcoded and margin_pairs variable too.

I think that this 2 variables must be in .env file. Because we must configure if we want use, for example, and USDT strategy like "ZEN", and the same for the pairs.

It's a suggestion.

couple of node errors when starting trader - full trace. BvA key related

ERROR UpdateOpenTrades User Unknown #321 double check your BvA key
(node:8264) UnhandledPromiseRejectionWarning: false
(node:8264) UnhandledPromiseRejectionWarning

error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:8264) [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

Incompatible with Linux screen

For whatever reason, this program does not work when attempting to run it with the Linux command screen. I am running this command so I can idle the program on my server without needing the terminal open (and in case of connection drops).

Example: 'screen node index.js' leads to the program hanging at the NBT logo, the first question regarding order pair does not come up as expected.

Is there any way I can hardcode my config so I could use nohup instead? Thanks.

Issues with `talib`

Is talib (https://www.npmjs.com/package/talib) a requirement for this app to work? I tried running npm run bt, but it said it couldn't find talib, but when I npm install talib --save-dev, talib errors out on the install. I am running node@8 too. Not sure if that has any issues, but. The other node commands worked, except for npm run trader, I get output, but on each call, I am getting an undefined string. Here's an example output of that

=> BUY SIGNAL EOSBTC undefined
(node:26329) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'padStart' of undefined
    at Socket.socket.on (/Volumes/localdev/crypto/node-binance-trader/trader.js:46:32)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:26329) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

Here's the error when doing npm install talib --save-dev

../src/talib.cpp:1086:1: error: C++ requires a type specifier for all declarations
NODE_MODULE_INIT(/* exports, module, context */) {
^
../src/talib.cpp:1087:10: error: use of undeclared identifier 'exports'
    Init(exports, context);
         ^
../src/talib.cpp:1087:19: error: use of undeclared identifier 'context'
    Init(exports, context);
                  ^
3 warnings and 3 errors generated.
make: *** [Release/obj.target/talib/src/talib.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node@8/8.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node@8/8.16.0/bin/node" "/usr/local/Cellar/node@8/8.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /Users/xxx/temp/node_modules/talib
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/xxx/temp/package.json'
npm WARN temp No description
npm WARN temp No repository field.
npm WARN temp No README data
npm WARN temp No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./src/lib/build.js && node-gyp configure && node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2019-06-16T17_40_02_133Z-debug.log
Execution time: 0h:00m:24s sec

Undefined error on trader

I am currently getting the following error when the trader receives input from the socket from the server. I just pulled the repo yesterday too. I saw someone had the same issue, and that it was fixed in a new version but still happening on master

> [email protected] trader /Users/xxx/crypto/node-binance-trader
> node trader.js

NBT trader running.
Trader connected.
=> BUY SIGNAL BNBBTC undefined
(node:38523) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'padStart' of undefined
    at Socket.<anonymous> (/Users/xxx/crypto/node-binance-trader/trader.js:46:32)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:38523) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:38523) [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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.