Orders
With the order API, you can programmatically place orders in the stock market to automate your trading.You can place, modify and cancel orders using the API. You can also manage your orders and trades using the API.
Type | Endpoint | Description |
---|---|---|
POST | /order/:variety | Places order according to the order_type provided |
PATCH | /order/:variety/:order_id | Modify an existing open or pending order |
DELETE | /order/:variety/:order_id | Cancel an existing open or pending order |
GET | /order/:order_id | Retrieve the history of a given order |
GET | /user/orders | Retrieve the order book for the current trading day |
GET | /user/trades | Retrieve the list of executed trades for the current trading day |
Order Parameters
Order Parameter | Values Accepted | Description |
---|---|---|
variety | regular |
Regular order |
cover |
Cover Order | |
exchange | NSE |
NSE Equity (eg: SBIN listen on NSE) |
NFO |
NSE FnO (eg: NIFTY CE/PE) | |
BSE |
BSE Equity (eg: SBIN listed on BSE) | |
BFO |
BSE FnO (eg: SENSEX CE/PE) | |
order type | LMT |
Limit order |
MKT |
Market order | |
SL-LMT |
Stoploss Limit Order | |
SL-MKT |
Stoploss Market order | |
product | I |
Intraday Order |
C |
Delivery for Equity Market | |
M |
Normal Order for FnO | |
transation type | B |
Buy Order |
S |
Sell Order | |
validity | DAY |
Regular order |
IOC |
Immediate or Cancel | |
tags | text |
Any Text to mark your orders, this tag will be returned to you in order update. |
amo | false |
Order placed during Market hours |
true |
Order placed After Market hours |
Order Placement
The order placement API's gives the user the power to place trades for instruments programmatically.
Regular Order
The regular order API allows the user to place single trade for the user.
curl --location 'https://api.tiqs.trading/order/regular' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"exchange": "NFO",
"token": "54051",
"quantity": "15",
"disclosedQty": "0",
"product": "I",
"symbol": "BANKNIFTY2413147000CE",
"transactionType": "B",
"order": "LMT",
"price": "10",
"validity": "DAY",
"tags": "ok,ok2",
"amo": true,
"triggerPrice": "0"
}'
{
"data": {
"orderNo": "24012400000321",
"requestTime": "21:45:55 24-01-2024"
},
"status": "success"
}
Cover Order
The regular order API allows the user to place single trade for the user.
curl --location 'https://api.tiqs.trading/order/cover' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"exchange": "NFO",
"token": "54051",
"quantity": "15",
"disclosedQty": "0",
"product": "I",
"symbol": "BANKNIFTY2413147000CE",
"transactionType": "B",
"order": "LMT",
"price": "10",
"validity": "DAY",
"tags": "ok,ok2",
"amo": false,
"triggerPrice": "0",
"bookLossPrice": "10"
}'
{
"data": {
"orderNo": "24012400000321",
"requestTime": "21:45:55 24-01-2024"
},
"status": "success"
}
Order Modification
The Order Modification endpoint allows the user to modify an already OPEN order.
curl --location --request PATCH 'https://api.tiqs.trading/order/regular/24032900000003' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"exchange": "NFO",
"token": "41912",
"quantity": "15",
"disclosedQty": "0",
"product": "I",
"transactionType": "B",
"order": "LMT",
"price": "110",
"validity": "DAY",
"amo": true,
"triggerPrice": "0",
"tags": "",
"bookLossPrice": "0",
"bookProfitPrice": "0"
}'
Order Deletion
The Order Deletion endpoint allows the user to cancel an already OPEN order.
curl --location --request DELETE 'https://api.tiqs.trading/order/regular/24032900000003' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>'
{
"data": {
"message": "order cancellation request accepted"
},
"status": "success"
}
Order Details
The Order Details endpoint gives the details for a particular order placed.
curl --location 'https://api.tiqs.trading/order/24030700000042' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>'
{
"data": [
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"price": "0.00",
"quantity": "75",
"product": "I",
"orderStatus": "COMPLETE",
"reportType": "Fill",
"transactionType": "S",
"order": "MKT",
"fillShares": "75",
"averagePrice": "382.56",
"rejectReason": " ",
"exchangeOrderID": "1500000010518659",
"cancelQuantity": "",
"remarks": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"orderTime": "1709783953",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"price": "0.00",
"quantity": "75",
"product": "I",
"orderStatus": "OPEN",
"reportType": "Fill",
"transactionType": "S",
"order": "MKT",
"fillShares": "30",
"averagePrice": "382.65",
"rejectReason": " ",
"exchangeOrderID": "1500000010518659",
"cancelQuantity": "",
"remarks": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"orderTime": "1709783953",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"price": "0.00",
"quantity": "75",
"product": "I",
"orderStatus": "OPEN",
"reportType": "Fill",
"transactionType": "S",
"order": "MKT",
"fillShares": "15",
"averagePrice": "382.75",
"rejectReason": " ",
"exchangeOrderID": "1500000010518659",
"cancelQuantity": "",
"remarks": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"orderTime": "1709783953",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"price": "0.00",
"quantity": "75",
"product": "I",
"orderStatus": "OPEN",
"reportType": "New",
"transactionType": "S",
"order": "MKT",
"fillShares": "",
"averagePrice": "",
"rejectReason": " ",
"exchangeOrderID": "1500000010518659",
"cancelQuantity": "",
"remarks": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"orderTime": "1709783953",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"price": "0.00",
"quantity": "75",
"product": "I",
"orderStatus": "PENDING",
"reportType": "PendingNew",
"transactionType": "S",
"order": "MKT",
"fillShares": "",
"averagePrice": "",
"rejectReason": " ",
"exchangeOrderID": "",
"cancelQuantity": "",
"remarks": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"orderTime": "1709783953",
"exchangeUpdateTime": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"price": "0.00",
"quantity": "75",
"product": "I",
"orderStatus": "PENDING",
"reportType": "NewAck",
"transactionType": "S",
"order": "MKT",
"fillShares": "",
"averagePrice": "",
"rejectReason": " ",
"exchangeOrderID": "",
"cancelQuantity": "",
"remarks": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"orderTime": "1709783953",
"exchangeUpdateTime": "",
"requestTime": "",
"errorMessage": ""
}
],
"status": "success"
}
Order Book
The Order Book endpoint allows the user to fetch all the orders for the current trading day
curl --location 'https://api.tiqs.trading/user/orders' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>'
{
"data": [
{
"status": "Ok",
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NFO",
"symbol": "NIFTY16JAN25P23200",
"id": "25011400000974",
"rejectReason": " ",
"price": "0.00",
"quantity": "525",
"marketProtection": "0.00",
"product": "M",
"orderStatus": "COMPLETE",
"transactionType": "S",
"order": "MKT",
"fillShares": "525",
"averagePrice": "92.89",
"exchangeOrderID": "1200000068487232",
"cancelQuantity": "",
"tags": "fatafat",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "75",
"token": "52551",
"timeStamp": "10:44:54 14-01-2025",
"orderTime": "1736831694",
"exchangeUpdateTime": "14-01-2025 10:44:54",
"snoOrderDirection": "",
"snoOrderID": "",
"priceFactor": "1.000000",
"multiplier": "1",
"displayName": "",
"requiredQuantity": "525",
"requiredPrice": "92.40",
"requiredTriggerPrice": "",
"requiredBookLossPrice": "",
"requiredOriginalQuantity": "",
"requiredOriginalPrice": "",
"originalTriggerPrice": "",
"originalBookLossPrice": ""
},
{
"status": "Ok",
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NFO",
"symbol": "NIFTY16JAN25P23200",
"id": "25011400000639",
"rejectReason": " ",
"price": "0.00",
"quantity": "525",
"marketProtection": "0.00",
"product": "I",
"orderStatus": "COMPLETE",
"transactionType": "B",
"order": "MKT",
"fillShares": "525",
"averagePrice": "120.80",
"exchangeOrderID": "1200000050967126",
"cancelQuantity": "",
"tags": "fatafat",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "75",
"token": "52551",
"timeStamp": "10:16:23 14-01-2025",
"orderTime": "1736829983",
"exchangeUpdateTime": "14-01-2025 10:16:23",
"snoOrderDirection": "",
"snoOrderID": "",
"priceFactor": "1.000000",
"multiplier": "1",
"displayName": "",
"requiredQuantity": "525",
"requiredPrice": "121.40",
"requiredTriggerPrice": "",
"requiredBookLossPrice": "",
"requiredOriginalQuantity": "",
"requiredOriginalPrice": "",
"originalTriggerPrice": "",
"originalBookLossPrice": ""
},
{
"status": "Ok",
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NSE",
"symbol": "SAREGAMA-EQ",
"id": "25011400000627",
"rejectReason": " ",
"price": "0.00",
"quantity": "200",
"marketProtection": "0.00",
"product": "I",
"orderStatus": "COMPLETE",
"transactionType": "B",
"order": "MKT",
"fillShares": "200",
"averagePrice": "511.19",
"exchangeOrderID": "1300000018192130",
"cancelQuantity": "",
"tags": "",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1",
"token": "4892",
"timeStamp": "10:12:40 14-01-2025",
"orderTime": "1736829760",
"exchangeUpdateTime": "14-01-2025 10:12:40",
"snoOrderDirection": "",
"snoOrderID": "",
"priceFactor": "1.000000",
"multiplier": "1",
"displayName": "",
"requiredQuantity": "200",
"requiredPrice": "511.10",
"requiredTriggerPrice": "",
"requiredBookLossPrice": "",
"requiredOriginalQuantity": "",
"requiredOriginalPrice": "",
"originalTriggerPrice": "",
"originalBookLossPrice": ""
},
{
"status": "Ok",
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NFO",
"symbol": "NIFTY16JAN25P23200",
"id": "25011400000614",
"rejectReason": " ",
"price": "0.00",
"quantity": "525",
"marketProtection": "0.00",
"product": "I",
"orderStatus": "COMPLETE",
"transactionType": "S",
"order": "MKT",
"fillShares": "525",
"averagePrice": "115.00",
"exchangeOrderID": "1200000046212187",
"cancelQuantity": "",
"tags": "fatafat",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "75",
"token": "52551",
"timeStamp": "10:09:20 14-01-2025",
"orderTime": "1736829560",
"exchangeUpdateTime": "14-01-2025 10:09:20",
"snoOrderDirection": "",
"snoOrderID": "",
"priceFactor": "1.000000",
"multiplier": "1",
"displayName": "",
"requiredQuantity": "525",
"requiredPrice": "115.00",
"requiredTriggerPrice": "",
"requiredBookLossPrice": "",
"requiredOriginalQuantity": "",
"requiredOriginalPrice": "",
"originalTriggerPrice": "",
"originalBookLossPrice": ""
},
{
"status": "Ok",
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NFO",
"symbol": "NIFTY16JAN25P23200",
"id": "25011400000547",
"rejectReason": " ",
"price": "0.00",
"quantity": "525",
"marketProtection": "0.00",
"product": "I",
"orderStatus": "COMPLETE",
"transactionType": "B",
"order": "MKT",
"fillShares": "525",
"averagePrice": "119.00",
"exchangeOrderID": "1200000045419433",
"cancelQuantity": "",
"tags": "fatafat",
"disclosedQuantity": "0",
"orderTriggerPrice": "",
"retention": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "75",
"token": "52551",
"timeStamp": "10:08:04 14-01-2025",
"orderTime": "1736829484",
"exchangeUpdateTime": "14-01-2025 10:08:04",
"snoOrderDirection": "",
"snoOrderID": "",
"priceFactor": "1.000000",
"multiplier": "1",
"displayName": "",
"requiredQuantity": "525",
"requiredPrice": "118.70",
"requiredTriggerPrice": "",
"requiredBookLossPrice": "",
"requiredOriginalQuantity": "",
"requiredOriginalPrice": "",
"originalTriggerPrice": "",
"originalBookLossPrice": ""
}
],
"status": "success"
}
Trade Book
The Trade Book endpoint list all of the trades that took place for the current trading day
curl --location 'https://api.tiqs.trading/user/trades' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>'
{
"data": [
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C49000",
"id": "24030700000195",
"quantity": "75",
"product": "I",
"transactionType": "S",
"order": "MKT",
"fillShares": "75",
"averagePrice": "57.60",
"exchangeOrderID": "1500000067142704",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 10:45:00",
"fillID": "431466313",
"fillPrice": "57.60",
"fillQuantity": "60",
"orderSource": "",
"token": "42037",
"timeStamp": "10:45:00 07-03-2024",
"exchangeUpdateTime": "07-03-2024 10:45:00",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C49000",
"id": "24030700000195",
"quantity": "75",
"product": "I",
"transactionType": "S",
"order": "MKT",
"fillShares": "15",
"averagePrice": "57.60",
"exchangeOrderID": "1500000067142704",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 10:45:00",
"fillID": "431466312",
"fillPrice": "57.60",
"fillQuantity": "15",
"orderSource": "",
"token": "42037",
"timeStamp": "10:45:00 07-03-2024",
"exchangeUpdateTime": "07-03-2024 10:45:00",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000194",
"quantity": "75",
"product": "I",
"transactionType": "B",
"order": "MKT",
"fillShares": "75",
"averagePrice": "317.90",
"exchangeOrderID": "1500000067058440",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 10:44:57",
"fillID": "431463744",
"fillPrice": "317.90",
"fillQuantity": "75",
"orderSource": "",
"token": "41927",
"timeStamp": "10:44:57 07-03-2024",
"exchangeUpdateTime": "07-03-2024 10:44:57",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"quantity": "75",
"product": "I",
"transactionType": "S",
"order": "MKT",
"fillShares": "75",
"averagePrice": "382.56",
"exchangeOrderID": "1500000010518659",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 09:29:13",
"fillID": "430367637",
"fillPrice": "382.50",
"fillQuantity": "45",
"orderSource": "",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"quantity": "75",
"product": "I",
"transactionType": "S",
"order": "MKT",
"fillShares": "30",
"averagePrice": "382.65",
"exchangeOrderID": "1500000010518659",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 09:29:13",
"fillID": "430367636",
"fillPrice": "382.55",
"fillQuantity": "15",
"orderSource": "",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C48000",
"id": "24030700000042",
"quantity": "75",
"product": "I",
"transactionType": "S",
"order": "MKT",
"fillShares": "15",
"averagePrice": "382.75",
"exchangeOrderID": "1500000010518659",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 09:29:13",
"fillID": "430367635",
"fillPrice": "382.75",
"fillQuantity": "15",
"orderSource": "",
"token": "41927",
"timeStamp": "09:29:13 07-03-2024",
"exchangeUpdateTime": "07-03-2024 09:29:13",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
},
{
"status": "Ok",
"userID": "AJ0101",
"accountID": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C49000",
"id": "24030700000041",
"quantity": "75",
"product": "I",
"transactionType": "B",
"order": "MKT",
"fillShares": "75",
"averagePrice": "81.70",
"exchangeOrderID": "1500000010460262",
"remarks": "",
"retention": "DAY",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "15",
"customFirm": "",
"fillTime": "07-03-2024 09:29:08",
"fillID": "430366559",
"fillPrice": "81.70",
"fillQuantity": "75",
"orderSource": "",
"token": "42037",
"timeStamp": "09:29:08 07-03-2024",
"exchangeUpdateTime": "07-03-2024 09:29:08",
"snoOrderDirection": "",
"snoOrderID": "",
"requestTime": "",
"errorMessage": ""
}
],
"status": "success"
}