GetLastQuoteArray : Returns LastTradePrice of multiple Symbols – max 25 in single call (detailed)
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/GetLastQuoteArray/?accessKey=0a0b0c&exchange=MCX&instrumentIdentifiers=XXX_MCX0_25MAR2021_XX_X+XXX_MCX1_25Jun2015_XX_X+XXX_MCX2_25Jun2015_XX_X&xml=true&isShortIdentifiers=true |
What is returned ?
Exchange, InstrumentIdentifier (Symbol), LastTradeTime, ServerTime, AverageTradedPrice (VWAP), Close (previous Day’s Close), Open, High, Low, LastTradePrice, LastTradeQty, TotalQtyTraded, BuyPrice (Bid), BuyQty (Bid Size), SellPrice (Ask), SellQty (Sell Size), OpenInterest, QuotationLot (Lot Size), Value (Turnover), PreOpen (if PreOpen), PriceChange (Change in Price compared to previous trading day’s Close), PriceChangePercentage (Percentage Change in Price compared to previous trading day’s Close), OpenInterestChange (Change in Open Interest compared to previous trading day’s Close) |
LastTradeTime, ServerTime : In JSON Response, these values are 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 |
[ { “AVERAGETRADEDPRICE”: 123.45, “BUYPRICE”: 123.45, “BUYQTY”: 1, “CLOSE”: 123.45, “EXCHANGE”: “MCX”, “HIGH”: 123.45, “INSTRUMENTIDENTIFIER”: “XXX_MCX0_25MAR2021_XX_X”, “LASTTRADEPRICE”: 123.45, “LASTTRADEQTY”: 2, “LASTTRADETIME”: 1415114727418, “LOW”: 123.45, “OPEN”: 123.45, “OPENINTEREST”: 10, “PREOPEN”: false, “QUOTATIONLOT”: 1, “SELLPRICE”: 123.45, “SELLQTY”: 1, “SERVERTIME”: 1415114727418, “TOTALQTYTRADED”: 10, “VALUE”: 1230.45},{ “AVERAGETRADEDPRICE”: 123.45, “BUYPRICE”: 123.45, “BUYQTY”: 1, “CLOSE”: 123.45, “EXCHANGE”: “MCX”, “HIGH”: 123.45, “INSTRUMENTIDENTIFIER”: “XXX_MCX1_25MAR2021_XX_X”, “LASTTRADEPRICE”: 123.45, “LASTTRADEQTY”: 2, “LASTTRADETIME”: 1415114727418, “LOW”: 123.45, “OPEN”: 123.45, “OPENINTEREST”: 10, “PREOPEN”: false, “QUOTATIONLOT”: 1, “SELLPRICE”: 123.45, “SELLQTY”: 1, “SERVERTIME”: 1415114727418, “TOTALQTYTRADED”: 10, “VALUE”: 1230.45},
{ “AVERAGETRADEDPRICE”: 123.45, “BUYPRICE”: 123.45, “BUYQTY”: 1, “CLOSE”: 123.45, “EXCHANGE”: “MCX”, “HIGH”: 123.45, “INSTRUMENTIDENTIFIER”: “XXX_MCX2_25MAR2021_XX_X”, “LASTTRADEPRICE”: 123.45, “LASTTRADEQTY”: 2, “LASTTRADETIME”: 1415114727418, “LOW”: 123.45, “OPEN”: 123.45, “OPENINTEREST”: 10, “PREOPEN”: false, “QUOTATIONLOT”: 1, “SELLPRICE”: 123.45, “SELLQTY”: 1, “SERVERTIME”: 1415114727418, “TOTALQTYTRADED”: 10, “VALUE”: 1230.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” ServerTime=”11-4-2014 5:20:31 PM” AverageTradedPrice=”123.45″ BuyPrice=”123.45″ BuyQty=”1″ Close=”123.45″ High=”123.45″ Low=”123.45″ LastTradePrice=”123.45″ LastTradeQty=”2″ Open=”123.45″ OpenInterest=”10″ QuotationLot=”1″ SellPrice=”123.45″ SellQty=”1″ TotalQtyTraded=”10″ Value=”1230.45″ PreOpen=”false” />
<Value Exchange=”MCX” InstrumentIdentifier=”XXX_MCX1_25MAR2021_XX_X” LastTradeTime=”11-4-2014 5:20:31 PM” ServerTime=”11-4-2014 5:20:31 PM” AverageTradedPrice=”123.45″ BuyPrice=”123.45″ BuyQty=”1″ Close=”123.45″ High=”123.45″ Low=”123.45″ LastTradePrice=”123.45″ LastTradeQty=”2″ Open=”123.45″ OpenInterest=”10″ QuotationLot=”1″ SellPrice=”123.45″ SellQty=”1″ TotalQtyTraded=”10″ Value=”1230.45″ PreOpen=”false” />
<Value Exchange=”MCX” InstrumentIdentifier=”XXX_MCX2_25MAR2021_XX_X” LastTradeTime=”11-4-2014 5:20:31 PM” ServerTime=”11-4-2014 5:20:31 PM” AverageTradedPrice=”123.45″ BuyPrice=”123.45″ BuyQty=”1″ Close=”123.45″ High=”123.45″ Low=”123.45″ LastTradePrice=”123.45″ LastTradeQty=”2″ Open=”123.45″ OpenInterest=”10″ QuotationLot=”1″ SellPrice=”123.45″ SellQty=”1″ TotalQtyTraded=”10″ Value=”1230.45″ PreOpen=”false” />
</RealtimeArray> |
CSV | AverageTradedPrice,BuyPrice,BuyQty,Close,Exchange,High,InstrumentIdentifier,LastTradePrice,LastTradeQty,LastTradeTime,Low,Open,OpenInterest,PreOpen,QuotationLot,SellPrice,SellQty,ServerTime,TotalQtyTraded,Value,PriceChange,PriceChangePercentage,OpenInterestChange 22377.82,22381.95,100,22358.2,NFO,22448,NIFTY-I,22382,1800,1713851904000,22345,22448,9980700,False,50,22384.6,100,1713851905000,1786550,39979094321,23.8,0.11,341450 |