GetHistory : Returns historical data (Tick / Minute / EOD)
Supported parameters
accessKey | Access key according to your subscription | Required parameter. |
exchange | String value like MCX | Name of supported exchange. How to get list of supported exchanges you can find here |
instrumentIdentifier | Value of instrument identifier | How to get list of available instruments and identifiers you can find here You will need to use URL Econding for instrument identifiers with special characters (like BAJAJ-AUTO, M&M, L&T, NIFTY 50, etc.) as explained here |
periodicity | [TICK]/[MINUTE]/[HOUR]/[DAY]/[WEEK]/[MONTH], default = [TICK] | String value of required periodicity. |
period | Numerical value 1, 2, 3…l default = 1 | Optional parameter of required period for historical data. Can be applied for [MINUTE]/[HOUR]/[DAY] periodicity types |
from | Numerical value of UNIX Timestamp like ‘1388534400’ (01-01-2014 0:0:0) | Optional parameter. It means starting timestamp for called historical data. This value is expressed as no. of seconds since Epoch time (i.e. 1st January 1970). Also known as Unix Time. Please Visit https://www.epochconverter.com/ to get formulae to convert human readable time to Epoch and vice versa (scroll to end of their home page) |
to | Numerical value of UNIX Timestamp like ‘1412121600’ (10-01-2014 0:0:0) | Optional parameter. It means ending timestamp for called historical data. This value is expressed as no. of seconds since Epoch time (i.e. 1st January 1970). Also known as Unix Time. Please Visit https://www.epochconverter.com/ to get formulae to convert human readable time to Epoch and vice versa (scroll to end of their home page) |
max | Numerical value. Default = 0 (means all available data) | Optional parameter. It limits returned data. |
userTag | Any string value | Optional parameter. It will be returned with historical data. |
xml | [true]/[false], default = [false] | Optional parameter. By default function will return JSON data. Functions will return XML data if set as [true] |
format | CSV | Optional parameter. When format=CSV, data in CSV format will be returned. Please make sure not to pass xml parameter (neither True nor False) when format=CSV is sent |
isShortIdentifier | [true]/[false], default = [false] | Optional parameter. By default function will use long instrument identifier format. Functions will use short instrument identifier format if set as [true]. Example of ShortIdentifiers are NIFTY25MAR21FUT, RELIANCE25MAR21FUT, NIFTY25MAR2115000CE, etc. |
Example | https://endpoint:port/GetHistory/? accessKey=your_api_key&exchang e=NFO&instrumentIdentifier=NIFT Y27JUN24FUT&periodicity=DAY&p eriod=1&max=10&from=17162697 00&to=1718861700&userTag=NIFT Y-I%20DAY&IsShortIdentifier=true&AdjustSplits=false |
What is returned ?
LastTradeTime, QuotationLot (LotSize), TradedQty, OpenInterest, Open, High, Low, Close |
LastTradeTime : In JSON Response, this value is expressed as no. of seconds since Epoch time (i.e. 1st January 1970). Also known as Unix Time. Please Visit https://www.epochconverter.com/ to get formulae to convert human readable time to Epoch and vice versa (scroll to end of their home page) |
Example For Supported Exchanges and their returns on (JSON,XML&CSV)
JSON Format | View | Download PDF File – Click Here |
XML Format | View | Download PDF File – Click Here |
CSV Format | View | Download PDF File – Click Here |