bmino / binance-triangle-arbitrage

Detect in-market cryptocurrency arbitrage
MIT License
1.07k stars 338 forks source link

ETIMEDOUT and proxy server. #150

Closed sdn9002 closed 3 years ago

sdn9002 commented 3 years ago

Can I use this tool behind a proxy server? I'm receiving "Error: ETIMEDOUT" on "Checking latency ..." step. I'm using default configuration. I've also tried to set SCANNING.WHITELIST, but the result is the same - "Error: ETIMEDOUT".

D:\binance-triangle-arbitrage-6.2.0>npm start

binance-triangle-arbitrage@6.2.0 start D:\binance-triangle-arbitrage-6.2.0 node src/main/Main.js

Checking configuration ... Checking latency ... Error: ETIMEDOUT at Timeout. (D:\binance-triangle-arbitrage-6.2.0\node_modules\request\request.js:848:19) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) { code: 'ETIMEDOUT', connect: true } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! binance-triangle-arbitrage@6.2.0 start: node src/main/Main.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the binance-triangle-arbitrage@6.2.0 start 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! C:\Users\xxxxxx\AppData\Roaming\npm-cache_logs\2021-04-19T12_27_42_529Z-debug.log

D:\binance-triangle-arbitrage-6.2.0>

bmino commented 3 years ago

I have not implemented any support specifically for using a proxy mainly because any middleware introduces unwanted latency in such a time-sensitive process.

Your run failed when making a single request for server time. This happens before any websockets are initiated or depth cache requests are made. Pretty odd since that is not demanding. Are you rate limited?

bmino commented 3 years ago

I've gotten that maybe twice in my whole time dev'ing this. I restarted the bot and chalked it up to a network fluke

sdn9002 commented 3 years ago

Thank you for your response. I'm not rate/speed limited. I'm behind an enterprise proxy server on work machine, otherwise I can't connect to the internet. I've tried the tool on my home machine (not behind proxy server) and there are negative numbers for age column.

bmino commented 3 years ago

That work proxy might not like requests being made out to Tokyo haha. As for the negative age numbers, my first thought is a syncing issue with your local time. Can you resync to a time server and retry?

ScuzzyHoulihan commented 3 years ago

Anyone find a solution to this issue? Having this issue once I set execution value to true.