ninjabot icon indicating copy to clipboard operation
ninjabot copied to clipboard

Improve `/balance` command performance

Open rodrigo-brito opened this issue 2 years ago • 6 comments

When we request the balance summary, ninjabot will request the position for each trading pair and report a summary. But in this case, we request the same function multiple times: binance.Account()

https://github.com/rodrigo-brito/ninjabot/blob/1a3585bedbaf66ba35e9377635877aa688e5a1e0/exchange/binance.go#L444-L455

A good approach to improve the performance are: Request binance.Account() once and calculate the summary for all pairs in the same time.

rodrigo-brito avatar Mar 30 '22 00:03 rodrigo-brito

I would like to do this feature ;)

panapol-p avatar Apr 01 '22 05:04 panapol-p

Hi @panapol-p, thank you for the help!

rodrigo-brito avatar Apr 01 '22 10:04 rodrigo-brito

I find better solution for this issue, I will work on it first, the pull request was cloesd that need implement 2 function with the same functional for new exchange it is not good I think

panapol-p avatar Apr 14 '22 04:04 panapol-p

Ok @panapol-p, thank you for the help!

rodrigo-brito avatar Apr 15 '22 00:04 rodrigo-brito

Hi @rodrigo-brito after I try to work with my new idea, it's not worked now I re-open the pull request. could you please review this one thank you.

panapol-p avatar May 07 '22 17:05 panapol-p

Hi @panapol-p, thank you. I will check soon.

rodrigo-brito avatar May 08 '22 00:05 rodrigo-brito

Hi, @rodrigo-brito I think this issue was fixed. may be we can close this issue. or you have any suggestion for this one?

panapol-p avatar Oct 16 '22 16:10 panapol-p

Sure! Closing due #184

rodrigo-brito avatar Oct 16 '22 18:10 rodrigo-brito