Bid/Ask price not in 0.1 ticks


I have a very basic question. I am trying to extract data using a Data API, but the bid/ask price I see is in multiple decimals (e.g., 25898.099609375). As far as I understand, the tick size is 0.1 for Nifty FUTURES.
Am I getting an average price of the milliseconds lag?

Thanks

Could be floating point errors when you save the data or from source ?

1 Like

Indeed.
In IEEE-754 floating-point representation (typically used in most software by default),
25898.099609375 is the closest possible representation of 25898.1.

2 Likes

Below is the raw API response data for today, which shows price values with the expected decimal precision. Any unexpected large floating-point numbers could be introduced by client-side processing or storage, not by the API.

[
  {
    'tradable': True,
    'mode': 'full',
    'instrument_token': 12602626,
    'last_price': 26132.8,
    'last_traded_quantity': 65,
    'average_traded_price': 26090.24,
    'volume_traded': 7021170,
    'total_buy_quantity': 387010,
    'total_sell_quantity': 228605,
    'ohlc': {
      'open': 26098.0,
      'high': 26144.4,
      'low': 26040.3,
      'close': 26121.3
    },
    'change': 0.04402537392855639,
    'last_trade_time': datetime.datetime(2025,12,30,15,28,43),
    'oi': 14097525,
    'oi_day_high': 14097525,
    'oi_day_low': 9451585,
    'exchange_timestamp': datetime.datetime(2025,12,30,15,28,43),
    'depth': {
      'buy': [
        {
          'quantity': 260,
          'price': 26132.2,
          'orders': 1
        },
        {
          'quantity': 20865,
          'price': 26132.0,
          'orders': 19
        },
        {
          'quantity': 520,
          'price': 26131.7,
          'orders': 3
        },
        {
          'quantity': 65,
          'price': 26131.5,
          'orders': 1
        },
        {
          'quantity': 130,
          'price': 26131.2,
          'orders': 1
        }
      ],
      'sell': [
        {
          'quantity': 65,
          'price': 26132.9,
          'orders': 1
        },
        {
          'quantity': 455,
          'price': 26133.0,
          'orders': 6
        },
        {
          'quantity': 1495,
          'price': 26133.1,
          'orders': 10
        },
        {
          'quantity': 910,
          'price': 26133.2,
          'orders': 7
        },
        {
          'quantity': 390,
          'price': 26133.3,
          'orders': 5
        }
      ]
    }
  }
]
2 Likes