Skip to content

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: /api/singleOrderList

https://connect.thefirstock.com/api/singleOrderList

Request Details

Parameter Description
userId Logged in User Id
norenordno Noren order number
jKey Key Obtained on login success.

Code

from thefirstock import thefirstock

SOH = thefirstock.firstock_SingleOrderHistory(
    norenordno='norenordno', #Replace with the norenordno
)
curl -X POST 'https://connect.thefirstock.com/api/singleOrderHistory' \
     -H 'Content-Type: application/json' \
     -d '{
           "userId": "",
           "norenordno": "",
           "jKey": ""
        }'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.singleOrderHistory({ norenordno: "" }, (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(norenordno: "");
}

}

Response Details

Parameter Description
stat Ok or Not_Ok Place order success or failure indication
exch Exchange Segment
norenordno Noren Order Number
tsym Trading symbol / contract on which order is placed.
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 / MKTPrice 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
uid
actid
amo Yes / No
pp Price precision
ti Tick size
ls Lot size
token Contract Token
orddttm
ordenttm
extm

Response data will be in json format with below fields in case of failure:

Parameter Description
stat Ok or Not_Ok Place order success or failure indication
requestTime Response received time.
emsg Error message

Sample Response

{
"stat":"Ok",
"norenordno":"22052800000038",
"uid":"PP1583",
"src_uid":"",
"actid":"PP1583",
"exch":"NSE",
"tsym":"ITC-EQ",
"qty":"10",
"trantype":"B",
"prctyp":"LMT",
"ret":"DAY",
"rejby":"SAF",
"kidid":"1",
"pan":"AOEPP5176J",
"ordersource":"API",
"token":"1660",
"pp":"2",
"ls":"1",
"ti":"0.05",
"prc":"240.00",
"dscqty":"0",
"prd":"C",
"status":"REJECTED",
"rpt":"CancelRejected",
"ordenttm":"1653848960",
"norentm":"23:59:20 29-05-2022",
"rejreason":"SAF:order is not open to cancel"},
{
"stat":"Ok",
"norenordno":"22052800000038",
"uid":"PP1583",
"src_uid":"",
"actid":"PP1583",
"exch":"NSE",
"tsym":"ITC-EQ",
"qty":"10",
"trantype":"B",
"prctyp":"LMT",
"ret":"DAY",
"rejby":"RED",
"kidid":"1",
"pan":"AOEPP5176J",
"ordersource":"API",
"token":"1660",
"pp":"2",
"ls":"1",
"ti":"0.05",
"prc":"240.00",
"dscqty":"0",
"prd":"C",
"status":"REJECTED",
"rpt":"Rejected",
"ordenttm":"1653848104",
"norentm":"23:45:04 29-05-2022",
"rejreason":"RED:RULE:{Check circuit limit including square off order}Current:INR 240.00 LowerCircuit:INR 242.30 UpperCircuit:INR 296.10:NSE.ITC-EQ for C-PP1583 [ONLINE]"},{"stat":"Ok","norenordno":"22052800000038","uid":"PP1583","src_uid":"","actid":"PP1583","exch":"NSE","tsym":"ITC-EQ","qty":"10","trantype":"B","prctyp":"LMT","ret":"DAY","rejby":"","kidid":"1","pan":"AOEPP5176J","ordersource":"API","token":"1660","pp":"2","ls":"1","ti":"0.05","prc":"240.00","dscqty":"0","prd":"C","status":"PENDING","rpt":"NewAck","ordenttm":"1653848104","norentm":"23:45:04 29-05-2022"}