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
It was running fine since I only dealt with NSE and NFO instruments yet. I tried CDS for first time. I am pasting the output of ticks by subscribing two instruments "NIFTY2351118300CE"(10359554) and "USDINR23512FUT" (435203)
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.
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 }
I am not using any library,
I read the docs here https://kite.trade/docs/connect/v3/ and created my own package to wrap all these docs.
It was running fine since I only dealt with NSE and NFO instruments yet.
I tried CDS for first time.
I am pasting the output of ticks by subscribing two instruments "NIFTY2351118300CE"(10359554) and "USDINR23512FUT" (435203)
+mode: full, instrumentToken: 435203, ltp: 8202250.00, avg: 8203019.99, bqty: 23406, sqty: 23207, O:8206750.00 H:8209250.00 L:8197250.00 C:8207250.00 V: 102397, ltt: 11:40:32, et: 11:40:55,OI: 54560, HOI: 62013, LOI: 54399
+mode: full, instrumentToken: 10359554, ltp: 59.70, avg: 73.22, bqty: 702050, sqty: 1077200, O: 50.00 H: 104.70 L: 42.00 C: 71.40 V: 129365800, ltt: 11:40:55, et: 11:40:55,OI: 7583600, HOI: 9725250, LOI: 4811650
+mode: full, instrumentToken: 10359554, ltp: 59.40, avg: 73.21, bqty: 692450, sqty: 1079200, O: 50.00 H: 104.70 L: 42.00 C: 71.40 V: 129371600, ltt: 11:40:55, et: 11:40:55,OI: 7583600, HOI: 9725250, LOI: 4811650
+mode: full, instrumentToken: 435203, ltp: 8202250.00, avg: 8203019.99, bqty: 23556, sqty: 23147, O:8206750.00 H:8209250.00 L:8197250.00 C:8207250.00 V: 102397, ltt: 11:40:32, et: 11:40:56,OI: 54560, HOI: 62013, LOI: 54399
+mode: full, instrumentToken: 10359554, ltp: 59.55, avg: 73.21, bqty: 698400, sqty: 1077900, O: 50.00 H: 104.70 L: 42.00 C: 71.40 V: 129372200, ltt: 11:40:56, et: 11:40:56,OI: 7583600, HOI: 9725250, LOI: 4811650
+mode: full, instrumentToken: 435203, ltp: 8202250.00, avg: 8203019.99, bqty: 23556, sqty: 23147, O:8206750.00 H:8209250.00 L:8197250.00 C:8207250.00 V: 102397, ltt: 11:40:32, et: 11:40:57,OI: 54560, HOI: 62013, LOI: 54399
+mode: full, instrumentToken: 10359554, ltp: 59.25, avg: 73.21, bqty: 682450, sqty: 1097200, O: 50.00 H: 104.70 L: 42.00 C: 71.40 V: 129397150, ltt: 11:40:57, et: 11:40:57,OI: 7583600, HOI: 9725250, LOI: 4811650
as you can see same code is parsing correctly the NFO instrument but not CDS.
So, I am asking is there anything special for CDS instruments
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,
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