node-binance-api icon indicating copy to clipboard operation
node-binance-api copied to clipboard

Trigger callback when order trigger

Open tamdc opened this issue 1 year ago • 1 comments

Is there any way to do a callback when an order triggered? I am doing a bot trade, but got stuck at moving the SL to the break event when the first TP hit - which is an LIMIT order. But don't know how to do it. I read the source also but seems like it does not support this function. Any help guys?

tamdc avatar Mar 23 '24 07:03 tamdc

you can use the userData api and provide execution callback like this: binance.websockets.userData( accountUpdateCB, executionCB ) the executionCB will be triggered when order is been placed

giladsmg avatar Apr 15 '24 14:04 giladsmg