Provide turnover value for option instruments in option chain API

Hi,

On the Option Chain - DhanHQ Ver 2.0 / API Document, I see that we have got the volume information in Day volume for Option Instrument. How often is this updated? like what is the average lagtime to this value when fetched over api?

Also, please provide the turnover value information as well, akin to exchange providing this information already.

thanks

@Praveen_Clement_P @Dhan @Hardik

cc @PravinJ @Naman

FWIW, I am referring to these values as seen in screenshot (when looked up option chain derivative quote on NSE)

I presume it should be already there (as Exchange also already provides it) but it needs unpacking or made accessible somehow.

this could be same value in tradeinfo section also in the same json response from the exchange

any response here? @PravinJ @Naman @Hardik

Hello @mnikhil

Can you help us with more info on the use of Turnover Information as part of the Option Chain.

Volume is updated in real-time, whenever the API is polled. There is no lag in this scenario.

Hi @Hardik
sure, sorry I missed to check your response back here.

step 1. go visit http://www.nseindia.com

step 2.
visit this url , its a big json so will take time but if you get resource not found page, just do step 1 again and then do step 2. you will have to get a pretty json response (may be there is a prettifier in browser extension itself).

look for turnover (case-insensitive search in metadata for a given strike type and also tradeInfo section for the option instrument)

hope this helps.

Hello @mnikhil

Got the source. Would like to know the use of this information and how it can help traders at large.

this helps with adding context and meaning to other information that is already available thus far via the current api req/response. this provides usability to the liquidity

hi @Hardik, @PravinJ and @Dhan

any news on this? I am blocked on this. I think there is a lot of benefit to the option traders to avail this information (which is also provided by exchange) especially the context of liquidity and will help with avoiding those illiquid premiums (for transactions)

trying again @Hardik @PravinJ @Dhan

Hey @mnikhil

Apologies for missing this. I had done some research on it, but forgot to mention here.

There are two fields which I found on the data related to turnover, totalTurnover and premiumTurnover.

totalTurnover - This is usually total notional turnover for that contract. The formula for computing the same is:

Total Turnover = Strike Price × Lot Size × Number of Contracts

You can easily compute the same using the options data.

premiumTurnover - This is the premium turnover for that option contract:

Premium Turnover = Traded Volume × Lot Size × VWAP (Volume Weighted Average Price)

However, both these fields are calculated on different logic on the NSE data shared by you, that I could find.

Premium Turnover = numberOfContractsTraded × previousLot(15) × VWAP

Total Turnover = numberOfContractsTraded × marketLot(75) × VWAP → shown in ₹ Lakhs

Do let me know if you are able to find any other formula for this.

Either ways, this can be calculated via the Options Chain data as well.

Hi @Hardik
glad to see your response and research on this.

Well, on the option instrument, you are slightly right but

couple of things:

  1. index has a notional totalTurnover recorded at the beginning of the json (for the entire index)
  2. there is a totalTurnover for every option instrument strike and then there istradeInfo block which has some more information fields including such as: tradedVolume, value, vmap, premiumTurnover, openInterest, changeinOpenInterest, pchangeinOpenInterest, marketLot

So, among these : the totalTurnover is essentially same as that of value we get to see in the tradeInfo and in other words

totalTurnover of optidx instrument == tradeInfo.value

vmap == VWAP of optix instrument (I have no idea why did they name it vmap instead of vwap)

example block from the big json:

{
      "metadata": {
        "instrumentType": "Index Options",
        "expiryDate": "07-Aug-2025",
        "optionType": "Put",
        "strikePrice": 24500,
        "identifier": "OPTIDXNIFTY07-08-2025PE24500.00",
        "openPrice": 65,
        "highPrice": 134.35,
        "lowPrice": 49.45,
        "closePrice": 117,
        "prevClose": 56.75,
        "lastPrice": 119.45,
        "change": 62.7,
        "pChange": 110.484581497797,
        "numberOfContractsTraded": 2637346,
        "totalTurnover": 164649.51
      },
      "underlyingValue": 24565.35,
      "volumeFreezeQuantity": 1801,
      "marketDeptOrderBook": {
        "totalBuyQuantity": 394350,
        "totalSellQuantity": 163575,
        "bid": [
          {
            "price": 119.2,
            "quantity": 225
          },
          {
            "price": 119.1,
            "quantity": 75
          },
          {
            "price": 119.05,
            "quantity": 150
          },
          {
            "price": 119,
            "quantity": 1875
          },
          {
            "price": 118.8,
            "quantity": 450
          }
        ],
        "ask": [
          {
            "price": 119.95,
            "quantity": 300
          },
          {
            "price": 120,
            "quantity": 150
          },
          {
            "price": 120.05,
            "quantity": 300
          },
          {
            "price": 120.1,
            "quantity": 1125
          },
          {
            "price": 120.2,
            "quantity": 150
          }
        ],
        "carryOfCost": {
          "price": {
            "bestBuy": 119.2,
            "bestSell": 119.95,
            "lastPrice": 119.45
          },
          "carry": {
            "bestBuy": -48620.6411197762,
            "bestSell": -48563.4069785543,
            "lastPrice": -48601.5231576185
          }
        },
        "tradeInfo": {
          "tradedVolume": 2637346,
          "value": 164649.51,
          "vmap": 83.24,
          "premiumTurnover": 48625882.26078,
          "openInterest": 58039,
          "changeinOpenInterest": 9102,
          "pchangeinOpenInterest": 18.5994237489017,
          "marketLot": 75
        },
        "otherInfo": {
          "settlementPrice": 0,
          "dailyvolatility": 0.85,
          "annualisedVolatility": 16.22,
          "impliedVolatility": 13.49,
          "clientWisePositionLimits": 0,
          "marketWidePositionLimits": 0,
          "tickSize": "hide"
        }
      }
    },
  1. You are right in saying that the turnover, for the option instrument, thus, becomes calculatable, provided and provided – there are columns available tradedVolume and it is not numberOfContractsTraded

option turnover = option volumes traded thus far * VWAP * marketLotSize
and from the example json block, the option turnover value this is

OPTIDXNIFTY07-08-2025PE24500.00 put turnover --> 2637346 * 83.24 * 75 == 16,464,951,078

So, for calculating the turnover for each option instrument, essentially we need vwap price, lotsize and importantly volumestradedthusfar (according to the exchange).

I hope this brings us on the same page now. Can you please guide on how to avail this data via Dhan data api for option chain?

thanks again, appreciate your engaging post.

Cheers!!

@Hardik
so, if the volume matches to that of exchange provided (volume traded to the day thusfar), and if dhan could provide vwap price of the option instrument (either as avg price or vwap price via its data api, then we can consider that calculations can be done on the local client side to get the turnover information for every option instrument) – as marketlot size is a static numerall that does not change often (or subject to exchange/regulations)

So, I think, the ask now comes down to providing the ‘avg price’ or ‘vwap’ which is absolutely ever-updating for all the market instruments (much like either ltp or 1min updated vwap field in the data fields response for option chain instrument)

thanks

Nikhil

hi @Hardik

from my perspective, I think we have gathered enough momentum in this thread with some more information availability now, please let me know if there is anything else we would need before we finalize the asks for the data api.

thanks

Nikhil

Hey @mnikhil

We do provide average trade price for the day on the Live Market Feed, as part of the Quote Packet. On adding it to the option chain API, will evaluate the same if it is feasible.

yes please @Hardik that would be a real value add for me (and I am sure for others) for options data

@Hardik I do believe that when we get to have this and (whenever we get a chance to get on the call), we must do a comprehensive test to see how it compares with NSE feed etc (both data integrity wise and data refresh and quality wise) and I am happy to do the testing necessary.

thanks

hi @Hardik any luck on this further

@Dhan @PravinJ @Hardik any luck this is looking like a feasibility here? its been about five months since this thread was started for a simple ask. I am still hopeful.