Orders¶
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
Type | API | Details |
---|---|---|
GEt | order/execute | Place a new order |
POST | order/modify | Modify a pending order |
POST | order/cancel | Cancel a pending order |
POST | order/getmargin | get order margin |
Get | info/orderbook | Retrieve the list of all orders for the day |
Get | info/tradebook | Retrieve the list of all trades for the day |
POST | orderinfo/history | get order history |
Place Order¶
Request Structure
[
{
"exchange": "NSE",
"token": "11536",
"tradingSymbol": "TCS-EQ",
"ltp": "",
"qty": "1",
"price": "3388.80",
"product": "MIS",
"priceType": "L",
"orderType": "AMO",
"transType": "B",
"ret": "DAY",
"triggerPrice": 0,
"disclosedQty": "",
"mktProtection": "",
"target": "",
"stopLoss": "",
"trailingStopLoss": ""
}
]
Field | Type | Description |
---|---|---|
exchange | String | |
token | String | |
tradingSymbol | String | |
TCS-EQ | String | |
ltp | String | |
qty | String | |
price | String | |
product | String | |
priceType | String | |
orderType | String | |
transType | String | |
ret | String | |
triggerPrice | String | |
disclosedQty | String | |
mktProtection | String | |
target | String | |
stopLoss | String | |
trailingStopLoss | String |
Response Structure
{
"status"String | | "Ok",
"message": "Success",
"result": [
{
"requestTime": "16:25:08 31-01-2023",
"orderNo": "23013100000051"
}
]
}
Field | Type | Description |
---|---|---|
requestTime | String | |
orderNo | String |
Modify Order¶
Request Structure
{
"exchange": "MCX",
"token": "259245",
"tradingSymbol": "GOLDPETAL30NOV23",
"orderNo": "23110700391484",
"qty": "1",
"ret": "DAY",
"priceType": "L",
"product": "MIS",
"price": "5851",
"triggerPrice": "",
"disclosedQty": "0",
"mktProtection": "",
"transType": "B",
"target": "",
"stopLoss": "",
"trailingStopLoss": ""
}
Field | Type | Description |
---|---|---|
exchange | String | |
token | String | |
tradingSymbol | String | Order Type |
orderNo | String | In case of BO & CO, which leg is modified |
qty | Int | Number of shares for the order |
ret | Float | Price at which order is placed |
priceType | Int | Number of shares visible (if opting keep >30% of quantity) |
product | String | |
price | String | |
triggerPrice | String | |
disclosedQty | String | |
MktProtection | String | |
transType | String | |
target | String | |
stopLoss | String | |
trailingStopLoss | String |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"requestTime": "19:37:27 07-11-2023",
"orderNo": "23110700391484"
}
]
}
Field | Type | Description |
---|---|---|
requestTime | String | Order specific identification generated by nidhi |
orderNo | String | Last updated status of the order |
Cancel Order¶
Request Structure
Input parameters
Field | Type | Description |
---|---|---|
userId | String |
Response Structure
[
{
"status": "Ok",
"message": "Success",
"result": [
{
"requestTime": "19:38:26 07-11-2023",
"orderNo": "23110700391484"
}
]
}
]
Field | Type | Description |
---|---|---|
requestTime | String | Order specific identification generated by nidhi |
orderNo | String | Last updated status of the order |
OrderMargin¶
Request Structure
[
{
"exchange": "NSE",
"tradingSymbol": "RELIANCE-EQ",
"price": "0",
"qty": "1",
"product": "MIS",
"priceType": "MKT",
"token": "2885",
"transType": "B"
}
]
Input parameters
Field | Type | Description |
---|---|---|
exchange | String | |
tradingSymbol | String | |
price | String | |
qty | String | |
product | String | |
priceType | String | |
token | String | |
transType | String |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"marginUsed": "465.46",
"marginUsedTrade": "465.46"
}
]
}
Field | Type | Description |
---|---|---|
marginUsed | String | |
orderMargin | String |
Fetch Order Book¶
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"orderNo": "23110700140818",
"userId": "665629",
"actId": "665629",
"exchange": "NSE",
"tradingSymbol": "TCS-EQ",
"qty": "1",
"transType": "B",
"ret": "DAY",
"token": "11536",
"multiplier": "1",
"lotSize": "1",
"tickSize": "0.05",
"price": "3388.80",
"avgTradePrice": null,
"disclosedQty": null,
"product": "MIS",
"priceType": "L",
"orderType": "AMO",
"orderStatus": "REJECTED",
"fillShares": "0",
"exchUpdateTime": null,
"exchOrderId": null,
"formattedInsName": "TCS-EQ",
"ltp": null,
"rejectedReason": "ORA:AMO is stopped",
"triggerPrice": null,
"mktProtection": null,
"target": "0",
"stopLoss": "0",
"trailingPrice": null,
"orderTime": "11:36:04 07-11-2023",
"snoOrderNumber": null,
"snoFillid": null,
"rprice": null,
"rqty": null
}
]
}
Field | Type | Description |
---|---|---|
orderNo | String | |
userId | String | |
actId | String | |
exchange | String | |
tradingSymbol | String | |
CS-EQ | String | |
qty | String | |
tranType | String | |
ret | String | |
token | String | |
multiplier | String | |
lotSize | String | |
tickSize | String | |
price | String | |
avgTradePrice | String | |
disclosedQty | String | |
product | String | |
priceType | String | |
orderType | String | |
orderStatus | String | |
REJECTED | , | |
fillShares | String | |
exchUpdateTime | String | |
exchOrderId | String | |
formattedInsName | String | |
TCS-EQ | , | |
ltp | String | |
rejectedReason | String | |
ORAString | ||
triggerPrice | String | |
mktProtection | String | |
target | String | |
stopLoss | String | |
trailingPrice | String | |
orderTime | String | |
snoOrderNumber | String | |
snoFillid | String | |
rprice | String | |
rqty | String |
Fetch Trade Book¶
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"orderNo": "23012000000022",
"userId": "J111",
"actId": "J111",
"exchange": "NSE",
"priceType": "MKT",
"ret": "DAY",
"product": "C",
"fillId": "75989650",
"fillTime": "03-02-2023 09:55:32",
"tranType": "B",
"tradingSymbol": "SITINET-EQ",
"qty": "1",
"token": "13998",
"fillshares": "1",
"fillqty": "1",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"price": "0.00",
"prcftr": "1.000000",
"fillprc": "1.50",
"exchUpdateTime": "03-02-2023 09:55:32",
"exchOrderId": "1300000005328214",
"formattedInsName": "SITINET-EQ",
"ltp": null
}
]
}
Field | Type | Description |
---|---|---|
orderNo | String | |
userId | String | |
actId | String | |
exchange | String | |
priceType | String | |
ret | String | |
product | String | |
fillId | String | |
fillTime | String | |
tranType | String | |
tradingSymbol | String | |
qty | String | |
token | String | |
fillshares | String | |
fillqty | String | |
pricePrecision | String | |
lotSize | String | |
price | String | |
prcftr | String | |
fillprc | String | |
exchUpdateTime | String | |
exchOrderId | String | |
formattedInsName | String | |
ltp | String |
Order History¶
Request Structure
Input parametersField | Type | Description |
---|---|---|
orderNo | String |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"orderNo": "23110700140818",
"userId": "665629",
"actId": "665629",
"exchange": "NSE",
"tradingSymbol": "TCS-EQ",
"quantity": "1",
"transType": "B",
"priceType": "L",
"orderType": "AMO",
"ret": "DAY",
"token": "11536",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"price": "3388.80",
"avgPrice": null,
"disclosedQty": null,
"product": "MIS",
"status": "REJECTED",
"report": "Rejected",
"fillshares": "0",
"time": "11:36:04 07-11-2023",
"exchTime": null,
"remarks": null,
"exchOrderNo": null
}
]
}
Field | Type | Description |
---|---|---|
orderNo | String | |
userId | String | |
actId | String | |
exchange | String | |
tradingSymbol | String | |
quantity | String | |
priceType | String | |
orderType | String | |
ret | String | |
token | String | |
pricePrecision | String | |
lotSize | String | |
tickSize | String | |
price | String | |
avgPrice | String | |
disclosedQty | String | |
product | String | |
status | String | |
fillshares | String | |
time | String | |
exchTime | String | |
remarks | String | |
exchOrderNo | String |