I’m running algo code and I want to exit all positions for the day, If position’s P&L reaches some defined value. Is there any fyers API can give me the positions P&L, So that I can try fetch the value for every 30 seconds something like that.
but you won’t be able to call every 30 seconds, rate limit will be get exceeded.
You can fetch the data using Position API , please find the docs for it :
https://myapi.fyers.in/docsv3#tag/Transaction-Info/paths/~1Transaction%20Info/patch