Getting zero value for OI data

keshavdeshpande
Hello,

I am trying to get the tick data, but while fetching the OI details I am getting only 0 values. Is there any problem related to the same?

Please find my code snippet below:
@Override
public void onTicks(ArrayList<Tick> ticks) {

NumberFormat formatter = new DecimalFormat();
System.out.println("ticks size " + ticks.size());
if (ticks.size() > 0) {
for (Tick tick : ticks) {
System.out.println("Inside for loop " + formatter.format(tick.getOpenInterestDayHigh())
+ " and volume is " + formatter.format(tick.getOi()));
}
System.out.println("Loop complete " + ticks.size());
}
}


What it prints is : Inside for loop 0 and volume is 0

Regards,

Keshav Deshpande
  • sujith
    Can you let us know the instrument token and the mode you are subscribing to data in?
  • keshavdeshpande
    I was using modeQuote earlier but after your reply I tried with modeFull and this issue occurs intermittently.

    Tokens for which I am subscribing is 28858370
    28858626
    28858882
    28859138
    28859394
    28859650
    28859906

  • rakeshr
    I tried with modeFull and this issue occurs intermittently.
    Can you explain more about this? With proper debug logs.
    Are you not getting OI field values even in FullMode? Is this missing OI field random with ticks or you observed any pattern?
    We just checked for these tokens [28858370, 28858626, 28858882](from your above token list) with full mode and oi field is showing fine.
  • sujith
    sujith edited April 2021
    @keshavdeshpande,
    Can you print and see the tick mode when oi is 0?
  • keshavdeshpande
    Updates from my side. This is has not occurred yet again. Will update if I face it again.
This discussion has been closed.