Tick data structure differs when my server is http vs https. Why is this difference?

Muukund
I figured this by dumping the tick data on two machines
https server example:
2022-02-28 10:43:44: Ticks dump :- [{'tradable': True, 'mode': 'quote', 'instrument_token': 14696450, 'last_price': 167.1, 'last_traded_quantity': 100, 'average_traded_price': 129.08, 'volume_traded': 3757200, 'total_buy_quantity': 127850, 'total_sell_quantity': 93850, 'ohlc': {'open': 144.0, 'high': 180.05, 'low': 102.35, 'close': 235.65}, 'change': -29.089751750477404}, {'tradable': True, 'mode': 'quote', 'instrument_token': 14664706, 'last_price': 866.35, 'last_traded_quantity': 25, 'average_traded_price': 918.54, 'volume_traded': 596000, 'total_buy_quantity': 57700, 'total_sell_quantity': 36025, 'ohlc': {'open': 778.15, 'high': 1038.45, 'low': 776.6, 'close': 635.95}, 'change': 36.229263306863736}, {'tradable': True, 'mode': 'quote', 'instrument_token': 14664450, 'last_price': 297.0, 'last_traded_quantity': 25, 'average_traded_price': 284.8, 'volume_traded': 2622000, 'total_buy_quantity': 121925, 'total_sell_quantity': 86825, 'ohlc': {'open': 522.3, 'high': 522.3, 'low': 236.1, 'close': 607.6}, 'change': -51.1191573403555}, {'tradable': True, 'mode': 'quote', 'instrument_token': 14696706, 'last_price': 289.4, 'last_traded_quantity': 50, 'average_traded_price': 340.55, 'volume_traded': 1013050, 'total_buy_quantity': 63750, 'total_sell_quantity': 70000, 'ohlc': {'open': 270.0, 'high': 400.65, 'low': 253.0, 'close': 243.9}, 'change': 18.65518655186551}]

http server example:
2022-02-28 12:17:52: Ticks dump :- [{'tradable': True, 'mode': 'quote', 'instrument_token': 14663170, 'last_price': 630.05, 'last_quantity': 25, 'average_price': 686.95, 'volume': 2588450, 'buy_quantity': 203100, 'sell_quantity': 84125, 'ohlc': {'open': 682.0, 'high': 854.9, 'low': 579.6, 'close': 522.05}, 'change': 20.68767359448329}, {'tradable': True, 'mode': 'quote', 'instrument_token': 14662914, 'last_price': 637.95, 'last_quantity': 25, 'average_price': 509.56, 'volume': 7375525, 'buy_quantity': 129000, 'sell_quantity': 75075, 'ohlc': {'open': 519.85, 'high': 737.5, 'low': 346.85, 'close': 789.6}, 'change': -19.20592705167173}, {'tradable': True, 'mode': 'quote', 'instrument_token': 14696706, 'last_price': 245.9, 'last_quantity': 50, 'average_price': 271.6, 'volume': 3913850, 'buy_quantity': 94700, 'sell_quantity': 111650, 'ohlc': {'open': 270.0, 'high': 400.65, 'low': 216.45, 'close': 243.9}, 'change': 0.8200082000820008}, {'tradable': True, 'mode': 'quote', 'instrument_token': 14696450, 'last_price': 237.4, 'last_quantity': 100, 'average_price': 193.53, 'volume': 11331650, 'buy_quantity': 110900, 'sell_quantity': 132050, 'ohlc': {'open': 144.0, 'high': 284.75, 'low': 102.35, 'close': 235.65}, 'change': 0.7426267769997879}]
  • Muukund
    last_quantity vs last_traded_quantity
    volume vs volume_traded
    buy_quantity vs total_buy_quantity
    sell_quantity vs total_sell_quantity
    average_price vs average_traded_price
  • sujith
    Are you sure you are using the same version of pykiteconnect on both machines?
  • Muukund
    I installed kiteconnect newly on the machine which shows last_traded_quantity. The one showing last_quantity is older install
  • SRIJAN
    Actually,the last quantity,volume, average_price terms are from the newer versions. Check the version of pykiteconnect you installed where it shows last_traded_quantity,volume_traded,average_traded_price etc. You might be using some old version.
  • Muukund
    No Srijan. I have 4.0.0 version where it shows last_traded_quantity,volume_traded,average_traded_price. In 3.9.2 version, it is showing last quantity,volume, average_price
  • SRIJAN
    Oh yes,sorry my bad,the v4 has these new fields last_traded_quantity,volume_traded,average_traded_price. The 3.9 version has last quantity,volume, average_price. I told you the opposite. :| You can see here,
    https://github.com/zerodha/pykiteconnect

    It's mentioned in the section v4-breaking changes: Renamed ticker fields as per kite connect doc.
  • Muukund
    Doc reference pointing to older field structure. This needs correction.
  • SRIJAN
    SRIJAN edited February 2022
    You mean doc on GitHub?? Yes.
Sign In or Register to comment.