GetInstrumentsOnSearch : Returns array of max. 20 instruments by selected exchange and ‘search string’
Supported parameters
Search | String value like NIFTY in CAPS | Search word value (pattern for search) in CAPS |
Exchange | String value like MCX | Name of supported exchange. How to get list of supported exchanges you can find here |
InstrumentType | String value like FUTIDX | Optional parameter. Name of supported Instrument Type. How to get list of supported values you can find here |
Product | String value like BANKNIFTY | Optional parameter. Name of supported Product. How to get list of supported values you can find here |
Expiry | String value like 30Jul2015 | Optional parameter. Name of supported Expiry Date. How to get list of supported values you can find here |
OptionType | String value like CE | Optional parameter. Name of supported Option Type. How to get list of supported values you can find here |
StrikePrice | String value like 0 | Optional parameter. Name of supported StrikePrice. How to get list of supported values you can find here |
OnlyActive | [true]/[false], default = [true] | Optional parameter. By default, function will return only active instruments. Function will return all (active + expired) instruments if value equals false |
detailedInfo | [true]/[false], default = [false] | Optional parameter. By default function will return limited fields in response, function will return additional fields in response when this parameter is set as true. |
What is returned ?
Identifier (Symbol), Name (Instrument Type), Expiry (Expiry Date), StrikePrice, Product, OptionType, ProductMonth, TradeSymbol (ShortIdentifier for same Identifier/Symbol), QuotationLot (Lot Size), When detailedInfo=true, following additional information will be sent (if available from Exchange) :TokenNumber, LowPriceRange, HighPriceRange |
Sample request(JavaScript)
{ MessageType: "GetInstrumentsOnSearch", Exchange: "NFO", InstrumentType:"FUTIDX", Search:"NIFTY", //Product:"NIFTY", //OptionType:"PE", //Expiry:"30jul2020", detailedInfo: "true" }; var message = JSON.stringify(request); websocket.send(message);
Example of returned data in JSON format
{"Request":{"Exchange":"NFO","Search":"NIFTY","InstrumentType":"FUTIDX","OnlyActive":true,"MessageType":"GetInstrumentsOnSearch"}, "Result":[ {"Identifier":"FUTIDX_NIFTY_29JUL2021_XX_0","Name":"FUTIDX","Expiry":"29Jul2021","StrikePrice":0.0,"Product":"NIFTY","PriceQuotationUnit":"","OptionType":"XX","ProductMonth":"29Jul2021","UnderlyingAsset":"","UnderlyingAssetExpiry":"","IndexName":"","TradeSymbol":"NIFTY29JUL21FUT","QuotationLot":50.0,"Description":"","TokenNumber":"53181","LowPriceRange":14250.45,"HighPriceRange":17417.2}, {"Identifier":"FUTIDX_NIFTY_26AUG2021_XX_0","Name":"FUTIDX","Expiry":"26Aug2021","StrikePrice":0.0,"Product":"NIFTY","PriceQuotationUnit":"","OptionType":"XX","ProductMonth":"26Aug2021","UnderlyingAsset":"","UnderlyingAssetExpiry":"","IndexName":"","TradeSymbol":"NIFTY26AUG21FUT","QuotationLot":50.0,"Description":"","TokenNumber":"49939","LowPriceRange":14282.8,"HighPriceRange":17456.75}, {"Identifier":"FUTIDX_NIFTY_30SEP2021_XX_0","Name":"FUTIDX","Expiry":"30Sep2021","StrikePrice":0.0,"Product":"NIFTY","PriceQuotationUnit":"","OptionType":"XX","ProductMonth":"30Sep2021","UnderlyingAsset":"","UnderlyingAssetExpiry":"","IndexName":"","TradeSymbol":"NIFTY30SEP21FUT","QuotationLot":50.0,"Description":"","TokenNumber":"48740","LowPriceRange":14330.45,"HighPriceRange":17515.0}], "MessageType":"InstrumentsOnSearchResult"}