chrisleekr / binance-trading-bot

Automated Binance trading bot - Trade multiple cryptocurrencies. Buy low/sell high with Grid Trading. Integrated with TradingView technical analysis
MIT License
5.11k stars 1.1k forks source link

Add https://www.npmjs.com/package/binance-api-node proxy configuration #124

Open 556isback opened 3 years ago

556isback commented 3 years ago

I’ve been experiencing internet issue when connecting to binance via ccxt. Adding proxy configuration is much appreciated In python the proxy configuration look like this binance_exchange = ccxt.binance({ 'timeout': 15, 'enableRateLimit': True, 'proxies': {'https': "http://127.0.0.1:1087", 'http': "http://127.0.0.1:1087"} })

chrisleekr commented 3 years ago

Hi @556isback

I am using binance-api-node, not cctx. I just checked its API doc, it seems not to support proxy.

However, I found an issue opened for asking the proxy support. https://github.com/Ashlar/binance-api-node/issues/400

Once they support it, I can add it in.

556isback commented 3 years ago

Thanks @chrisleekr Look forward to the proxy support!

556isback commented 3 years ago

@chrisleekr This might be a way around. Is it possible to change the container network from bridge to host? Since the container database is using port blinding i'm not sure how to change it.

chrisleekr commented 3 years ago

@556isback You can simply edit docker-compose.server.yml if you are using it.

https://github.com/chrisleekr/binance-trading-bot/blob/master/docker-compose.server.yml#L54