Skip to content

Web Socket API

Web Socket API

Connect to

wss://skypro.skybroking.com/NorenWSTP

General Guidelines

1) As soon as connection is done, a connection request should be sent with User id and login session id.

2) All input and output messages will be in json format.

3) ATO price is sent as “42949672.95”

Connect

Request:

Json Fields Possiblevalue Description
t c ‘c’ represents connect task
uid User ID
actid Account id
source API Source should be same as login request.
susertoken User Session Token jkey
{
"t":"c",
"uid":"J171",
"actid":"J171",
"source":"API",
"susertoken":"f1148fe92a63bc76498913gdd4be307fbe29b7daaf7bd33e63c8955be101f14b"
}
{
"t": "ck",
"s": "OK",
"uid": "J171"
}
{
"t": "ck",
"s": "NOT_OK"
}

Response :

Json Fields Possiblevalue Description
t ck ‘ck’ represents connect acknowledgement
uid User ID
s Ok or Not_Ok(in case of invalid user id or session id)

Subscribe Touchline

Request :

Json Fields Possiblevalue Description
t t ‘t’ represents touchline task
k One or more scriplist for subscription. Example NSE
{
"k":"NSE|10999#NSE|2885#NSE|2303#NSE|1313#NSE|11999#NSE|3045#NSE|11536#NSE|1333#NSE|25#NSE|2277#NSE|15083#NSE|5097#NSE|26000#NSE|26009#NSE|26017#NSE|26037","t":"t"
}
{
"t": "tf",
"e": "NSE",
"tk": "2885",
"lp": "3017.00",
"pc": "5.46",
"ft": "1717406371",
"v": "9010976",
"bq1": "148",
"sq1": "792"
}

Subscription Acknowledgement:

Number of Acknowledgements for a single subscription will be the same as the number of scrips mentioned in the key (k) field.

Json Fields Possiblevalue Description
t tk ‘tk’ represents touchline acknowledgement
e NSE, BSE, NFO .. Exchange name
tk 22 Scrip Token
pp 2 for NSE, BSE 4 for CDS USDINR Price precision
ts Trading Symbol
ti Tick size
ls Lot size
lp LTP
pc Percentage change
v volume
o Open price
h High price
l Low price
c Close price
ap Average trade price
oi Open interest
poi Previous day closing Open Interest
toi Total open interest for underlying
bq1 Best Buy Quantity 1
bp1 Best Buy Price 1
sq1 Best Sell Quantity 1
sp1 Best Sell Price 1
ft Feed time

TouchLine subscription Updates :

Accept for t, e, and tk other fields may / may not be present.

Json Fields Possiblevalue Description
t tf ‘tf’ represents touchline feed
e NSE, BSE, NFO .. Exchange name
tk 22 Scrip Token
lp LTP
pc Percentage change
v volume
o Open price
h High price
l Low price
c Close price
ap Average trade price
oi Open interest
poi Previous day closing Open Interest
toi Total open interest for underlying
bq1 Best Buy Quantity 1
bp1 Best Buy Price 1
sq1 Best Sell Quantity 1
sp1 Best Sell Price 1
ft Feed time

Unsubscribe Touchline

Request:

Json Fields Possiblevalue Description
t u ‘u’ represents Unsubscribe Touchline
k One or more scriplist for unsubscription. Example NSE

Response :

Json Fields Possiblevalue Description
t uk ‘uk’ represents Unsubscribe Touchline acknowledgement
k One or more scriplist for unsubscription. Example NSE

Subscribe Depth

Request :

Json Fields Possiblevalue Description
t d ‘d’ represents depth subscription
k One or more scriplist for subscription. Example NSE

Subscription Depth Acknowledgement:

Number of Acknowledgements for a single subscription will be the same as the number of scrips mentioned in the key (k) field.

Json Fields Possiblevalue Description
t dk ‘dk’ represents depth acknowledgement
e NSE, BSE, NFO .. Exchange name
tk 22 Scrip Token
lp LTP
pc Percentage change
v volume
o Open price
h High price
l Low price
c Close price
ap Average trade price
ltt Last trade time
ltq Last trade quantity
tbq Total Buy Quantity
tsq Total Sell Quantity
bq1 Best Buy Quantity 1
bq2 Best Buy Quantity 2
bq3 Best Buy Quantity 3
bq4 Best Buy Quantity 4
bq5 Best Buy Quantity 5
bp1 Best Buy Price 1
bp2 Best Buy Price 2
bp3 Best Buy Price 3
bp4 Best Buy Price 4
bp5 Best Buy Price 5
bo1 Best Buy Orders 1
bo2 Best Buy Orders 2
bo3 Best Buy Orders 3
bo4 Best Buy Orders 4
bo5 Best Buy Orders 5
sq1 Best Sell Quantity 1
sq2 Best Sell Quantity 2
sq3 Best Sell Quantity 3
sq4 Best Sell Quantity 4
sq5 Best Sell Quantity 5
sp1 Best Sell Price 1
sp2 Best Sell Price 2
sp3 Best Sell Price 3
sp4 Best Sell Price 4
sp5 Best Sell Price 5
so1 Best Sell Orders 1
so2 Best Sell Orders 2
so3 Best Sell Orders 3
so4 Best Sell Orders 4
so5 Best Sell Orders 5
lc Lower Circuit Limit
uc Upper Circuit Limit
52h 52 week high low in other exchanges, Life time high low in mcx
52l 52 week high low in other exchanges, Life time high low in mcx
oi Open interest
poi Previous day closing Open Interest
toi Total open interest for underlying
ft Feed time

Depth subscription Updates :

Json Fields Possiblevalue Description
t df ‘df’ represents depth feed
e NSE, BSE, NFO .. Exchange name
tk 22 Scrip Token
lp LTP
pc Percentage change
v volume
o Open price
h High price
l Low price
c Close price
ap Average trade price
ltt Last trade time
ltq Last trade quantity
tbq Total Buy Quantity
tsq Total Sell Quantity
bq1 Best Buy Quantity 1
bq2 Best Buy Quantity 2
bq3 Best Buy Quantity 3
bq4 Best Buy Quantity 4
bq5 Best Buy Quantity 5
bp1 Best Buy Price 1
bp2 Best Buy Price 2
bp3 Best Buy Price 3
bp4 Best Buy Price 4
bp5 Best Buy Price 5
bo1 Best Buy Orders 1
bo2 Best Buy Orders 2
bo3 Best Buy Orders 3
bo4 Best Buy Orders 4
bo5 Best Buy Orders 5
sq1 Best Sell Quantity 1
sq2 Best Sell Quantity 2
sq3 Best Sell Quantity 3
sq4 Best Sell Quantity 4
sq5 Best Sell Quantity 5
sp1 Best Sell Price 1
sp2 Best Sell Price 2
sp3 Best Sell Price 3
sp4 Best Sell Price 4
sp5 Best Sell Price 5
so1 Best Sell Orders 1
so2 Best Sell Orders 2
so3 Best Sell Orders 3
so4 Best Sell Orders 4
so5 Best Sell Orders 5
uc Upper Circuit Limit
52h 52 week high low in other exchanges, Life time high low in mcx
52l 52 week high low in other exchanges, Life time high low in mcx
oi Open interest
poi Previous day closing Open Interest
toi Total open interest for underlying
ft Feed time

Sample Message :

    {
        "t": "df",
        "e": "NSE",
        "tk": "22",
        "o": "1166.00",
        "h": "1179.00",
        "l": "1145.35",
        "c": "1152.65",
        "ap": "1159.74",
        "v": "819881",
        "tbq": "120952",
        "tsq": "131730",
        "bp1": "1156.00",
        "sp1": "1156.50",
        "bp2": "1155.80",
        "sp2": "1156.55",
        "bp3": "1155.75",
        "sp3": "1156.65",
        "bp4": "1155.70",
        "sp4": "1156.70",
        "bp5": "1155.65",
        "sp5": "1156.75",
        "bq1": "4",
        "sq1": "10",
        "bq2": "67",
        "sq2": "63",
        "bq3": "83",
        "sq3": "1",
        "bq4": "139",
        "sq4": "53",
        "bq5": "393",
        "sq5": "94"
    }

Unsubscribe Depth

Request:

Json Fields Possiblevalue Description
t ud ‘ud’ represents Unsubscribe depth
k One or more scriplist for unsubscription. Example NSE
Json Fields Possiblevalue Description
t udk ‘udk’ represents unsubscribe depth acknowledgement
k One or more scriplist for unsubscription. Example NSE

Subscribe Order Update

Request:

Json Fields Possiblevalue Description
t o ‘o’ represents order update subscription task
actid Account id based on which order updated to be sent.

Subscription Acknowledgement:

Json Fields Possiblevalue Description
t ok ‘ok’ represents order update subscription acknowledgement

Order Update subscription Updates :

Json Fields Possiblevalue Description
t om ‘om’ represents touchline feed
norenordno Noren Order Number
uid User Id
actid Account ID
exch Exchange
tsym Trading symbol
qty Order quantity
prc Order Price
prd Product
status Order status (New, Replaced, Complete, Rejected etc)
reporttype Order event for which this message is sent out. (Fill,Rejected Canceled)
trantype Order transaction type, buy or sell
prctyp Order price type (LMT, MKT, SL-LMT, SL-MKT)
ret Order retention type (DAY, EOS, IOC,...)
fillshares Total Filled shares for this order
avgprc Average fill price
fltm Fill Time(present only when reporttype is Fill)
flid Fill ID (present only when reporttype is Fill)
flqty Fill Qty(present only when reporttype is Fill)
flprc Fill Price(present only when reporttype is Fill)
rejreason Order rejection reason, if rejected
exchordid Exchange Order ID
cancelqty Canceled quantity, in case of canceled order
remarks User added tag, while placing order
trgprc Trigger price for SL orders
snonum This will be present for child orders in case of cover and bracket orders, if present needs to be sent during exit
snoordt This will be present for child orders in case of cover and bracket orders, it will indicate whether the order is profit or stoploss
blprc This will be present for cover and bracket parent order. This is the differential stop loss trigger price to be entered.
bpprc This will be present for bracket parent order. This is the differential profit price to be entered.
trailprc This will be present for cover and bracket parent order. This is required if trailing ticks is to be enabled.
exch_tm This will have the exchange update time Format: dd-mm-YYYY hh:MM:SS
amo This field will be present if the order is After Market Order. Data will be “Yes”
tm TimeStamp
kidid Kid Id
sno_fillid BO Sequence Id

Unsubscribe Order Update

Request:

Json Fields Possiblevalue Description
t uo ‘uo’ represents Unsubscribe Order update

Response :

Json Fields Possiblevalue Description
t uok ‘uok’ represents Unsubscribe Order update acknowledgement