Query Regarding 'cmd' field deprecation

Hi Fyers Team,

I got a message from Fyers regarding the ‘cmd’ field getting deprecated with the below link.

https://www.fyers.in/notice-board/action-required-cmd-field-in-api-to-be-deprecated.html

  • Where is the ‘cmd’ field used? Is it only in Quotes api or is it used anywhere else?

What are the equivalents for the The components in ‘cmd’ field

  • close(c) - high(h) - low(l) - open(o) - time(t) - tf - v
    Can the open_price,high_price,low_price,prev_close_price, be used directly or should we modify something? What values should we use for t,tf,v when we use the new datastructure?

This is the present quote I am receiving.

{‘n’: ‘NSE:BANKNIFTY2431348200CE’, ‘v’: {‘ask’: 290.9, ‘bid’: 290.45, ‘chp’: -7.91, ‘ch’: -25, ‘cmd’: {‘c’: 291.2, ‘h’: 293.15, ‘l’: 291.2, ‘o’: 293.15, ‘t’: 1709784000, ‘tf’: ‘09:30’, ‘v’: 2190}, ‘description’: ‘NSE:BANKNIFTY2431348200CE’, ‘exchange’: ‘NSE’, ‘fyToken’: ‘101124031341939’, ‘high_price’: 350, ‘low_price’: 290.25, ‘lp’: 291.2, ‘open_price’: 328.8, ‘original_name’: ‘NSE:BANKNIFTY2431348200CE’, ‘prev_close_price’: 316.2, ‘short_name’: ‘BANKNIFTY2431348200CE’, ‘spread’: 0.45, ‘symbol’: ‘NSE:BANKNIFTY2431348200CE’, ‘tt’: ‘1709769600’, ‘volume’: 2021880}, ‘s’: ‘ok’}

Thank you

Sree Ram

I have opened a discussion here

the Reason for deprecating CMD field in API response (fyers.in)

The CMD was very useful, so if you polled once a minute you would get current-minute-data ohlcv

Now, you will have to store and build candles at client end, because open,high,low etc are the the Day open, Day high, Day low fields. Volume is also cumulative of the whole day when calling quote.

Now you use tt or tradetime and convert to your datetime.

Imo, its a not a friendly move, it served a very good backup when socket problems came. Now you can still maintain state but all of this has to be done with more logic at your end. I adapted code to my needs.

Thank you Chirag​:+1: