Single Order History
Successful placement of an order via the API does not imply its successful execution. To know the true status of a placed order, you should retrieve the particular order's current status using its order_id.
POST: /apiV2/singleOrderList
https://connect.thefirstock.com/apiV2/singleOrderHistory
Request Details
Parameter | Description |
---|---|
userId | Logged in User Id |
orderNumber | orderNumber of the order placed |
jKey | Key Obtained on login success. |
Code
curl -X POST 'https://connect.thefirstock.com/apiV2/singleOrderHistory' \
-H 'Content-Type: application/json' \
-d '{
"userId": "",
"orderNumber": "",
"jKey": ""
}'
from thefirstock import thefirstock
SOH = thefirstock.firstock_SingleOrderHistory(
orderNumber='',
)
const Firstock = require('thefirstock');
const firstock = new Firstock();
firstock.singleOrderHistory({ orderNumber: "" }, (err, result) => {
console.log("Error, ", err)
console.log("Result: ", result)
})
using thefirstock;
class Program
{
public static void Main()
{
Firstock firstock = new Firstock();
var result = firstock.singleOrderHistory(orderNumber: "");
}
}
Response Details
Parameter | Description |
---|---|
data.exchange | Exchange Segment |
data.orderNumber | orderNumber of the order placed |
data.userId | userId provided by the firstock |
data.tradingSymbol | Trading symbol / contract on which order is placed. |
data.price | Order Price |
data.quantity | Order Quantity |
data.product | Display product alias name, using prarr returned in user details. |
data.status | Order status |
data.transactionType | B/S Transaction type of the order |
data.priceType | LMT / MKTPrice type |
data.fillshares | Total Traded Quantity of this order |
data.averagePrice | Average trade price of total traded quantity |
data.rejectReason | If order is rejected, reason in text form |
data.exchangeOrderNumber | Exchange Order Number |
data.cancelQuantity | Canceled quantity for order which is in status cancelled. |
data.remarks | Any message Entered during order entry |
data.disclosedQuantity | Order disclosed quantity. |
data.triggerPrice | Order trigger price |
data.retention | DAY / IOC / EOS |
data.pricePrecision | Price precision |
data.tickSize | Tick size |
data.lotSize | Lot size |
data.token | Contract Token |
data.exchangeTime | exchangeTime |
data.cancelQuantity | quantity cancelled |
Response data will be in json format with below fields in case of failure:
Parameter | Description |
---|---|
Status | Failed |
requestTime | Response received time. |
data | Type of error |
Sample Response
{
"Status": "Success",
"data": [
{
"orderNumber": "",
"userId": "",
"exchange": "NSE",
"tradingSymbol": "ITC-EQ",
"quantity": "1",
"price": "0.00",
"product": "I",
"status": "COMPLETE",
"reportType": "ReplaceRejected",
"transactionType": "S",
"priceType": "MKT",
"fillshares": "1",
"averagePrice": "328.40",
"rejectReason": "SAF:order is not open to modify",
"exchangeOrderNumber": "",
"retention": "DAY",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"token": "1660",
"norentm": "13:43:42 11-10-2022",
"remarks": "Test",
"exchangeTime": "11-10-2022 13:42:29",
"disclosedQuantity": "0"
},
{
"orderNumber": "",
"userId": "",
"exchange": "NSE",
"tradingSymbol": "ITC-EQ",
"quantity": "1",
"price": "0.00",
"product": "I",
"status": "COMPLETE",
"reportType": "ReplaceRejected",
"transactionType": "S",
"priceType": "MKT",
"fillshares": "1",
"averagePrice": "328.40",
"rejectReason": "SAF:order is not open to modify",
"exchangeOrderNumber": "",
"retention": "DAY",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"token": "1660",
"norentm": "13:43:36 11-10-2022",
"remarks": "Test",
"exchangeTime": "11-10-2022 13:42:29",
"disclosedQuantity": "0"
}
]
}
{
"Status": "Failed",
"data": "",
"requestTime": ""
}