WebSocket
Description
It will create a web socket connection
URL
wss://giga.gwcindia.in/NorenWSTP/
General Guidelines
- As soon as connection is done, a connection request should be sent with User id and login session id.
- All input and output messages will be in json format.
- ATO price is sent as “42949672.95”.
Connect
REQUEST ATTRIBUTES
| JSON Fields | Possible Value | 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 |
RESPONSE ATTRIBUTES
| JSON Fields | Possible Value | 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 ATTRIBUTES
| JSON Fields | Possible Value | Description |
|---|---|---|
| t | t | 't' represents touchline task |
| k | One or more scriplist for subscription. Example NSE|22#BSE|508123#NSE| NIFTY |
RESPONSE ATTRIBUTES(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 Field | Possible Value | 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 | Last Traded Price (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's 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 |
RESPONSE ATTRIBUTES(TouchLine Subscription Updates)
Accept for t, e, and tk other fields may / may not be present.
| JSON Field | Possible Value | Description |
|---|---|---|
| t | tf | 'tf' represents touchline feed |
| e | NSE, BSE, NFO... | Exchange name |
| tk | 22 | Scrip Token |
| lp | Last Traded Price (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's 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 ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | u | 'u' represents Unsubscribe Touchline |
| k | One or more scriplist for unsubscription (e.g., NSE| 22#BSE| 508123) |
RESPONSE ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | uk | 'uk' represents Unsubscribe Touchline acknowledgement |
| k | One or more scriplist for unsubscription. Example: NSE| 22#BSE| 508123 |
Subscribe Depth
REQUEST ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | d | 'd' represents depth subscription |
| k | One or more scriplist for subscription. Example: NSE| 22#BSE| 508123 |
RESPONSE ATTRIBUTES(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 Field | Possible Value | 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 |
RESPONSE ATTRIBUTES(Depth subscription Updates)
| JSON Field | Possible Value | Description |
|---|---|---|
| t | df | 'df' represents depth feed |
| e | NSE, BSE, NFO.. | Exchange name |
| tk | 22 | Scrip Token |
| lp | Last Traded Price (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–bq5 | Best Buy Quantities 1 to 5 | |
| bp1–bp5 | Best Buy Prices 1 to 5 | |
| bo1–bo5 | Best Buy Orders 1 to 5 | |
| sq1–sq5 | Best Sell Quantities 1 to 5 | |
| sp1–sp5 | Best Sell Prices 1 to 5 | |
| so1–so5 | Best Sell Orders 1 to 5 | |
| lc | Lower Circuit Limit | |
| uc | Upper Circuit Limit | |
| 52h | 52-week high in other exchanges / Lifetime high in MCX | |
| 52l | 52-week low in other exchanges / Lifetime low in MCX | |
| oi | Open interest | |
| poi | Previous day closing Open Interest | |
| toi | Total open interest for underlying | |
| ft | Feed time |
Unsubscribe Depth
REQUEST ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | ud | 'ud' represents Unsubscribe Depth |
| k | One or more scriplist for unsubscription. Example: NSE|22#BSE|508123 |
RESPONSE ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | udk | 'udk' represents unsubscribe depth acknowledgement |
| k | - | One or more scriplist for unsubscription. Example: NSE|22#BSE|508123 |
Subscribe Order Update
REQUEST ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | o | 'o' represents order update subscription task |
| actid | - | Account ID based on which order updates will be sent |
RESPONSE ATTRIBUTES(Subscription Acknowledgement)
| JSON Field | Possible Value | Description |
|---|---|---|
| t | ok | 'ok' represents order update subscription acknowledgement |
RESPONSE ATTRIBUTES(Order Update subscription Updates)
| JSON Field | Possible Value | Description |
|---|---|---|
| t | om | 'om' represents touchline feed |
| norenordno | Noren Order Number | |
| uid | User ID | |
| actid | Account ID | |
| exch | Exchange | |
| tsym | Trading Symbol | |
| prc | Order Price | |
| prd | Product | |
| status | Order status (New, Replaced, Complete, Rejected etc.) | |
| reporttype | Order event (Fill, Rejected, Canceled) | |
| trantype | Order transaction type (Buy/Sell) | |
| prctyp | Order price type (LMT, MKT, SL-LMT, SL-MKT) | |
| ret | Order retention type (DAY, EOS, IOC, etc.) | |
| 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 Quantity (present only when reporttype is Fill) | |
| flprc | Fill Price (present only when reporttype is Fill) | |
| rejreason | Rejection reason, if order is rejected | |
| exchordid | Exchange Order ID | |
| cancelqty | Canceled quantity (in case of canceled order) | |
| remarks | User-added tag while placing the order | |
| dscqty | Disclosed quantity | |
| trgprc | Trigger price for SL orders | |
| snonum | Present for child orders in cover/bracket; needed during exit | |
| snoordt | Indicates whether the child order is profit or stoploss | |
| blprc | Differential stop loss trigger (cover/bracket parent orders) | |
| bpprc | Differential profit price (bracket parent order) | |
| trailprc | Required if trailing ticks are enabled (cover/bracket parent orders) | |
| exch_tm | Exchange update time (dd-mm-YYYY hh:MM:SS) | |
| amo | Present if After Market Order. Value is “Yes” | |
| tm | Timestamp | |
| kidid | Kid ID | |
| sno_fillid | BO Sequence ID |
Unsubscribe Order Update
REQUEST ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | uo | 'uo' represents Unsubscribe Order update |
RESPONSE ATTRIBUTES
| JSON Field | Possible Value | Description |
|---|---|---|
| t | uok | 'uok' represents Unsubscribe Order update acknowledgement |
Web socket url
wss://giga.gwcindia.in/NorenWSTP/
Request example(To connect to websocket)
{
"t": "c",
"uid": "GQ1A0007",
"actid": "GQ1A0007",
"source": "API",
"susertoken": "3279379865"
}
Request example
{
"t": "t",
"k": "NSE|22#BSE|508123#NSE|NIFTY"
}
Request example
{
"t": "u",
"k": "NSE|22#BSE|508123"
}
Request example
{
"t": "d",
"k": "NSE|22#BSE|508123"
}
Request example
{
"t": "ud",
"k": "NSE|22#BSE|508123"
}
Request example
{
"t": "o",
"actid": "GQ1A0007"
}
Request example
{
"t": "uo"
}