Closed mmaestrini closed 1 year ago
Hi @mmaestrini
Yes, pretty much all the major exchanges have websocket topics for this. For bybit, take a look at this example with the WebsocketClient in the SDK: https://github.com/tiagosiebler/bybit-api/blob/master/examples/ws-private-v5.ts
The calls to subscribeV5()
subscribe to different topics. You can see a list of topics in bybit's api docs - e.g. you'll probably want the position or execution topic:
https://bybit-exchange.github.io/docs/v5/websocket/private/position
Events on all subscribed topics come through the 'update' event in the ws client: https://github.com/tiagosiebler/bybit-api/blob/master/examples/ws-private-v5.ts#L35-L38
Will close this for now. If there's further questions or if you notice any issues, feel free to open a new issue. Thanks!
Hey Tiago! thanks a ton, found it !
Appreciate the help!
Hi everyone,
is it possible to get a notification whether via socket/webhook whenever a trade is opened?
I guess currently what I would have done is just ping the open orders with some regularity (every couple of seconds i guess).. Any help is appreciated :)