bmino / binance-triangle-arbitrage

Detect in-market cryptocurrency arbitrage
MIT License
1.08k stars 340 forks source link

balanceData error #81

Closed noahwalugembe closed 5 years ago

noahwalugembe commented 5 years ago

[ 'balanceData error', {} ] { Error: ESOCKETTIMEDOUT at ClientRequest. (C:\Users\NOAH\node\binance-triangle\node_mod es\request\request.js:816:19) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:106:13) at ClientRequest.emit (events.js:208:7) at TLSSocket.emitTimeout (_http_client.js:706:34) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket.Socket._onTimeout (net.js:410:8) at ontimeout (timers.js:498:11) code: 'ESOCKETTIMEDOUT', connect: false }

bmino commented 5 years ago

I assume this is an error you are receiving? Please provide some context ie when does this error occur, provide the rest of the stack trace, what is your operating system, node version etc.

noahwalugembe commented 5 years ago

Thanks dear i thing it was my network problem how can i deploy this project on a service like heroku or so that it can run on its own i have tried it out but it is not working.

bmino commented 5 years ago

I would recommend something like AWS

noahwalugembe commented 5 years ago

thanks @bmino have you currently able deploying this project in any cloud linux /unix VM if yes that is the min um BNB balance needed to execute successful trades. currently am able to spot to arbitrage opportunities but i cant execute any.

Iam also trying to understand the code base can you email me an explanation on how function calculateArbitrage() works.

bmino commented 5 years ago

I use AWS regularly for the best performance and latency. Personally I run ubuntu/windows locally.

calculateArbitrage() does the following:

  1. Clones a copy of the depth cache of all related symbols
  2. Iteratively calculates if there is a triangle arbitrage opportunity for any pairing
  3. Updates the HUD
  4. Makes logging updates
  5. Sets a timeout before repeating the process

Go ahead an open a new issue if you want some further discussion about this