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.01k stars 1.1k forks source link

Binance US #146

Open techydad05 opened 3 years ago

techydad05 commented 3 years ago

Does the binance us api work with this bot? Im sorry if this question has been answered I searched for it and was unable to find anything specific about binance us.

joechookaszian commented 3 years ago

I switched the node dependency and then pointed the app(binance.js) towards us-binance dependency instead and everything seems to be working OK.

https://www.npmjs.com/package/us-binance-api-node

chrisleekr commented 3 years ago

Interesting. Just did a quick research and seems you can use it by changing the endpoint

https://github.com/Ashlar/binance-api-node/issues/307

But it seems doesn't support WebSocket based on the official doc - https://github.com/binance-us/binance-official-api-docs/blob/master/rest-api.md#general-information-on-endpoints

It means, you can use it for the current master version, but not for the upcoming update. Hmm... Let me try and see whether I can use it for Binance US.

FanaticNinja commented 3 years ago

I switched the node dependency and then pointed the app(binance.js) towards us-binance dependency instead and everything seems to be working OK.

https://www.npmjs.com/package/us-binance-api-node

I found where to change these in binance.js, package.json as well as package-lock.json. Is this all the places I need to make a change?

joechookaszian commented 3 years ago

Yes that should work

broxicus commented 3 years ago

I keep coming up with problems trying to get the us support to work. Either I run into API issues(live) using the multiple tracking of coins, or I try the orig install and run into unhandled promise rejection.

I wish I were smarter when it came to this stuff. Possible to get a us supported version to work?

Jacques717 commented 3 years ago

ERROR: binance-api/38 on d5102b6c907b: Something wrong with trailing-trade-common cache (version=0.0.66, gitHash=unspecified, server=websocket, e={}) payload: { "command": "latest", "data": {} }

@chrisleekr any ideas? binance.js const Binance = require('us-binance-api-node').default;

package.json "us-binance-api-node": "~0.9.10",

chrisleekr commented 3 years ago

@Jacques717 sorry for the late reply.

I haven't had time to test Binance US.

I think the best way is to use https://github.com/ccxt/ccxt It will give much flexibility to expand to different exchanges. However, I found free version does not provide the WebSocket feature, which is a critical feature for this bot.