What is the recommended way to fetch the running PnL (M2M) in real time?

It can be achieved by tracking the live prices of the open positions using a websocket. However, using get_positions in an infinite loop to fetch daily M2M is less reliable and harmful to the API performance. get_positions can be used sparingly, but for real-time m2m updates, websocket usage is advised, which gives the fastest, lightest and most reliable performance.

Still Have Doubts? Talk to Us

If your question wasn’t answered above, we’re here for you. Reach out to our team for assistance.

Chat with us

Got questions? Get answers instantly

Contact us

Reach out to our customer care team for quick assistance

Customer Support