Orders and Trades¶
The order management API lets you place a new order, cancel or modify the pending order, retrieve the order status, trade status, order book & tradebook.
Order and Trades¶
Place Order¶
Request Details :
Parameter Name | Possiblevalue | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
uid* | Logged in User Id | |
actid* | Login users account ID | |
exch* | NSE / NFO / BSE / MCX / CDS / NCX / BFO / BCD | Exchange (Select from ‘exarr’ Array provided in User Details response) |
tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
qty* | Order Quantity | |
prc* | Order Price(if prctyp = 'MKT/SL-MKT' then the price will be '0') | |
trgprc | Only to be sent in case of SL-LMT / SL-MKT order. | |
dscqty | Disclosed quantity (MAx 10% for NSE,and 50% for MCX) | |
prd* | C / M / H / I / B / F / S / P (C-Delivery ,M-Margin , H-Cover Order , I-Intraday MIS , B-bracket Order , F-MTF , S-special , P-Special2 ) | Product name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange. Show product display name, for user to select, and send corresponding prd in API call) |
trantype* | B / S | B -> BUY, S -> SELL |
prctyp* | LMT / MKT / SL-LMT / SL-MKT / DS / 2L / 3L | |
mkt_protection | Market order protection percentage. Applicable only for MKT orders in BSE/BFO/BCS and MCX segments. | |
ret* | DAY / EOS / IOC | Retention type (Show options as per allowed exchanges) |
remarks | Any tag by user to mark order | |
ordersource | API | Used to generate exchange info fields. [Optional field else it will take login access type] |
bpprc | Book Profit Price applicable only if product is selected as B (Bracket order ) | B -> BUY, S -> SELL |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
ext_remarks | External remarks | |
cl_ord_id | Cli Order Id | |
amo | Yes , If not sent, of Not "Yes", will be treated as Regular order. | |
tsym2 | Trading symbol of second leg, mandatory for price type 2L and 3L (use url encoding to avoid special char error for symbols like M&M) | |
trantype2 | Transaction type of second leg, mandatory for price type 2L and 3L | |
qty2 | Quantity for second leg, mandatory for price type 2L and 3L | |
prc2* | Price for second leg, mandatory for price type 2L and 3L | |
tsym3 | Trading symbol of third leg, mandatory for price type 3L (use url encoding to avoid special char error for symbols like M&M) | |
trantype3 | Transaction type of third leg, mandatory for price type 3L | |
qty3 | Quantity for third leg, mandatory for price type 3L | |
prc3 | Price for third leg, mandatory for price type 3L | |
instname | Instrument Name | |
ipaddr | global Ip of internet access |
Responce Details :
Response data will be in json format with below fields.
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
stat | Ok or Not_Ok | Place order success or failure indication. |
request_time | Response received time. | |
norenordno | It will be present only on successful Order placement to OMS. | |
emsg | This will be present only if Order placement fails |
Modify Order¶
Request Details :
Parameter Name | Possiblevalue | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
exch* | Exchange | |
norenordno* | Noren order number, which needs to be modified | |
prctyp* | LMT / MKT / SL-MKT / SL-LMT | This can be modified |
prc* | Modified / New price | |
qty* | Modified / New Quantity / old quantity if not modified Quantity to Fill / Order Qty - This is the total qty to be filled for the order. Its Open Qty/Pending Qty plus Filled Sha(cumulative for the order) for the order.* Please do not send only the pending qty in this field | |
tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
ret | DAY / IOC / EOS | New Retention type of the order |
mkt_protection | Market order protection percentage. Applicable only for MKT orders in BSE/BFO/BCS and MCX segments. | |
trgprc | Modified / New price | |
dscqty | Disclosed quantity (Max 10% for NSE, and 50% for MCX) | |
ext_remarks | External remarks | |
cl_ord_id | Cli Order Id | |
channel | channel | |
usr_agent | User Agent | |
app_inst_id | App Install Id | |
uid* | User id of the logged in user. | |
bpprc | Book Profit Price applicable only if product is selected as B (Bracket order ) | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
ipaddr | global Ip of internet access | |
ordersource | API / MOB / WEB / TT | Used to generate exchange info fields. [Optional field else it will take login access type] |
Response Details :
Response data will be in json format with below fields.
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
stat | Ok or Not_Ok | Modify order success or failure indication. |
result | Noren Order number of the order modified. | |
request_time | Response received time. | |
emsg | This will be present only if Order modification fails |
Cancel Order¶
Request Details :
Parameter Name | Possiblevalue | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possiblevalue | Description |
---|---|---|
norenordno* | Noren order number, which needs to be modified | |
uid* | User id of the logged in user. | |
ext_remarks | External remarks | |
cl_ord_id | Cli Order Id | |
channel | Channel | |
usr_agent | User Agent | |
app_inst_id | App Install Id |
Response Details : Response data will be in json format with below fields.
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
stat | Ok or Not_Ok | Place order success or failure indication. |
request_time | Response received time. | |
norenordno | It will be present only on successful Order placement toOMS. | |
emsg | This will be present only if Order placement fails |
Exit SNO Order¶
Request Details :
Parameter Name | Possiblevalue | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
norenordno* | ‘snonum’ from order book if available, else Noren order number. | |
prd* | H / B | Allowed for only H and B products (Cover order and bracket order) |
uid* | User id of the logged in user. |
Response Details :
Response data will be in json format with below fields.
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
stat | Ok or Not_Ok | Cancel order success or failure indication. |
dmsg | Display message, (will be present only in case of success). | |
request_time | Response received time. | |
emsg | This will be present only if Order cancelation fails |
Order Margin¶
Request Details :
Parameter Name | Possiblevalue | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
uid* | Logged in User Id | |
actid* | Login users account ID | |
exch* | NSE / NFO / BSE / MCX | Exchange (Select from ‘exarr’ Array provided in User Details response) |
tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
qty* | Order Quantity | |
prc* | Order Price | |
trgprc | Only to be sent in case of SL-LMT / SL-MKT order. | |
prd* | C / M / H | Product name Select from ‘prarr’ Array provided in UserDetails response and if same is allowed for selected exchange. Show product display name for user to select and send corresponding prd in API call |
trantype* | B / S | B -> BUY, S -> SELL |
prctyp* | LMT / MKT /SL-LMT / SL-MKT | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
rorgqty | Optional field. Application only for modify order, open order quantity | |
fillshares | Optional field. Application only for modify order, quantity already filled. | |
rorgprc | Optional field. Application only for modify order, open order price | |
orgtrgprc | Optional field. Application only for modify order, open order trigger price | |
norenordno | Optional field. Application only for H or B order modification | |
snonum | Optional field. Application only for H or B order modification |
Response Details :
Response data will be in json format with below fields.
Json Fields | Possiblevalue | Description |
---|---|---|
stat | Ok or Not_Ok | Place order success or failure indication. |
request_time | Response received time. | |
remarks | This field will be available only on success. | |
cash | Total credits available for order | |
marginused | Meaning changes with remarks as explained below. | |
ordermargin | Margin required for this order. | |
marginusedprev | Margin used excluding this order | |
emsg | This will be present only if Order placement fails |
Possible Response Cases for Order margin:
"remarks":"Order Success" => Order will go through
“cash” -> field will have total cash available with the user.
“marginused” -> field will have Margin used if the user places order.
“remarks”:”Insufficient Balance” => Order will get rejected.
“cash” -> field will have total cash available for this type of order.
“marginused” -> field will have Additional margin required for this order to pass through.
(Show caption as Shortfall margin)
“remarks”:”Order Success : Eligible Sell:
“remarks”:”Eligible Sell:
“remarks”:”No Holdings uploaded” => Order will get rejected, no holding for this symbol
“remarks”:”Invalid scrip” or "RED is under Reconciliation" => Order will get rejected.
“remarks”:”Squareoff Order” => Order will go through
Basket Margin¶
Request Details :
Parameter Name | Possiblevalue | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possiblevalue | Description |
---|---|---|
uid* | Logged in User Id | |
actid* | Login users account ID | |
exch* | NSE / NFO / BSE / MCX | Exchange (Select from ‘exarr’ Array provided in User Details response) |
tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
qty* | Order Quantity | |
prc* | Order Price | |
trgprc | Only to be sent in case of SL / SL-M order. | |
prd* | C / M / H | Product name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange Show product display name, for user to select, and send corresponding prd in API call) |
trantype* | B / S | B -> BUY, S -> SELL |
prctyp* | LMT / MKT / SLLMT / SL-MKT | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
rorgqty | Optional field. Application only for modify order, open order quantity | |
fillshares | Optional field. Application only for modify order quantity already filled. | |
rorgprc | Optional field. Application only for modify order, open order price | |
orgtrgprc | Optional field. Application only for modify order, open order trigger price | |
norenordno | Optional field. Application only for H or B order modification | |
snonum | Optional field. Application only for H or B order modification | |
basketlists | Optional field. Array of json objects. (object fields given in below table) |
Json Fields of object in values Array | Possiblevalue | Description |
---|---|---|
exch* | NSE / NFO / BSE / MCX | Exchange (Select from ‘exarr’ Array provided in User Details response) |
tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
qty* | Order Quantity | |
prc* | Order Price | |
trgprc | Only to be sent in case of SL / SL-M order. | |
prd* | C / M / H | Product name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange. Show product display name, for user to select, and send corresponding prd in API call) |
trantype* | B / S | B -> BUY, S -> SELL |
prctyp* | LMT / MKT / SL-LMT / SL-MKT |
jData=
{
"uid":"J171",
"actid":"J171",
"exch":"MCX",
"tsym":"CRUDEOILM18JUN24",
"qty":"10",
"prc":"0",
"prd":"M",
"trantype":"B",
"prctyp":"MKT",
"basketlists":[
{
"exch":"MCX",
"tsym":"NATURALGAS28MAY24",
"qty":"1250",
"prc":"0",
"prd":"M",
"trantype":"B",
"prctyp":"MKT"
}
]
}
&jKey=33f901a267c4f1a00294e7700dc578bdd42c686f4d25efd6b06eec766f0d80f7
Response Details :
Response data will be in json format with below fields.
Json Fields | Possiblevalue | Description |
---|---|---|
stat | Ok or Not_Ok | Place order success or failure indication. |
request_time | Response received time. | |
remarks | This field will contain rejection reason. | |
marginused | Total margin used. | |
marginusedtrade | Margin used after trade. | |
emsg | This will be present only if Order placement fails |
Order Book¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value Description | |
---|---|---|
uid* | Logged in User Id | |
prd | H / M / ... | Product name |
[
{
"stat": "Ok",
"norenordno": "24052400005055",
"kidid": "1",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"tsym": "VEDL-EQ",
"qty": "1",
"ordenttm": "1716537409",
"trantype": "B",
"prctyp": "MKT",
"ret": "DAY",
"token": "3063",
"mult": "1",
"prcftr": "1.000000",
"instname": "EQ",
"ordersource": "API",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "0.00",
"rprc": "462.95",
"avgprc": "462.95",
"dscqty": "0",
"s_prdt_ali": "CNC",
"prd": "C",
"status": "COMPLETE",
"st_intrn": "COMPLETE",
"fillshares": "1",
"norentm": "13:26:49 24-05-2024",
"exch_tm": "24-05-2024 13:26:49",
"exchordid": "1300000029263720",
"rqty": "1"
},
{
"stat": "Ok",
"norenordno": "24052400003150",
"kidid": "1",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"tsym": "NIFTYNXT5031MAY24C73000",
"qty": "10",
"ordenttm": "1716527539",
"trantype": "S",
"prctyp": "LMT",
"ret": "DAY",
"token": "57297",
"mult": "1",
"prcftr": "1.000000",
"instname": "OPTIDX",
"ordersource": "MOB",
"dname": "NIFTYNXT50 MAY 73000 CE ",
"pp": "2",
"ls": "10",
"ti": "0.05",
"prc": "28.45",
"rprc": "28.45",
"avgprc": "28.45",
"dscqty": "0",
"s_prdt_ali": "NRML",
"prd": "M",
"status": "COMPLETE",
"st_intrn": "COMPLETE",
"fillshares": "10",
"norentm": "10:42:19 24-05-2024",
"exch_tm": "24-05-2024 10:42:19",
"exchordid": "1100000025853480",
"rqty": "10"
},
{
"stat": "Ok",
"norenordno": "24052400003144",
"kidid": "1",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"tsym": "NIFTYNXT5031MAY24C73000",
"qty": "10",
"ordenttm": "1716527513",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
"token": "57297",
"mult": "1",
"prcftr": "1.000000",
"instname": "OPTIDX",
"ordersource": "MOB",
"dname": "NIFTYNXT50 MAY 73000 CE ",
"pp": "2",
"ls": "10",
"ti": "0.05",
"prc": "29.45",
"rprc": "29.45",
"avgprc": "29.45",
"dscqty": "0",
"s_prdt_ali": "NRML",
"prd": "M",
"status": "COMPLETE",
"st_intrn": "COMPLETE",
"fillshares": "10",
"norentm": "10:42:08 24-05-2024",
"exch_tm": "24-05-2024 10:41:53",
"exchordid": "1100000025743712",
"rqty": "10"
},
{
"stat": "Ok",
"norenordno": "24052400001142",
"kidid": "1",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"tsym": "BANKNIFTY29MAY24C49900",
"qty": "15",
"ordenttm": "1716523594",
"trantype": "S",
"prctyp": "MKT",
"ret": "DAY",
"token": "56675",
"mult": "1",
"prcftr": "1.000000",
"instname": "OPTIDX",
"ordersource": "WEB",
"dname": "BANKNIFTY 29MAY24 49900 CE ",
"pp": "2",
"ls": "15",
"ti": "0.05",
"prc": "0.00",
"rprc": "94.70",
"avgprc": "94.85",
"dscqty": "0",
"s_prdt_ali": "MIS",
"prd": "I",
"status": "COMPLETE",
"st_intrn": "COMPLETE",
"fillshares": "15",
"norentm": "09:36:34 24-05-2024",
"exch_tm": "24-05-2024 09:36:34",
"remarks": "POCKET",
"exchordid": "1600000007831554",
"rqty": "15"
}
]
Response Details :
Response data will be in json Array of objects with below fields in case of success.
Json Fields | Possible value Description | |
---|---|---|
stat | Ok or Not_Ok | Order book success or failure indication. |
uid | Logged in User Id | |
actid | Login users account ID | |
exch | Exchange Segment | |
tsym | Trading symbol / contract on which order is placed. | |
norenordno | Noren Order Number | |
prc | Order Price | |
qty | Order Quantity | |
mkt_protection | Market Protection percentage | |
prd | Display product alias name, using prarr returned in user details. | |
s_prdt_ali | Product display name | |
status | Order status | |
trantype | B / S | Transaction type of the order |
prctyp | LMT / MKT / SLMKT/ SL-LMT | Price type |
fillshares | Total Traded Quantity of this order (will not be present if no trades for this order) | |
avgprc | Average trade price of total traded quantity (will not be present if | |
no trades for this order) | ||
rejreason | If order is rejected, reason in text form | |
exchordid | Exchange Order Number | |
cancelqty | Canceled quantity for order which is in status cancelled. | |
remarks | Any message Entered during order entry. | |
dscqty | Order disclosed quantity. | |
trgprc | Order trigger price | |
ret | DAY / IOC / EOS | Order validity |
bpprc | Book Profit Price applicable only if product is selected as B (Bracketorder ) | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
amo | Yes / No | |
pp | Price precision | |
ti | Tick size | |
ls | Lot size | |
token | Contract Token | |
norentm | Noren time stamp | |
ordenttm | Order entry time | |
exch_tm | Exchange update time Format: dd-mm-YYYY hh:MM:SS | |
snoordt | 0 for profit leg and 1 for stoploss leg | |
snonum | This field will be present for product H and B; and only if it is profit/sl order. | |
sno_fillid | SNO fill id | |
prcftr | Contract price factor (GN*PN)/(GD*PD), (used for order value calculation) | |
mult | Contract price multiplier, (used for order value calculation) | |
dname | Broker specific contract display name, present only if applicable. | |
rqty | To be used in get margin from modify window. | |
rprc | To be used in get margin from modify window. | |
rtrgprc | To be used in get margin from modify window, for H/B products only | |
rblprc | To be used in get margin from modify window, for H/B products only | |
rorgqty | To be used in get margin from modify window. | |
rorgprc | To be used in get margin from modify window. | |
orgtrgprc | To be used in get margin from modify window, for H/B products only | |
orgblprc | To be used in get margin from modify window, for H/B products only | |
algo_name | Algo Name | |
add_ord_id | Basket Order Id | |
C | CUST_FIRM_C | |
brnchid | Region id | |
instname | Instrument Name | |
ordersource | Order Source | |
st_intrn | ||
rejby | If an order is rejected, it will indicate from where it got rejected. | |
src_uid | Source User Id |
Response data will be in json format with below fields in case of failure:
Json Fields | Possible value Description | |
---|---|---|
stat | Not_Ok Order book failure indication. | |
request_time | Response received time. | |
emsg | Error message |
[
{
"stat" : "Ok",
"exch" : "NSE" ,
"tsym" : "ACC-EQ" ,
"norenordno" : "20062500000001223",
"prc" : "127230",
"qty" : "100",
"prd" : "C",
"status": "Open",
"trantype" : "B",
"prctyp" : "LMT",
"fillshares" : "0",
"avgprc" : "0",
"exchordid" : "250620000000343421",
"uid" : "VIDYA",
"actid" : "CLIENT1",
"ret" : "DAY",
"amo" : "Yes"
},
{
"stat" : "Ok",
"exch" : "NSE" ,
"tsym" : "ABB-EQ" ,
"norenordno" : "20062500000002543",
"prc" : "127830",
"qty" : "50",
"prd" : "C",
"status": "REJECT",
"trantype" : "B",
"prctyp" : "LMT",
"fillshares" : "0",
"avgprc" : "0",
"rejreason" : "Insufficient funds"
"uid" : "VIDYA",
"actid" : "CLIENT1",
"ret" : "DAY",
"amo" : "No"
}
]
Multi Leg Order Book¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
uid* | Logged in User Id | |
prd | H / M / ... | Product name |
Response Details :
Response data will be in json Array of objects with below fields in case of success.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Order book success or failure indication. |
exch | Exchange Segment | |
tsym | Trading symbol / contract on which order is placed. | |
norenordno | Noren Order Number | |
prc | Order Price | |
qty | Order Quantity | |
prd | Display product alias name, using prarr returned in user details. | |
status | Order status | |
trantype | B / S | Transaction type of the order |
prctyp | LMT / MKT | Price type |
fillshares | Total Traded Quantity of this order | |
avgprc | Average trade price of total traded quantity | |
rejreason | If order is rejected, reason in text form | |
exchordid | Exchange Order Number | |
cancelqty | Canceled quantity for order which is in status cancelled. | |
remarks | Any message Entered during order entry. | |
dscqty | Order disclosed quantity. | |
trgprc | Order trigger price | |
ret | DAY / IOC / EOS | Order validity |
uid | ||
actid | ||
bpprc | Book Profit Price applicable only if product is selected as B (Bracketorder ) | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
amo | Yes / No | |
pp | Price precision | |
ti | Tick size | |
ls | Lot size | |
tsym2 | Trading symbol of second leg, mandatory for price type 2L and 3L | |
trantype2 | Transaction type of second leg, mandatory for price type 2L and 3L | |
qty2 | Quantity for second leg, mandatory for price type 2L and 3L | |
prc2 | Price for second leg, mandatory for price type 2L and 3L | |
tsym3 | Trading symbol of third leg, mandatory for price type 3L | |
trantype3 | Transaction type of third leg, mandatory for price type 3L | |
qty3 | Quantity for third leg, mandatory for price type 3L | |
prc3 | Price for third leg, mandatory for price type 3L | |
fillshares2 | Total Traded Quantity of 2nd Leg | |
avgprc2 | Average trade price of total traded quantity for 2nd leg | |
fillshares3 | Total Traded Quantity of 3rd Leg | |
avgprc3 | Average trade price of total traded quantity for 3rd leg | |
dname2 | Broker specific contract display name of second leg, present only if applicable. | |
dname3 | Broker specific contract display name of third leg, present only if applicable. |
Response data will be in json format with below fields in case of failure:
Json Fields | Possible value | Description |
---|---|---|
stat | Not_Ok | Order book failure indication. |
request_time | Response received time. | |
emsg | Error message |
Single Order History¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
uid* | Logged in | |
norenordno* | Noren Order Number |
[
{
"stat": "Ok",
"norenordno": "24052400006666",
"kidid": "2",
"uid": "J171",
"src_uid": "J171",
"actid": "J171",
"exch": "NSE",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
"rejby": "",
"pan": "BDFPJ5456E",
"ordersource": "API",
"token": "4745",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "126.00",
"dscqty": "0",
"s_prdt_ali": "CNC",
"prd": "C",
"status": "CANCELED",
"st_intrn": "CANCELED",
"rpt": "Canceled",
"ordenttm": "1716544377",
"norentm": "15:22:57 24-05-2024",
"exch_tm": "24-05-2024 15:22:57",
"exchordid": "1000000048166268",
"cancelqty": "1"
},
{
"stat": "Ok",
"norenordno": "24052400006666",
"kidid": "2",
"uid": "J171",
"src_uid": "J171",
"actid": "J171",
"exch": "NSE",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
"rejby": "",
"pan": "BDFPJ5456E",
"ordersource": "API",
"token": "4745",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "126.00",
"dscqty": "0",
"s_prdt_ali": "CNC",
"prd": "C",
"status": "PENDING",
"st_intrn": "CANCEL PENDING",
"rpt": "PendingCancel",
"ordenttm": "1716544377",
"norentm": "15:22:57 24-05-2024",
"exch_tm": "24-05-2024 15:20:27",
"exchordid": "1000000048166268"
},
{
"stat": "Ok",
"norenordno": "24052400006666",
"kidid": "1",
"uid": "J171",
"src_uid": "",
"actid": "J171",
"exch": "NSE",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
"rejby": "",
"pan": "BDFPJ5456E",
"ordersource": "WEB",
"token": "4745",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "126.00",
"dscqty": "0",
"s_prdt_ali": "CNC",
"prd": "C",
"status": "OPEN",
"st_intrn": "OPEN",
"rpt": "New",
"ordenttm": "1716544227",
"norentm": "15:20:27 24-05-2024",
"exch_tm": "24-05-2024 15:20:27",
"exchordid": "1000000048166268"
},
{
"stat": "Ok",
"norenordno": "24052400006666",
"kidid": "1",
"uid": "J171",
"src_uid": "",
"actid": "J171",
"exch": "NSE",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
"rejby": "",
"pan": "BDFPJ5456E",
"ordersource": "WEB",
"token": "4745",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "126.00",
"dscqty": "0",
"s_prdt_ali": "CNC",
"prd": "C",
"status": "PENDING",
"st_intrn": "ORDER PENDING",
"rpt": "PendingNew",
"ordenttm": "1716544227",
"norentm": "15:20:27 24-05-2024"
},
{
"stat": "Ok",
"norenordno": "24052400006666",
"kidid": "1",
"uid": "J171",
"src_uid": "",
"actid": "J171",
"exch": "NSE",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
"rejby": "",
"pan": "BDFPJ5456E",
"ordersource": "WEB",
"token": "4745",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "126.00",
"dscqty": "0",
"s_prdt_ali": "CNC",
"prd": "C",
"status": "PENDING",
"st_intrn": "ORDER ACK",
"rpt": "NewAck",
"ordenttm": "1716544227",
"norentm": "15:20:27 24-05-2024"
}
]
Single Order Status¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
uid* | Logged in User Id | |
norenordno* | Noren Order Number | |
actid* | Account id for which order was placed | |
exch* | Exchange on which order was placed. |
[
{
"stat": "Ok",
"norenordno": "23072300000001",
"kidid": "1",
"uid": "TESTINV",
"src_uid": "",
"actid": "TESTINV",
"exch": "NSE",
"tsym": "ACC-EQ",
"qty": "250",
"trantype": "S",
"prctyp": "LMT",
"ret": "DAY",
"rejby": "RED",
"pan": "AAAAA1234A",
"ordersource": "WEB",
"token": "22",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "2400.00",
"dscqty": "0",
"s_prdt_ali": "Regular",
"prd": "M",
"status": "REJECTED",
"st_intrn": "REJECTED",
"rpt": "Rejected",
"ordenttm": "1690107153",
"norentm": "15:42:33 23-07-2023",
"remarks": "WC TEST Order",
"rejreason": "RED:RULE:{Check circuit limit including square off order} Current:INR 2,400.00 LowerCircuit:INR 1,590.05 UpperCircuit:INR 1,94335:NSE.ACC-EQ for C-TESTINV [DEFAULT]",
"introp_exch": "EQT"
}
]
Response Details :
Response data will be in json Array of objects with below fields in case of success (but only 1 object will be there in json array, unlike single order history, this is kept to help easy migration from single order history to single order status, where user is only interested in the status).
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | |
exch | Exchange Segment | |
tsym | Trading symbol / contract on which order is placed. | |
norenordno | Noren Order Number | |
prc | Order Price | |
qty | Order Quantity | |
prd | Display product alias name, using prarr returned in user details. | |
s_prdt_ali | Product display name | |
status | Order status | |
rpt | Report Type (fill/complete etc) | |
trantype | B / S | Transaction type of the order |
prctyp | LMT / MKT | Price type |
fillshares | Total Traded Quantity of this order | |
avgprc | Average trade price of total traded quantity | |
rejreason | If order is rejected, reason in text form | |
exchordid | Exchange Order Number | |
cancelqty | Canceled quantity for order which is in status cancelled. | |
remarks | Any message Entered during order entry. | |
dscqty | Order disclosed quantity. | |
trgprc | Order trigger price | |
ret | DAY / IOC / EOS | Order validity |
uid | ||
actid | ||
bpprc | Book Profit Price applicable only if product is selected as B (Bracket order ) | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
amo | Yes / No | |
pp | Price precision | |
ti | Tick size | |
ls | Lot size | |
token | Contract Token | |
norentm | ||
ordenttm | ||
exch_tm | Format: dd-mm-YYYY hh:MM:SS |
Response data will be in json format with below fields in case of failure:
Json Fields | Possible value | Description |
---|---|---|
stat | Not_Ok | Order book failure indication. |
request_time | Response received time. | |
emsg | Error message |
Trade Book¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
uid* | Logged in User Id | |
actid* | Account Id of logged in user |
[
{
"stat": "Ok",
"norenordno": "24052400006027",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"prctyp": "MKT",
"ret": "DAY",
"s_prdt_ali": "CNC",
"prd": "C",
"flid": "7071056",
"fltm": "24-05-2024 14:42:00",
"trantype": "S",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"token": "4745",
"fillshares": "1",
"flqty": "1",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "0.00",
"prcftr": "1.000000",
"flprc": "129.45",
"norentm": "14:42:00 24-05-2024",
"avgprc": "129.45",
"exch_tm": "24-05-2024 14:42:00",
"exchordid": "1000000043169462"
},
{
"stat": "Ok",
"norenordno": "24052400006026",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"prctyp": "MKT",
"ret": "DAY",
"s_prdt_ali": "CNC",
"prd": "C",
"flid": "66982682",
"fltm": "24-05-2024 14:41:59",
"trantype": "S",
"tsym": "VEDL-EQ",
"qty": "1",
"token": "3063",
"fillshares": "1",
"flqty": "1",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "0.00",
"prcftr": "1.000000",
"flprc": "462.40",
"norentm": "14:41:59 24-05-2024",
"avgprc": "462.40",
"exch_tm": "24-05-2024 14:41:59",
"exchordid": "1300000036863149"
},
{
"stat": "Ok",
"norenordno": "24052400006001",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"prctyp": "LMT",
"ret": "DAY",
"s_prdt_ali": "CNC",
"prd": "C",
"flid": "7027025",
"fltm": "24-05-2024 14:39:58",
"trantype": "B",
"tsym": "BANKINDIA-EQ",
"qty": "1",
"token": "4745",
"fillshares": "1",
"flqty": "1",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "140.00",
"prcftr": "1.000000",
"flprc": "129.35",
"norentm": "14:39:58 24-05-2024",
"avgprc": "129.35",
"exch_tm": "24-05-2024 14:39:58",
"exchordid": "1000000042898038"
},
{
"stat": "Ok",
"norenordno": "24052400005055",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"prctyp": "MKT",
"ret": "DAY",
"s_prdt_ali": "CNC",
"prd": "C",
"flid": "65531930",
"fltm": "24-05-2024 13:26:49",
"trantype": "B",
"tsym": "VEDL-EQ",
"qty": "1",
"token": "3063",
"fillshares": "1",
"flqty": "1",
"pp": "2",
"ls": "1",
"ti": "0.05",
"prc": "0.00",
"prcftr": "1.000000",
"flprc": "462.95",
"norentm": "13:26:49 24-05-2024",
"avgprc": "462.95",
"exch_tm": "24-05-2024 13:26:49",
"exchordid": "1300000029263720"
},
{
"stat": "Ok",
"norenordno": "24052400003150",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"prctyp": "LMT",
"ret": "DAY",
"s_prdt_ali": "NRML",
"prd": "M",
"flid": "71366267",
"fltm": "24-05-2024 10:42:19",
"trantype": "S",
"tsym": "NIFTYNXT5031MAY24C73000",
"qty": "10",
"token": "57297",
"fillshares": "10",
"flqty": "10",
"pp": "2",
"ls": "10",
"ti": "0.05",
"prc": "28.45",
"prcftr": "1.000000",
"flprc": "28.45",
"norentm": "10:42:19 24-05-2024",
"avgprc": "28.45",
"exch_tm": "24-05-2024 10:42:19",
"exchordid": "1100000025853480"
},
{
"stat": "Ok",
"norenordno": "24052400003144",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"prctyp": "LMT",
"ret": "DAY",
"s_prdt_ali": "NRML",
"prd": "M",
"flid": "71365336",
"fltm": "24-05-2024 10:42:08",
"trantype": "B",
"tsym": "NIFTYNXT5031MAY24C73000",
"qty": "10",
"token": "57297",
"fillshares": "10",
"flqty": "10",
"pp": "2",
"ls": "10",
"ti": "0.05",
"prc": "29.45",
"prcftr": "1.000000",
"flprc": "29.45",
"norentm": "10:42:08 24-05-2024",
"avgprc": "29.45",
"exch_tm": "24-05-2024 10:41:53",
"exchordid": "1100000025743712"
},
{
"stat": "Ok",
"norenordno": "24052400001142",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"prctyp": "MKT",
"ret": "DAY",
"s_prdt_ali": "MIS",
"prd": "I",
"flid": "410829735",
"fltm": "24-05-2024 09:36:34",
"trantype": "S",
"tsym": "BANKNIFTY29MAY24C49900",
"qty": "15",
"token": "56675",
"fillshares": "15",
"flqty": "15",
"pp": "2",
"ls": "15",
"ti": "0.05",
"prc": "0.00",
"prcftr": "1.000000",
"flprc": "94.85",
"norentm": "09:36:34 24-05-2024",
"avgprc": "94.85",
"exch_tm": "24-05-2024 09:36:34",
"remarks": "POCKET",
"exchordid": "1600000007831554"
},
{
"stat": "Ok",
"norenordno": "24052400001107",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"prctyp": "MKT",
"ret": "DAY",
"s_prdt_ali": "MIS",
"prd": "I",
"flid": "410801942",
"fltm": "24-05-2024 09:35:15",
"trantype": "B",
"tsym": "BANKNIFTY29MAY24C49900",
"qty": "15",
"token": "56675",
"fillshares": "15",
"flqty": "15",
"pp": "2",
"ls": "15",
"ti": "0.05",
"prc": "0.00",
"prcftr": "1.000000",
"flprc": "99.40",
"norentm": "09:35:15 24-05-2024",
"avgprc": "99.40",
"exch_tm": "24-05-2024 09:35:15",
"remarks": "POCKET",
"exchordid": "1600000007293915"
}
]
Response Details :
Response data will be in json Array of objects with below fields in case of success.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Order book success or failure indication. |
exch | Exchange Segment | |
tsym | Trading symbol / contract on which order is placed. | |
norenordno | Noren Order Number | |
qty | Order Quantity | |
prd | Display product alias name, using prarr returned in user details. | |
s_prdt_ali | Product display name | |
trantype | B / S | Transaction type of the order |
prctyp | LMT / MKT | Price type |
fillshares | Total Traded Quantity of this order | |
avgprc | Average trade price of total traded quantity | |
exchordid | Exchange Order Number | |
remarks | Any message Entered during order entry. | |
ret | DAY / IOC / EOS | Order validity |
uid | ||
actid | ||
pp | Price precision | |
ti | Tick size | |
ls | Lot size | |
cstFrm | Custom Firm | |
fltm | Fill Time | |
flid | Fill ID | |
flqty | Fill Qty | |
flprc | Fill Price | |
ordersource | Order Source | |
token | Token | |
norentm | Noren time stamp | |
exch_tm | Exchange update time Format: dd-mm-YYYY hh:MM:SS | |
snoordt | 0 for profit leg and 1 for stoploss leg | |
snonum | This field will be present for product H and B; and only if it is profit/sl order. | |
remarks | Any message Entered during order entry. | |
prc | Order Price | |
mult | Multiplier |
Response data will be in json format with below fields in case of failure:
Json Fields | Possible value | Description |
---|---|---|
stat | Not_Ok Order | book failure indication. |
request_time | Response received time. | |
emsg | Error message |
Positions Book¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
uid* | Logged in User Id | |
actid* | Account id of the logged in user. |
[
{
"stat": "Ok",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"tsym": "BANKNIFTY29MAY24C49900",
"s_prdt_ali": "MIS",
"prd": "I",
"token": "56675",
"instname": "OPTIDX",
"dname": "BANKNIFTY 29MAY24 49900 CE ",
"frzqty": "901",
"pp": "2",
"ls": "15",
"ti": "0.05",
"mult": "1",
"prcftr": "1.000000",
"daybuyqty": "15",
"daysellqty": "15",
"daybuyamt": "1491.00",
"daybuyavgprc": "99.40",
"daysellamt": "1422.75",
"daysellavgprc": "94.85",
"dayavgprc": "0.00",
"netqty": "0",
"netavgprc": "0.00",
"lp": "65.40",
"urmtom": "0.00",
"totbuyamt": "1491.00",
"totsellamt": "1422.75",
"totbuyavgprc": "99.40",
"totsellavgprc": "94.85",
"rpnl": "-68.25"
},
{
"stat": "Ok",
"uid": "J171",
"actid": "J171",
"exch": "NFO",
"tsym": "NIFTYNXT5031MAY24C73000",
"s_prdt_ali": "NRML",
"prd": "M",
"token": "57297",
"instname": "OPTIDX",
"dname": "NIFTYNXT50 MAY 73000 CE ",
"frzqty": "601",
"pp": "2",
"ls": "10",
"ti": "0.05",
"mult": "1",
"prcftr": "1.000000",
"daybuyqty": "10",
"daysellqty": "10",
"daybuyamt": "294.50",
"daybuyavgprc": "29.45",
"daysellamt": "284.50",
"daysellavgprc": "28.45",
"dayavgprc": "0.00",
"netqty": "0",
"netavgprc": "0.00",
"lp": "34.05",
"urmtom": "0.00",
"totbuyamt": "294.50",
"totsellamt": "284.50",
"totbuyavgprc": "29.45",
"totsellavgprc": "28.45",
"rpnl": "-10.00"
},
{
"stat": "Ok",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"tsym": "VEDL-EQ",
"s_prdt_ali": "CNC",
"prd": "C",
"token": "3063",
"instname": "EQ",
"frzqty": "215597",
"pp": "2",
"ls": "1",
"ti": "0.05",
"mult": "1",
"prcftr": "1.000000",
"daybuyqty": "1",
"daysellqty": "1",
"daybuyamt": "462.95",
"daybuyavgprc": "462.95",
"daysellamt": "462.40",
"daysellavgprc": "462.40",
"dayavgprc": "0.00",
"netqty": "0",
"netavgprc": "0.00",
"lp": "460.80",
"urmtom": "0.00",
"totbuyamt": "462.95",
"totsellamt": "462.40",
"totbuyavgprc": "462.95",
"totsellavgprc": "462.40",
"rpnl": "-0.55"
},
{
"stat": "Ok",
"uid": "J171",
"actid": "J171",
"exch": "NSE",
"tsym": "BANKINDIA-EQ",
"s_prdt_ali": "CNC",
"prd": "C",
"token": "4745",
"instname": "EQ",
"frzqty": "773953",
"pp": "2",
"ls": "1",
"ti": "0.05",
"mult": "1",
"prcftr": "1.000000",
"daybuyqty": "1",
"daysellqty": "1",
"daybuyamt": "129.35",
"daybuyavgprc": "129.35",
"daysellamt": "129.45",
"daysellavgprc": "129.45",
"dayavgprc": "0.00",
"netqty": "0",
"netavgprc": "0.00",
"lp": "129.90",
"urmtom": "0.00",
"totbuyamt": "129.35",
"totsellamt": "129.45",
"totbuyavgprc": "129.35",
"totsellavgprc": "129.45",
"rpnl": "0.10"
}
]
Response Details :
Response data will be in json format with Array of Objects with below fields in case of success.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Position book success or failure indication. |
exch | Exchange segment | |
tsym | Trading symbol / contract. | |
token | Contract token | |
uid | User Id | |
actid | Account Id | |
prd | Product name to be shown. | |
s_prdt_ali | Product display name | |
netqty | Net Position quantity | |
netavgprc | Net position average price | |
dayavgprc | Day average price | |
daybuyqty | Day Buy Quantity | |
daysellqty | Day Sell Quantity | |
daybuyavgprc | Day Buy average price | |
daysellavgprc | Day buy average price | |
daybuyamt | Day Buy Amount | |
daysellamt | Day Sell Amount | |
cfbuyqty | Carry Forward Buy Quantity | |
cforgavgprc | Original Avg Price | |
cfsellqty | Carry Forward Sell Quantity | |
cfbuyavgprc | Carry Forward Buy average price | |
cfsellavgprc | Carry Forward Buy average price | |
cfbuyamt | Carry Forward Buy Amount | |
cfsellamt | Carry Forward Sell Amount | |
totbuyamt | Total Buy Amount | |
totsellamt | Total Sell Amount | |
totbuyavgprc | Total Buy Avg Price | |
totsellavgprc | Total Sell Avg Price | |
lp | LTP | |
rpnl | RealizedPNL | |
urmtom | UnrealizedMTOM.(Can be recalculated in LTP update : = netqty * (lp from web socket - netavgprc) * prcftr) | |
bep | Break even price | |
openbuyqty | Open Buy Quantity | |
opensellqty | Open Sell Quantity | |
openbuyamt | Open Buy Amount | |
opensellamt | Open Sell Amount | |
openbuyavgprc | Open Buy Average Price | |
opensellavgprc | Open Sell Average Price | |
mult | Contract price multiplier, (used for order value calculation) | |
pp | Price precision | |
prcftr | gn*pn/(gd*pd). | |
ti | Tick size | |
ls | Lot size | |
instname | Instrument Name | |
upldprc | Upload price | |
netupldprc | Net Upload Price | |
request_time | This will be present only in a failure response. | |
dname | Broker specific contract display name, present only if applicable. |
calculation of MTM and PnL :
// Note: calculation of MTM and PnL
1.ActualUnrealizedMtoM = netqty(in weights) * prcftr * mult * (LTP - avgprc)
For MTM, avgprc = netavgprc;
For PnL, avgprc = netupldprc; if netupldprc = 0 then avgprc = netavgprc;
2.NetBuyQty = daybuyqty + cfbuyqty;
3.NetSellQty = daysellqty + cfsellqty;
4.ActualSellAvgPrice
if (NetSellQty != 0)
{
ActualSellAvgPrice = ((daysellamt / mult) +(upldprc * prcftr * cfsellqty)) /NetSellQty;
}
else
ActualSellAvgPrice = 0.0;
5.ActualBuyAvgPrice
if (NetBuyQty != 0)
{
ActualBuyAvgPrice = ((daybuyamt / mult) +(upldprc * prcftr * cfbuyqty)) /NetBuyQty;
}
else
ActualBuyAvgPrice = 0.0;
[Don’t use ActualSellAvgPrice and ActualBuyAvgPrice for display purpose since it used for ActualBookedPNL
calculation if required for display purpose then use below formula]
ActualSellAvgPrice = ((daysellamt / mult) +(upldprc * prcftr * cfsellqty)) /(NetSellQty*prcftr);
ActualBuyAvgPrice = ((daybuyamt / mult) +(upldprc * prcftr * cfbuyqty)) /(NetBuyQty*prcftr);]
6.ActualBookedPNL
if (netqty(in weights) > 0)
{
ActualBookedPNL = (ActualSellAvgPrice - ActualBuyAvgPrice) * NetSellQty * mult;
}
else
{
ActualBookedPNL = (ActualSellAvgPrice - ActualBuyAvgPrice) * NetBuyQty * mult;
}
7.MTM =rpnl + ActualUnrealizedMtoM
8.PnL=ActualBookedPNL + ActualUnrealizedMtoM
Response data will be in json format with below fields in case of failure:
Json Fields | Possible value | Description |
---|---|---|
stat | Not_Ok Position book request failure indication. | |
request_time | Response received time. | |
emsg | Error message |
Interop Positions Book¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
actid* | Account id of the logged in user. |
[
{
"stat": "Ok",
"daybuyqty": "15",
"daysellqty": "15",
"daybuyamt": "74550.00",
"daybuyavgprc": "4970.00",
"daysellamt": "71137.50",
"daysellavgprc": "4742.50",
"netqty": "0",
"buyavgprc": "9940.00",
"sellavgprc": "9485.00",
"rpnl": "-3412.50",
"totbuyamt": "74550.00",
"totsellamt": "71137.50",
"totbuyavgprc": "4970.00",
"totsellavgprc": "4742.50",
"actid": "J171",
"exch": "NFO",
"token": "56675",
"s_prdt_ali": "MIS",
"prd": "I",
"openbuyqty": "00",
"opensellqty": "00",
"openbuyamt": "00",
"opensellamt": "00",
"uid": "J171",
"tsym": "BANKNIFTY29MAY24C49900",
"brkname": "SKY",
"instname": "OPTIDX",
"upload_prc": "00",
"netqty": "0"
},
{
"stat": "Ok",
"daybuyqty": "10",
"daysellqty": "10",
"daybuyamt": "14725.00",
"daybuyavgprc": "1472.50",
"daysellamt": "14225.00",
"daysellavgprc": "1422.50",
"netqty": "0",
"buyavgprc": "2945.00",
"sellavgprc": "2845.00",
"rpnl": "-500.00",
"totbuyamt": "14725.00",
"totsellamt": "14225.00",
"totbuyavgprc": "1472.50",
"totsellavgprc": "1422.50",
"actid": "J171",
"exch": "NFO",
"token": "57297",
"s_prdt_ali": "NRML",
"prd": "M",
"openbuyqty": "00",
"opensellqty": "00",
"openbuyamt": "00",
"opensellamt": "00",
"uid": "J171",
"tsym": "NIFTYNXT5031MAY24C73000",
"brkname": "SKY",
"instname": "OPTIDX",
"upload_prc": "00",
"netqty": "0"
},
{
"stat": "Ok",
"daybuyqty": "01",
"daysellqty": "01",
"daybuyamt": "23147.50",
"daybuyavgprc": "23147.50",
"daysellamt": "23120.00",
"daysellavgprc": "23120.00",
"netqty": "0",
"buyavgprc": "46295.00",
"sellavgprc": "46240.00",
"rpnl": "-27.50",
"totbuyamt": "23147.50",
"totsellamt": "23120.00",
"totbuyavgprc": "23147.50",
"totsellavgprc": "23120.00",
"actid": "J171",
"exch": "NSE",
"token": "3063",
"s_prdt_ali": "CNC",
"prd": "C",
"openbuyqty": "00",
"opensellqty": "00",
"openbuyamt": "00",
"opensellamt": "00",
"uid": "J171",
"tsym": "VEDL-EQ",
"brkname": "SKY",
"instname": "EQ",
"upload_prc": "00",
"netqty": "0"
},
{
"stat": "Ok",
"daybuyqty": "01",
"daysellqty": "01",
"daybuyamt": "6467.50",
"daybuyavgprc": "6467.50",
"daysellamt": "6472.50",
"daysellavgprc": "6472.50",
"netqty": "0",
"buyavgprc": "12935.00",
"sellavgprc": "12945.00",
"rpnl": "5.00",
"totbuyamt": "6467.50",
"totsellamt": "6472.50",
"totbuyavgprc": "6467.50",
"totsellavgprc": "6472.50",
"actid": "J171",
"exch": "NSE",
"token": "4745",
"s_prdt_ali": "CNC",
"prd": "C",
"openbuyqty": "00",
"opensellqty": "00",
"openbuyamt": "00",
"opensellamt": "00",
"uid": "J171",
"tsym": "BANKINDIA-EQ",
"brkname": "SKY",
"instname": "EQ",
"upload_prc": "00",
"netqty": "0"
}
]
Response Details :
Response data will be in json format with Array of Objects with below fields in case of success.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Position book success or failure indication. |
exch | Exchange segment | |
tsym | Trading symbol / contract. | |
token | Contract token | |
uid | User Id | |
actid | Account Id | |
prd | Product name to be shown. | |
s_prdt_ali | Product display name | |
daybuyqty | Day Buy Quantity | |
daysellqty | Day Sell Quantity | |
daybuyamt | Day Buy Amount | |
daysellamt | Day Sell Amount | |
cfbuyqty | Carry Forward Buy Quantity | |
cfsellqty | Carry Forward Sell Quantity | |
cfbuyamt | Carry Forward Buy Amount | |
cfsellamt | Carry Forward Sell Amount | |
openbuyqty | Open Buy Quantity | |
opensellqty | Open Sell Quantity | |
openbuyamt | Open Buy Amount | |
opensellamt | Open Sell Amount | |
instname | Instrument Name | |
upload_prc | Upload Price | |
buyavgprc | Buy Average Price [ (daybuyamt + cfbuyamt) / (daybuyqty + cfbuyqty) ] | |
sellavgprc | Sell Average Price [ (daysellamt + cfsellamt) / (daysellqty + cfsellqty) ] | |
rpnl | Realized panel | |
netqty | Net Quantity [ daybuyqty + cfbuyqty - daysellqty - cfsellqty ] | |
totbuyamt | Total Buy Amount | |
totsellamt | Total Sell Amount | |
totbuyavgprc | Total Buy Avg Price | |
totsellavgprc | Total Sell Avg Price | |
openbuyavgprc | Open Buy Average Price | |
opensellavgprc | Open Sell Average Price | |
cfbuyavgprc | Carry Forward Buy average price | |
cfsellavgprc | Carry Forward Buy average price | |
child_orders | Array Object ,Details given below | |
netavgprc | Net Average Price | |
mult | Multiplier | |
urmtom | Unrealized mtom | |
prcftr | Price Factor | |
child_orders | Obj format |
Json Fields | Possible value | Description |
---|---|---|
exch | Exchange segment | |
token | Contract token | |
daybuyqty | Day Buy Quantity | |
daysellqty | Day Sell Quantity | |
daybuyamt | Day Buy Amount | |
daysellamt | Day Sell Amount | |
cfbuyqty | CF Buy Quantity | |
cfsellqty | CF Sell Quantity | |
cfbuyamt | CF Buy Amount | |
cfsellamt | CF Sell Amount | |
openbuyqty | Open Buy Quantity | |
opensellqty | Open Sell Quantity | |
openbuyamt | Open Buy Amount | |
opensellamt | Open Sell Amount | |
upload_prc | Upload Price | |
totbuyamt | Total Buy Amount | |
totsellamt | Total Sell Amount | |
totbuyavgprc | Total Buy Avg Price | |
totsellavgprc | Total Sell Avg Price | |
openbuyavgprc | Open Buy Average Price | |
opensellavgprc | Open Sell Average Price | |
cfbuyavgprc | Carry Forward Buy average price | |
cfsellavgprc | Carry Forward Buy average price | |
netupldprc | Net Upload Price |
Response data will be in json format with below fields in case of failure:
Json Fields | Possible value | Description |
---|---|---|
stat | Not_Ok | Interop Position book request failure indication. |
request_time | Response received time. | |
emsg | Error message |
Product Conversion¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
exch* | Exchange | |
tsym* | Unique id of contract on which order was placed. Can’t be modified,must be the same as that of original order. (use url encoding to avoid special char error for symbols like M&M) | |
qty* | Quantity to be converted. | |
uid* | User id of the logged in user. | |
actid* | Account id | |
prd* | Product to which the user wants to convert position. | |
prevprd* | Original product of the position. | |
trantype* | Transaction type | |
postype* | Day / CF | Converting Day or Carry forward position |
ordersource | WEB / MOB / API | For Logging |
Response Details :
Response data will be in json format with below fields.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Position conversion success or failure indication. |
emsg | This will be present only if Position conversion fails. |
Get Order Report¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
actid | Account Id | |
from_date | 13-06-2022 | From date [dd-mm-yyyy] |
to_date | 18-06-2022 | To date [dd-mm-yyyy] |
brkname | Login users broker ID |
Response Details :
Response data will be in json format with below fields.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Order Report success or failure indication. |
norenordno | Noren Order Number | |
kidid | Kid Id | |
status | Order status (New, Replaced, Complete, Rejected etc) | |
rpt | Report Type (fill/complete etc) | |
uid | Logged in User Id | |
actid | Account Id of logged in user | |
token | Contract token | |
cname | Company Name | |
symname | Symbol Name | |
instname | Instrument Name | |
exch | NSE, BSE, NFO ... | Exchange |
seg | Segment | |
optt | Option Type | |
isin | ISIN | |
ls | Lot Size | |
tsym | Trading symbol | |
ordersource | MOB / WEB / TT | Used to generate exchange info fields. |
trantype | Transaction type | |
prctyp | Price Type | |
ret | Order retention type (DAY, EOS, IOC,...) | |
prd | H / M / ... | Product name |
s_prdt_ali | Product display name | |
qty | Order Quantity | |
prc | Order Price | |
norentm | Noren time stamp | |
exchordid | Exchange Order Number | |
rejreason | Order rejection reason, if rejected | |
cancelqty | Canceled quantity for order which is in status cancelled. | |
brkname | Login users broker ID | |
brnchid | Branch Id | |
fillshares | Total Traded Quantity of this order | |
flprc | Fill Price | |
trgprc | Order trigger price | |
avgprc | Average trade price of total traded quantity | |
strprc | Strike Price | |
ti | Tick Size | |
prcftr_d | ((GN / GD) * (PN/PD)) (actual value for calculations) | |
tsym2 | Trading symbol of second leg | |
trantype2 | Transaction type of second leg | |
tsym3 | Trading symbol of third leg | |
trantype3 | Transaction type of third leg |
[
{
"stat":"Ok",
"norenordno":"22061700002476",
"kidid":"1",
"status":"COMPLETE",
"rpt":"Fill",
"uid":"NARESHDEL",
"actid":"NTEST2",
"token":"3435",
"cname":"NULL",
"symname":"BBOX",
"instname":"EQ",
"exch":"NSE",
"seg":"EQT",
"optt":"NULL",
"isin":"NULL",
"ls":"1",
"tsym":"BBOX-EQ",
"ordersource":"TT",
"trantype":"B",
"prctyp":"LMT",
"ret":"DAY",
"prd":"I",
"qty":"10",
"prc":"inf",
"norentm":"17:08:09 17-06-2022",
"exchordid":"81",
"rejreason":"NULL",
"cancelqty":"0",
"brkname":"KSPL",
"brnchid":"MANGALORE",
"fillshares":"10",
"flprc":"inf",
"trgprc":"-nan",
"avgprc":"inf",
"strprc":"-nan",
"ti":"inf",
"prcftr_d":"(0 / 0 ) * (0 / 0)",
"tsym2":"BBOX-EQ",
"trantype2":"NULL",
"tsym3":"BBOX-EQ",
"trantype3":"NULL"
}
]
Get Trade Report¶
Request Details :
Parameter Name | Possible value | Description |
---|---|---|
jData* | Should send json object with fields in below list | |
jKey* | Key Obtained on login success. |
Json Fields | Possible value | Description |
---|---|---|
actid | Account Id | |
from_date | 13-06-2022 | From date [dd-mm-yyyy] |
to_date | 18-06-2022 | To date [dd-mm-yyyy] |
brkname | Login users broker ID |
Response Details : Response data will be in json format with below fields.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Order Report success or failure indication. |
norenordno | Noren Order Number | |
kidid | Kid Id | |
status | Order status (New, Replaced, Complete, Rejected etc) | |
rpt | Report Type (fill/complete etc) | |
uid | Logged in User Id | |
actid | Account Id of logged in user | |
token | Contract token | |
cname | Company Name | |
symname | Symbol Name | |
instname | Instrument Name | |
exch | NSE, BSE, NFO ... | Exchange |
seg | Segment | |
optt | Option Type | |
isin | ISIN | |
ls | Lot Size | |
tsym | Trading symbol | |
ordersource | MOB / WEB / TT | Used to generate exchange info fields. |
trantype | Transaction type | |
prctyp | Price Type | |
ret | Order retention type (DAY, EOS, IOC,...) | |
prd | H / M / ... | Product name |
s_prdt_ali | Product display name | |
qty | Order Quantity | |
prc | Order Price | |
norentm | Noren time stamp | |
exchordid | Exchange Order Number | |
rejreason | Order rejection reason, if rejected | |
cancelqty | Canceled quantity for order which is in status cancelled. | |
brkname | Login users broker ID | |
brnchid | Branch Id | |
fillshares | Total Traded Quantity of this order | |
flprc | Fill Price | |
trgprc | Order trigger price | |
avgprc | Average trade price of total traded quantity | |
strprc | Strike Price | |
ti | Tick Size | |
flqty | Fill Quantity | |
prcftr_d | ((GN / GD) * (PN/PD)) (actual value for calculations) | |
tsym2 | Trading symbol of second leg | |
trantype2 | Transaction type of second leg | |
tsym3 | Trading symbol of third leg | |
trantype3 | Transaction type of third leg |
[
{
"stat":"Ok",
"norenordno":"22061700002476",
"kidid":"1",
"status":"COMPLETE",
"rpt":"Fill",
"uid":"NARESHDEL",
"actid":"NTEST2",
"token":"3435",
"cname":"NULL",
"symname":"BBOX",
"instname":"EQ",
"exch":"NSE",
"seg":"EQT",
"optt":"NULL",
"isin":"NULL",
"ls":"1",
"tsym":"BBOX-EQ",
"ordersource":"TT",
"trantype":"B",
"prctyp":"LMT",
"ret":"DAY",
"prd":"I",
"qty":"10",
"prc":"inf",
"norentm":"17:08:09 17-06-2022",
"exchordid":"81",
"rejreason":"NULL",
"cancelqty":"0",
"brkname":"KSPL",
"brnchid":"MANGALORE",
"fillshares":"10",
"flprc":"inf",
"trgprc":"-nan",
"flqty":"10",
"avgprc":"inf",
"strprc":"-nan",
"ti":"inf",
"prcftr_d":"(0 / 0 ) * (0 / 0)",
"tsym2":"BBOX-EQ",
"trantype2":"NULL",
"tsym3":"BBOX-EQ",
"trantype3":"NULL"
}
]