Order Book
The record of all orders is retained for a single day. Use the Order Book API to view orders for the current day.
Sample code¶
import requests
url = "https://easeapi.venturasecurities.com/trade/v1/orders"
payload = {}
headers = {
'x-client-id': 'AA0605',
'x-app-key': '8ab5rt7yp2lm9qw4s1ex',
'authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/trade/v1/orders',
headers: {
'x-client-id': 'AA0605',
'x-app-key': '8ab5rt7yp2lm9qw4s1ex',
'authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response¶
{
"result": [
{
"type": "Stock",
"symbol": "RELIANCE",
"token": "500325",
"last_traded_price": 1228.0,
"exchange": "BSE",
"segment": "E",
"order_id": "1157250219100",
"action": "BUY",
"product_type": "C",
"order_type": 2,
"average_traded_price": 0.0,
"trigger_price": 0.0,
"status": "Pending",
"total_quantity": 1,
"pending_quantity": 1,
"executed_quantity": 0,
"price": 1200.0,
"order_date_time": "19-Feb-2025T11:29:31",
"reason": "",
"disclosed_quantity_remaining": 0,
"validity": 0,
"lot_size": 1
}
],
"error_message": ""
}
Response parameters¶
Parameter |
Description |
|---|---|
type |
It specifies the type of the instrument. (Eg: "Stock" is for equity and "NFO" is for derivatives) |
symbol |
It is the name of the instrument |
token |
Unique token number assigned to each tradable instrument |
last_traded_price |
Last traded price of the instrument |
exchange |
Specifies the exchange where the instrument is traded, either in NSE (National Stock Exchange) or BSE (Bombay Stock Exchange) |
segment |
Indicates whether it's an equity ("E") or derivatives ("D") segment |
order_id |
It is the order number |
action |
Indicates whether it's a 'BUY' or 'SELL' action |
product_type |
Specifies the product type, such as intraday ("I"), margin ("M"), MTF ("F"), Cash and Carry ("C") |
order_type |
Specifies the order type, such as "1" for market, "2" for limit, "3" for stop-loss and "4" for stop-loss market |
average_traded_price |
It is the average price of the order when multiple quantities are executed at different prices |
trigger_price |
Relevant only for stop-loss orders. The order gets placed in the market when it gets achieved or attained. |
status |
Indicates the current status of the order. The exact status strings and their meanings are listed in the table below. The reason for the status will be provided in the reason parameter. |
total_quantity |
The total quantity of number of shares for equity or lots (F&O contracts) you want to buy/sell |
pending_quantity |
It is the pending quantity when the order is partially executed |
executed_quantity |
It is the executed quantity of the order |
price |
Indicates the limit price of the order |
order_date_time |
Indicates the timestamp of the order |
reason |
It is the rejection message if the order is rejected; empty if the order is successful. |
disclosed_quantity_remaining |
Indicates the remaining quantity of disclosed quantity |
validity |
Specifies how long the order remains valid - either "0" for Intraday (DAY), "3" for Instant or Cancel (IOC), "1" for Good till Cancel, "6" for Good till Date, or "8" for EOS |
lot_size |
Indicates the lot size of the instrument |
Status values¶
The status parameter can return any of the following exact string values:
Status |
Meaning / Category |
|---|---|
Executed |
Fully filled / executed |
Partially exec. |
Partially filled |
Rejected |
Rejected (no fill) |
Cancelled |
Cancelled (no fill) |
Pending |
Order accepted, awaiting fill |
Triggered |
Stop-loss/trigger order fired, entering fill flow |