TouchLine Event
For your initial subscription, you will receive a complete packet (flat string) on the designated event channel via the socket. For any subsequent touchline events involving incremental changes, you will receive updates reflecting only the partial changes in a flat string format. For example, if only the Last Traded Price (LTP) changes, you will receive just that specific change for that instrument. In the event of full market data occurrences, the entire event message will be broadcast each time. Conversely, for partial market data events, only the relevant partial message will be broadcast each time.
TouchLine Event message for JSON Full Packet
socket.on("1501-json-full",function(data){
console.log("data is "+data);
});
Response to 1501-json-full response
{
"ExchangeInstrumentID": 22,
"ExchangeSegment": 1,
"ExchangeTimeStamp": 1710845862,
"MessageCode": 1501,
"Touchline": {
"AskInfo": [
{
"BuyBackMarketMaker": 0,
"Price": 2409.9,
"Size": 1,
"TotalOrders": 1
}
],
"AverageTradedPrice": 2418.84,
"BidInfo": [
{
"BuyBackMarketMaker": 0,
"Price": 2408.9,
"Size": 1,
"TotalOrders": 1
}
],
"BuyBackTotalBuy": 0,
"BuyBackTotalSell": 0,
"Close": 2441.55,
"High": 2449.85,
"LastTradedPrice": 2408.4,
"LastTradedQuantity": 1,
"LastTradedTime": 1710845853,
"LastUpdateTime": 1710845862,
"Low": 2392.55,
"Open": 2442.8,
"PercentageChange": -1.36,
"TotalBuyQuantity": 45945,
"TotalSellQuantity": 37980,
"TotalTradedQuantity": 83628,
"TotalValueTraded": 202282751.52
}
}
TouchLine Event message for JSON Partial Packet
socket.on("1501-json-partial",function(data){
console.log("data is "+data);
});
Response to 1501-json-partial response
{
"ai": "0|1|2409.90|1",
"ap": 2418.84,
"bi": "0|14|2408.90|2",
"c": 2441.55,
"h": 2449.85,
"l": 2392.55,
"ltp": 2408.4,
"ltq": 1,
"ltt": 1710845853,
"lut": 1710845864,
"o": 2442.8,
"pc": -1.36,
"t": "1_22",
"tb": 45870,
"ts": 38577,
"v": 83628,
"vp": 202282751.52
}
Reference
Symbol | Explanation |
---|---|
t | ExchangeSegment.ExchangeInstrumentID(exchange segment enum with underscore along with instrumentID of the particular subscribed instrument) |
ltp | Last traded price |
ltq | Last traded quantity |
tb | Total buy quantity |
ts | Total sell quantity |
v | The volume is commonly reported as the number of shares that changed hands during a given day. |
ap | Average Traded Price |
ltt | Last Traded Time |
lut | Last Update Time |
pc | Percent Change |
o | Open |
h | High |
l | Low |
c | Close |
vp | Total price volume |
ai | Ask Info(Ask Size Index + " |
bi | Bid Info(Bid Size Index+' |