Open rodrigo-brito opened 2 years ago
hi, @rodrigo-brito ,
to confirm:
use Binance user stream
as alternative? or replace polling with Binance user stream
?
just in case there are any scenarios beyond my thoughts where polling is better, so keep polling is necessary,
I think we can replace it.
sorry, i can not work on this because i am busy with my other staff, considering it's only improvement and not urgent, so maybe close it,
In the discussion https://github.com/rodrigo-brito/ninjabot/discussions/130, @davidxiao suggest to use Binance user stream instead of orders polling.
When we have orders with status PENDNG, the bot will poll from Binance the order status each second. It can be replaced by a stream that receive updates from Binance.
We found the logic here: https://github.com/rodrigo-brito/ninjabot/blob/1a3585bedbaf66ba35e9377635877aa688e5a1e0/order/controller.go#L278-L287