chrisleekr / binance-trading-bot

Automated Binance trading bot - Trade multiple cryptocurrencies. Buy low/sell high with Grid Trading. Integrated with TradingView technical analysis

Home Page:https://binance-trading-bot-chrisleekr.cloud.okteto.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change multi symbol trade setting.

ienthach opened this issue · comments

  • I trade 5 symbols in 1 docker at same time.

first request

  • some time i need to change all symbol setting but if i use global setting, every symbol will be customised setting. then i have to modify every symbol setting.
  • have a way to make change at same time.

second request

  • With the limit of ip request api, the tick only happen in 1 second. but i have 5 symbols trading, so a symbol have to wait 4 second to get the turn.
  • have a way to request all symbol info at a time for calculate the trading.
commented

In my experience, when you change the global setting all symbols show customised setting, but after some time they get updated to the global setting.

i tested, after 10 minutes global setting changed, they still customised on all symbol.

i tested, after 10 minutes global setting changed, they still customised on all symbol.

Are you using Docker Desktop for Windows?

i use docker on macos, i change to docker on centOS, now it fine.

Thanks for the suggestions @ienthach

First request:
At the moment, once configure the symbol configuration, it won't be updated even if you update the global configuration.

I think it's a valid point that if you update global configuration, symbol configuration that is using global configuration should be updated as well. I will add that feature in the next update.

Second request:

It is tricky because the bot should not exceed Binance API limit.
In each tick, the bot is executing multiple API calls, it is easy to exceed 1200 requests per minute.

1200 requests per minute
10 orders per second
100,000 orders per 24hrs

I see that, could we use Symbol price ticker, https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#symbol-price-ticker, to get all the price then we look at symbol we want.

Hm, each tick requires to get candles for the coin - https://github.com/chrisleekr/binance-trading-bot/blob/master/app/jobs/trailingTrade/step/get-indicators.js#L74

However, I did second thought.

If I separate the job for getting the candles for calculating the lowest price, it can be possible.
So each tick, the bot get all the price for monitoring coins with the single request and compare against the lowest value from another job.

This will require a massive refactoring code.
I will try to update the bot when I get time.

@chrisleekr I was thinking.... can we sponsor this 2nd feature request?

It's clear that is a major code refactor and you have a daily job... I am just thinking out loud...

@chopeta If you are talking about money, don't need it. It will just give me more pressure :)

I am doing it for my learning purpose as well.

Have you looked at websocket stream. It will make the best performance for get price. No limit request anymore, quicker to catch the pump.

@ienthach

I have fixed the first request which is the issue with the global configuration.
Please check the new version.
https://github.com/chrisleekr/binance-trading-bot/releases/tag/v0.0.65

Appreciate it @chrisleekr , will be waiting for it!

Have you looked at websocket stream. It will make the best performance for get price. No limit request anymore, quicker to catch the pump.

Websocket for Binance does not return previous candles - Refer https://github.com/Ashlar/binance-api-node#candles-1

I thought I will use it for getting the current price; however, it's hard to control with configuration changes.

I think I will stick with API for now as it is easy to control.

I have some progress with this feature and I am using Binance Websocket as well.

Let me run some days and see whether there is any bug I missed.

image

Looking promising.... Can't wait to use!