CDS instrument like USDINR ticks

zhkas
I am receiving ltp like 63750 instead of 6.3750
or 8216500.00 instead of 82.1650

Is it acceptable, or do I need to change decimal on my end
or is my code wrong and making it looks like this.
It is working correct for NSE or NFO instruments, but for CDS decimal is displaced, or missing

Please help
  • sujith
    Can you mention which client library you are using and the version details of the same?
  • zhkas
    My yesterday comment with link of kite doc is not yet approved and so this conversation get delayed.

    I am posting again but without link.
    I am not using any client library, but read kite docs and created my own package.
    I didn't face any problem yet , as I was using NFO only.
    TRied first time CDS and saw this bug.
    I am pasting the output I am getting.
    I am subscribing (2842371 , 10359554)
    one is NFO instrument and other is CDS instrument.

    mode: full, instrumentToken: 2842371, ltp: 38750.00, avg: 47535.08, bqty: 6141, sqty: 7168, O: 53750.00 H: 55750.00 L: 37750.00 C: 46750.00 V: 68056, ltt: 13:44:14, et: 13:45:17,OI: 14058, HOI: 18036, LOI: 12004
    mode: full, instrumentToken: 10359554, ltp: 14.40, avg: 21.83, bqty: 17102700, sqty: 3368700, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511474950, ltt: 13:45:25, et: 13:45:25,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 10359554, ltp: 14.40, avg: 21.83, bqty: 17102700, sqty: 3368700, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511474950, ltt: 13:45:25, et: 13:45:25,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 2842371, ltp: 38750.00, avg: 47535.08, bqty: 6141, sqty: 7268, O: 53750.00 H: 55750.00 L: 37750.00 C: 46750.00 V: 68056, ltt: 13:44:14, et: 13:45:26,OI: 14058, HOI: 18036, LOI: 12004
    mode: full, instrumentToken: 10359554, ltp: 14.35, avg: 21.83, bqty: 17105750, sqty: 3370350, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511499850, ltt: 13:45:25, et: 13:45:26,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 10359554, ltp: 14.35, avg: 21.83, bqty: 17105750, sqty: 3370350, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511499850, ltt: 13:45:25, et: 13:45:26,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 2842371, ltp: 38750.00, avg: 47535.08, bqty: 6141, sqty: 7268, O: 53750.00 H: 55750.00 L: 37750.00 C: 46750.00 V: 68056, ltt: 13:44:14, et: 13:45:26,OI: 14058, HOI: 18036, LOI: 12004
    mode: full, instrumentToken: 10359554, ltp: 14.40, avg: 21.83, bqty: 17115400, sqty: 3366950, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511508500, ltt: 13:45:26, et: 13:45:26,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 10359554, ltp: 14.40, avg: 21.83, bqty: 17115400, sqty: 3366950, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511508500, ltt: 13:45:26, et: 13:45:26,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 2842371, ltp: 38750.00, avg: 47535.08, bqty: 6141, sqty: 7268, O: 53750.00 H: 55750.00 L: 37750.00 C: 46750.00 V: 68056, ltt: 13:44:14, et: 13:45:27,OI: 14058, HOI: 18036, LOI: 12004
    mode: full, instrumentToken: 10359554, ltp: 14.55, avg: 21.83, bqty: 17116600, sqty: 3365750, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511519050, ltt: 13:45:26, et: 13:45:27,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 10359554, ltp: 14.55, avg: 21.83, bqty: 17116600, sqty: 3365750, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511519050, ltt: 13:45:26, et: 13:45:27,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 2842371, ltp: 38750.00, avg: 47535.08, bqty: 6141, sqty: 7268, O: 53750.00 H: 55750.00 L: 37750.00 C: 46750.00 V: 68056, ltt: 13:44:14, et: 13:45:27,OI: 14058, HOI: 18036, LOI: 12004
    mode: full, instrumentToken: 10359554, ltp: 14.70, avg: 21.83, bqty: 17114850, sqty: 3353850, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511546300, ltt: 13:45:27, et: 13:45:27,OI: 19779800, HOI: 19779800, LOI: 8602650
    mode: full, instrumentToken: 10359554, ltp: 14.70, avg: 21.83, bqty: 17114850, sqty: 3353850, O: 30.00 H: 45.90 L: 10.00 C: 39.60 V: 511546300, ltt: 13:45:27, et: 13:45:27,OI: 19779800, HOI: 19779800, LOI: 8602650



    As, you can see same code ( I mean parsing of binary message) is generating valid values for NFO but not for CDS.

    Please help,
  • sujith
    The divisor for CDS and BCD are different. You can refer to the python client library for the values.
  • zhkas
    zhkas edited May 2023
    Got it
    Thanks for the help

    Missed this in doc
    All prices are in paise. For currencies, the int32 price values should be divided by 10000000 to obtain four decimal plaes. For everything else, the price values should be divided by 100.

    Found my code too, completely missed it

    func (t *Ticker) turnToRupee(value float64) float64 {
    return value / 100.0
    }

    Thanks
This discussion has been closed.