Hi @Hardik
glad to see your response and research on this.
Well, on the option instrument, you are slightly right but
couple of things:
- index has a notional
totalTurnover recorded at the beginning of the json (for the entire index)
- 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"
}
}
},
- 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!!