I am new to Dhan API Trading, when i downloaded the api-scrip-master.csv , i am unable to understand what the below column represents and what the value stands for.
SEM_SERIES
SEM_EXCH_INSTRUMENT_TYPE
SEM_INSTRUMENT_NAME
SEM_SEGMENT
For example: ES,DBT,DEB,MF,ETF,CB,SGB,InvITU,GB,PS,Other,TB,REIT,EQ are the values present under SEM_EXCH_INSTRUMENT_TYPE when SEM_INSTRUMENT_NAME is “EQUITY”, i dont understand what these values mean.
Similarly the other mentioned column tooo. I couldn’t find any definition or full form in the API documentation Annexure page.
Q2: Also when hitting the historical API endpoint, we need to pass exchangeSegment in the request Body, but from where or how do i get this NSE_EQ. I know this is mentioned in Annexure but how to derive this value dynamically, since there is no column in api-scrip-master file. Should I generate this value manually based on the symbol that I am trying to retrieve data for ??
SEM_SERIES - Series in which the instrument is as per exchange. You can refer to the list here - NSE SEM_EXCH_INSTRUMENT_TYPE - This is how instruments are categorised by exchange, can be ignored here. SEM_INSTRUMENT_NAME - Instrument name mapped for API Input - here SEM_SEGMENT - C - Currency, D - Derivatives, E - Equity, I - Index and M - Commodity
On the second part, yes this is not on Security ID master. You can keep a logic at your end based on SEM_EXM_EXCH_ID and SEM_INSTRUMENT_NAME
can you explain how this security master file works? Since it has price and expiry date which changes with time, does that mean we need to manually download the file and update it in our code?
And Is there a way to get LTP/Quote all options of an instruments?
My logic is to get all options for BankNifty with their LTP and expiry date and the select one call and put option that is out of the money and who’s price is near my calculated price.