GetLastQuoteArrayShortWithClose : Returns LastTradePrice of multiple Symbols – max 25 in single call (short) with Close of Previous Day
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 |
instrumentIdentifiers | Values of instrument identifiers, max. limit is 25 instruments per single request | 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 |
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 |
isShortIdentifiers | [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 | http://endpoint:port/GetLastQuoteArrayShortWithClose/?accessKey=0a0b0c&exchange=MCX&instrumentIdentifiers=XXX_MCX0_25MAR2021_XX_X+XXX_MCX1_25MAR2021_XX_X+XXX_MCX2_25MAR2021_XX_X&xml=true&isShortIdentifiers=true |
What is returned ?
Exchange, InstrumentIdentifier (Symbol), LastTradeTime, BuyPrice (Bid Price), Close (Previous Trading Day’s Close), LastTradePrice, SellPrice (Ask Price) |
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 of returned data
JSON | XML |
[ { “BUYPRICE”: 123.45, “EXCHANGE”: “MCX”, “INSTRUMENTIDENTIFIER”: “XXX_MCX0_25MAR2021_XX_X”, “LASTTRADEPRICE”: 123.45, “LASTTRADETIME”: 1415114727418, “SELLPRICE”: 123.45, “CLOSE”: 123.45},
{ “BUYPRICE”: 123.45, “EXCHANGE”: “MCX”, “INSTRUMENTIDENTIFIER”: “XXX_MCX1_25MAR2021_XX_X”, “LASTTRADEPRICE”: 123.45, “LASTTRADETIME”: 1415114727418, “SELLPRICE”: 123.45, “CLOSE”: 123.45}, { “BUYPRICE”: 123.45, “EXCHANGE”: “MCX”, “INSTRUMENTIDENTIFIER”: “XXX_MCX2_25MAR2021_XX_X”, “LASTTRADEPRICE”: 123.45, “LASTTRADETIME”: 1415114727418, “SELLPRICE”: 123.45, “CLOSE”: 123.45} |
<?xml version=”1.0″ encoding=”utf-16″ ?>
<RealtimeArray xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<Value Exchange=”MCX” InstrumentIdentifier=”XXX_MCX0_25MAR2021_XX_X” LastTradeTime=”11-4-2014 5:20:31 PM” BuyPrice=”123.45″ LastTradePrice=”123.45″ SellPrice=”123.45″ Close=”123.45″ />
<Value Exchange=”MCX” InstrumentIdentifier=”XXX_MCX1_25MAR2021_XX_X” LastTradeTime=”11-4-2014 5:20:31 PM” BuyPrice=”123.45″ LastTradePrice=”123.45″ SellPrice=”123.45″ Close=”123.45″ />
<Value Exchange=”MCX” InstrumentIdentifier=”XXX_MCX2_25MAR2021_XX_X” LastTradeTime=”11-4-2014 5:20:31 PM” BuyPrice=”123.45″ LastTradePrice=”123.45″ SellPrice=”123.45″ Close=”123.45″ />
</RealtimeArray> |
CSV | BuyPrice,Exchange,InstrumentIdentifier,LastTradePrice,LastTradeTime,SellPrice,Close 24359.65,NFO,NIFTY-I,24360,1720604484000,24360,24485.65 52320.8,NFO,BANKNIFTY-I,52325,1720604483000,52325,52615.75 23648.7,NFO,FINNIFTY-I,23648.7,1720604483000,23654,23715.5 |