jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.58k stars 767 forks source link

Trigger callback when order trigger #907

Open tamdc opened 6 months ago

tamdc commented 6 months ago

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?

giladsmg commented 5 months ago

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