Streamer
Streamer component is used for getting data as and when received in real time. In streamer, we support below subscriptions:
- Order and Trade Updates
- Payment Updates
- Login Updates
Connection Details:
Parameters | Description |
---|---|
URL | http://ncst.nuvamawealth.com |
Port | 9443 |
Connection Type | TCP Connection |
Please Note: Every Request should end with a line feed/new line character to indicate the end of request. Send a heartbeat through an empty JSON "{}" once every 2 mins to keep the connection alive.
Order and Trade Updates
All the updates of client's order and trade information.
Sample Request:
{
"request": {
"streaming_type": "vendorOrders",
"data": {
"vendID": "TEST",
"vendToken": "TEST_TOKEN"
},
"request_type": "subscribe"
}
}
*Parameter | Description |
---|---|
vendID | Vendor ID specific for the Vendor |
vendToken | Vendor Token is the token generated in msg field of loginVendor API |
request_type | takes two values: subscribe to subscribe for orders updates subscribe to unsubscribe for order updates |
echo | anything passed into this comes back in response |
Sample Response: (Trade Update Packet)
{
"response": {
"data": {
"pTyp": "TRADE_UPDATE",
"aTyp": "EQUITY",
"cName": " Hindustan Petroleum Corp ",
"chg": "",
"chgP": "",
"dExpDt": "",
"dInsTyp": "",
"dpName": "HINDPETRO",
"exONo": "1100000007574394",
"exc": "NSE",
"fID": "27416483",
"fPrc": "198.75",
"fQty": "5",
"lsz": "1",
"ltp": "",
"oID": "200506000108581",
"oTyp": "LIMIT",
"opTyp": "",
"pCode": "CNC",
"pConv": "true",
"qty": "5",
"rcvTim": "11:42:27",
"srs": "EQ",
"stkPrc": "",
"sts": "complete",
"sym": "1406_NSE",
"tPrc": "993.75",
"tSym": "INE094A01015",
"tTyp": "BUY",
"tsz": "0.05",
"extOrdTim": "1588745547764535",
"syomId": "NA",
"vlDt": "",
"usrCmnt": "",
"rcvDt": "06/05/2020",
"rmk": "",
"boSeqId": "",
"ordTim": "06/05/2020 11:42:27",
"nReqID": "1"
},
"streaming_type": "vendorOrders"
}
}
Parameter | Description |
---|---|
pTyp | Type of update TRADE_UPDATE - for trade update packets ORDER_UPDATE - for order update packets |
aTyp | Asset Type: EQUITY COMMODITY |
cName | Company Name of the Stock |
chg | Change price of stock |
chgP | Change % of stock |
dExpDt | Display Expiry Date |
dInsTyp | Display Instrument Type |
dpName | Display Name |
exONo | Exchange Order Number |
exc | Exchange Segment NSE/BSE/CDS/NFO/BFO |
fID | Fill ID (when order gets traded) |
fPrc | Fill Price |
fQty | Fill Quantity - Traded Quantity |
lsz | Lot Size |
ltp | Last Traded Price |
oID | NEST Order Number |
oTyp | Type of Order LIMIT STOP LOSS MARKET STOP LOSS - MARKET |
opTyp | Option Type PUT CALL |
pCode | Product Type CNC NRML MTF MIS CO BO |
pConv | Position Conversion flag |
qty | Quantity |
rcvTim | Received Time |
srs | Series - EQ/BE |
stkPrc | Strike Price |
sts | Status of Trade |
sym | NA |
tPrc | Total Price |
tSym | Trade Symbol |
tTyp | Transaction Type BUY SELL |
tsz | Tick Size |
userID | User ID |
extOrdTim | Trade Time in epoch |
syomId | Will be same as nest order id when order is traded |
vlDt | Order/Trade Validity date |
usrCmnt | User Comment |
rcvDt | Receive Date |
rmk | Remarks from User |
boSeqId | Bracket Order Sequence ID (to map different legs of Bracket Order) |
ordTim | Date + Time |
nReqID | NEST Request ID |
Sample Response (Order Update Packet)
{
"response": {
"data": {
"pTyp": "ORDER_UPDATE",
"aTyp": "EQUITY",
"avgPrc": "198.75",
"cName": " Hindustan Petroleum Corp ",
"cancel": "false",
"dExpDt": "",
"dInsTyp": "",
"dQty": "0",
"desc": "5 Bought @ ₹ 198.75",
"dpName": "HINDPETRO",
"dur": "DAY",
"edit": "false",
"exONo": "1100000007574394",
"exc": "NSE",
"exit": "false",
"fQty": "5",
"lsz": "1",
"nReqID": "1",
"oID": "200506000108581",
"oTyp": "LIMIT",
"ogt": "--",
"opTyp": "",
"pCode": "CNC",
"prc": "199.20",
"rQty": "0",
"rRsn": "",
"rcvTim": "11:42:27",
"sID": "",
"srs": "EQ",
"stkPrc": "",
"sts": "complete",
"sym": "1406_NSE",
"tQty": "5",
"tSym": "INE094A01015",
"tTyp": "BUY",
"trgPrc": "0.00",
"tsz": "0.05",
"userID": "12345678",
"isCOSecLeg": "false",
"extOrdTim": "1588745547764535",
"syomId": "NA",
"vlDt": "",
"usrCmnt": "",
"rcvDt": "06/05/2020",
"isSL": false,
"isTgt": false,
"rmk": "",
"boSeqId": "",
"fID": "27416483",
"fPrc": "198.75",
"ordTim": "06/05/2020 11:42:27"
},
"streaming_type": "vendorOrders"
}
}
Parameter | Description |
---|---|
pTyp | Type of update TRADE_UPDATE - for trade update packets ORDER_UPDATE - for order update packets |
aTyp | Asset Type: EQUITY COMMODITY |
avgPrc | Average Price |
cName | Company Name of the Stock |
cancel | NA |
dExpDt | Display Expiry Date |
dInsTyp | Display Instrument Type |
dQty | Display Quantity |
desc | Description (Bought 5 Qty@198.75) |
dpName | Display Name |
dur | validity DAY IOC EOS GTC GTD |
edit | NA |
exONo | Exchange Order Number |
exc | Exchange Segment NSE /BSE /CDS /NFO /BFO |
exit | NA |
fQty | Fill Quantity - Traded Quantity |
lsz | Lot Size |
nReqID | NEST Request ID |
oID | NEST Order Number |
oTyp | Type of Order LIMIT STOP LOSS MARKET STOP LOSS - MARKET |
ogt | Order Generation Type |
opTyp | Option Type PUT CALL |
pCode | Product Type CNC NRML MTF MIS CO BO |
prc | Price |
rQty | Rejection Quantity |
rRsn | Rejection Reason |
rcvTim | Time |
sID | SIP Indicator |
srs | Series - EQ /BE |
stkPrc | Strike Price |
sts | Order Status |
sym | NA |
tQty | Total Quantity |
tSym | Trading Symbol |
tTyp | Transaction Type BUY SELL |
trgPrc | Target Price |
tsz | Tick Size |
userID | User ID |
isCOSecLeg | cover order second leg flag FALSE |
extOrdTim | Order Time in epoch |
syomId | NA |
vlDt | Order/Trade Validity date |
usrCmnt | User Comments |
rcvDt | Receive Date |
isSL | Is Stop Loss enabled |
isTgt | Is Target Hit |
rmk | Remarks from User |
boSeqId | Bracket Order Sequence ID (to map different legs of Bracket Order) |
fID | Fill ID (when order gets traded) |
fPrc | Fill Price |
ordTim | Date + Time |
Payment Updates
All the updates of client's payments.
Sample Request:
{
"request": {
"streaming_type": "vendorPayments",
"data": {
"vendID": "TEST",
"vendToken": "TEST_TOKEN"
},
"request_type": "subscribe"
}
}
Parameter | Description |
---|---|
vendID | Vendor ID specific for the Vendor |
vendToken | Vendor Token is the token generated in msg field of loginVendor API |
request_type | takes two values:subscribe to subscribe for Payment updatesunsubscribe to unsubscribe for Payment updates |
echo | anything passed into this comes back in response |
Sample Response:
{
"response": {
"data": {
"bName": "ICICI BANK LTD",
"cancel": false,
"dt": "31 Mar 2020",
"edit": false,
"iNo": "EDEL_EQ_00000011094",
"rTyp": "payin",
"refNo": "27F1F68C8CB44ED",
"rmk": "Failed",
"seg": "EQ",
"sts": "Failed",
"tAmt": "55",
"tm": "4:00 PM",
"accountno": "104301500918",
"upi": "",
"paymode": "Internet Banking",
"isprimary": false,
"updateddate": "2020-03-31T16:55:47.252254",
"merchantId": null,
"ledgername": "Normal",
"createddate": "2020-03-31T16:00:47.252254",
"txnEpoch": 1585670447252.2542,
"accCode": "EB003311"
},
"streaming_type": "vendorOrders"
}
}
Parameter | Description |
---|---|
bName | Bank Name |
cancel | NA |
dt | Transaction Date (dd mm yyyy) |
edit | NA |
iNo | NA |
rTyp | Transaction Type (payin/payout) |
refNo | Unique Ref No. received from Bank |
rmk | Remarks |
seg | segment (EQ always, can change in future) |
sts | Transaction Status |
tAmt | Transaction Amount |
tm | Transaction Time (12 hour format) |
accountno | Bank Account No for this Transaction |
upi | UPI ID (valid for UPI transaction) |
paymode | Mode of payment (Internet Banking/UPI/UPI QR/UPI Intent/Internet Banking [Paylink]/UPI [Paylink]/UPI QR [Paylink]) |
isprimary | Primary Account flag |
updateddate | Time of last updation of transaction (ISO format) |
merchantId | NA |
ledgername | Client's ledger to which this money will be provided(Normal/SMTF) |
createddate | Transaction creation time (ISO format) |
txnEpoch | createddate in epoch |
accCode | Client Code |
Login Udates
All client login success or failure upadtes.
Sample Request:
{
"request": {
"streaming_type": "vendorNotification",
"data": {
"vendID": "TEST",
"vendToken": "TEST_TOKEN"
},
"request_type": "subscribe"
},
"echo": {}
}
*Parameter | Description |
---|---|
vendID | Vendor ID specific for the Vendor |
vendToken | Vendor Token is the token generated in msg field of loginVendor API |
request_type | takes two values: subscribe to subscribe for orders updates subscribe to unsubscribe for order updates |
echo | anything passed into this comes back in response |
Sample Response: (Login Failure)
{
"response": {
"data": {
"coAccId": "",
"eqAccId": "60000019",
"lgnTim": "2021-08-17 11:21:27",
"rmk": "Login failed. Reason - Invalid Password",
"src": "TEST",
"sts": "Failed"
},
"streaming_type": "vendorNotification"
}
}
Sample Response: (Login Success)
{
"response": {
"data": {
"clEml": "client@email.com",
"clNm": "Client Name",
"coAccId": "CO_ACC_CODE",
"eqAccId": "EQ_ACC_CODE",
"excs": [
"MFSS",
"NSE",
"CDS",
"NFO",
"BFO",
"BSE",
"NSE IPO"
],
"lgnTim": "2021-08-17 11:21:33",
"ordTypes": [
"L",
"MKT",
"SL",
"SL-M"
],
"prds": [
"BO",
"CNC",
"CO",
"MIS",
"MTF",
"NRML"
],
"src": "TEST",
"sts": "Success"
},
"streaming_type": "vendorNotification"
}
}