SubscribeRealtime

SubscribeRealtime : Subscribe to Realtime data, returns market data every second (Bid/Ask/Trade)

Supported parameters
Exchange String value like NFO Name of supported exchange. How to get list of supported exchanges you can find here
InstrumentIdentifier String value of instrument identifier How to get list of available instruments and identifiers you can find here
Unsubscribe [true]/[false], default = [false] Optional parameter. Buy default subscribes to Realtime data. If [true], instrumentIdentifier is unsubscribed
What is returned ?
Exchange, InstrumentIdentifier (Symbol), LastTradeTime, ServerTime, AverageTradedPrice (VWAP), Close (previous Day’s Close), Open(Day’s Open), High(Day’s High), Low(Day’s 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, ServerTradeTime : 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)
Sample request(JavaScript)
{
MessageType: "SubscribeRealtime",
Exchange: "NFO",
InstrumentIdentifier: "FUTIDX_BANKNIFTY_24NOV2016_XX_0"
};
var message = JSON.stringify(request);
websocket.send(message);
Example of returned data in JSON format. This data is returned every second
{
"Exchange":"NFO",
"InstrumentIdentifier":"NIFTY-I",
"LastTradeTime":1593422508,
"ServerTime":1593422508,
"AverageTradedPrice":10208.98,
"BuyPrice":10213.6,
"BuyQty":75,
"Close":10318.0,
"High":10265.35,
"Low":10156.3,
"LastTradePrice":10214.5,
"LastTradeQty":300,
"Open":10241.9,
"OpenInterest":12995025,
"QuotationLot":0.0,
"SellPrice":10214.65,
"SellQty":75,
"TotalQtyTraded":13710675,
"Value":139972006861.5,
"PreOpen":false,
"PriceChange":-103.5,
"PriceChangePercentage":-1.0,
"OpenInterestChange":1360200,
"MessageType":"RealtimeResult"
}
×

Was this helpful?