Get Order Bookโ
API to retrieve a paginated list of mutual fund orders for the user. The response can be filtered by order status and transaction type, with pagination managed through the page_number and records parameters.
Requestโ
curl --location 'https://api.upstox.com/v2/mf/orders?page_number=1&records=10' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'
Additional samples in various languages are available in the Sample Code section on this page.
Query Parametersโ
| Name | Required | Type | Description |
|---|---|---|---|
| status | false | string | Filter by order status: ALL, ARCHIVED, NEW, PENDING, OPEN, INPROCESS, COMPLETED, PLACED, REJECTED, CREATED, PAYMENT_PENDING, FAILED, CANCELLED, or VERIFIED. Default: ALL. |
| transaction_type | false | string | Filter by transaction type: BUY, SELL, or ALL. Default: ALL. |
| page_number | false | integer | Page number, starting from 1. Default: 1 |
| records | false | integer | Records per page. Default: 10, Max: 30. |
Responses
- 200
- 400
Response Bodyโ
{
"status": "success",
"data": [
{
"instrument_key": "INF109K01Q49",
"status": "INPROCESS",
"status_message": "",
"folio": "",
"fund": "ICICI Prudential Liquid Fund Direct Plan Growth",
"amount": 1000.0,
"quantity": 0.0,
"price": 0.0,
"order_id": "ABC123-a9b52e90-3de6-4674-84b9-e3bcced7ec30",
"exchange_order_id": "254657127",
"order_timestamp": "2026-03-12 15:17:42",
"exchange_timestamp": null,
"transaction_type": "BUY",
"last_price": 0.0,
"average_price": 0.0,
"settlement_id": "254657127",
"variety": "REGULAR",
"purchase_type": "FRESH",
"last_price_date": "2026-03-06"
},
{
"instrument_key": "INF277K01YE6",
"status": "OPEN",
"status_message": null,
"folio": "",
"fund": "Tata Liquid Fund Direct Plan Growth",
"amount": 500.0,
"quantity": 0.0,
"price": 0.0,
"order_id": "ABC123-1dcb96f2-e5d1-49c1-a03b-151c066365c2",
"exchange_order_id": "254657127",
"order_timestamp": "2026-03-12 00:00:00",
"exchange_timestamp": null,
"transaction_type": "BUY",
"last_price": 0.0,
"average_price": 0.0,
"settlement_id": "254657127",
"variety": "REGULAR",
"purchase_type": "FRESH",
"last_price_date": "2026-03-06"
},
{
"instrument_key": "INF204K01K15",
"status": "COMPLETED",
"status_message": null,
"folio": "131082908",
"fund": "Nippon India Small Cap Fund - Direct Plan - Growth Plan",
"amount": 1000.0,
"quantity": 10.0,
"price": 100.0,
"order_id": "ABC123-5c17d81a-24b9-4ec0-8a71-77fc0572030c",
"exchange_order_id": "254657127",
"order_timestamp": "2026-03-06 13:28:26",
"exchange_timestamp": null,
"transaction_type": "BUY",
"last_price": 100.0,
"average_price": 100.0,
"settlement_id": "254657127",
"variety": "REGULAR",
"purchase_type": "FRESH",
"last_price_date": "2026-03-06"
}
],
"meta_data": {
"page": {
"page_number": 1,
"total_pages": 1,
"records": 10,
"total_records": 3
}
}
}
| Name | Type | Description |
|---|---|---|
| status | string | Outcome of the request. Typically success or error. |
| data | array | List of mutual fund order rows. |
| data[].order_id | string | Unique order identifier. |
| data[].exchange_order_id | string | Exchange order id when available. |
| data[].instrument_key | string | Fund ISIN when available. |
| data[].status | string | Current order status. |
| data[].status_message | string | Human-readable status or rejection reason. |
| data[].folio | string | Folio when allotted. |
| data[].fund | string | Fund or scheme display name. |
| data[].order_timestamp | string | When the order was registered in format: YYYY-MM-DD HH:mm:ss. |
| data[].exchange_timestamp | string | Exchange date when available in format: YYYY-MM-DD HH:mm:ss. |
| data[].settlement_id | string | Settlement id when available. |
| data[].transaction_type | string | BUY or SELL. |
| data[].amount | number | Order amount. |
| data[].variety | string | Order variety either REGULAR or SIP. |
| data[].purchase_type | string | FRESH or ADDITIONAL for buys when applicable. (null incase of SELL order) |
| data[].quantity | number | Units allotted or sold. |
| data[].price | number | Price or NAV used when available. |
| data[].last_price | number | Last known NAV. |
| data[].average_price | number | Allotted or sold NAV. |
| data[].last_price_date | string | Date for last NAV when available in format: YYYY-MM-DD. |
| meta_data | object | Pagination wrapper. |
| meta_data.page | object | Page metadata. |
| meta_data.page.page_number | integer | Current page. |
| meta_data.page.total_pages | integer | Total pages. |
| meta_data.page.records | integer | Page size used. |
| meta_data.page.total_records | integer | Total rows across pages. |
Error codesโ
| Error code | Description |
|---|---|
| UDAPI1173 | Page records exceeds limit โ records must not exceed 30. |
| UDAPI1174 | Page number must be greater than or equal to 1 โ page_number must be at least 1. |
| UDAPI1196 | Records must be greater than or equal to 1 โ records must be at least 1. |
| UDAPI1197 | Invalid mutual fund order status โ The provided status value is not a valid order status. |
Sample Codeโ
Get mutual fund ordersโ
- Python
- Node.js
- Java
- PHP
import requests
url = 'https://api.upstox.com/v2/mf/orders'
params = {
'page_number': 1,
'records': 10,
}
headers = {
'accept': 'application/json',
'Authorization': 'Bearer {your_access_token}',
}
try:
response = requests.get(url, params=params, headers=headers)
print('Response Code:', response.status_code)
print('Response Body:', response.json())
except Exception as e:
print('Error:', str(e))
const axios = require('axios');
const url = 'https://api.upstox.com/v2/mf/orders';
const params = {
page_number: 1,
records: 10,
};
const headers = {
accept: 'application/json',
Authorization: 'Bearer {your_access_token}',
};
axios.get(url, { headers, params })
.then(response => console.log('Response:', response.data))
.catch(error => console.error('Error:', error.message));
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = "https://api.upstox.com/v2/mf/orders";
String query = "&page_number=1&records=10";
String url = base + "?" + query;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("accept", "application/json")
.header("Authorization", "Bearer {your_access_token}")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
<?php
$url = 'https://api.upstox.com/v2/mf/orders?' . http_build_query([
'page_number' => 1,
'records' => 10,
]);
$headers = [
'accept: application/json',
'Authorization: Bearer {your_access_token}',
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Loading...