Get Holdings
API to retrieve the list of mutual fund (MF) holdings for the user. The data reflects the user’s current MF portfolio and can be used to track investment performance and portfolio allocation.
Request
curl --location 'https://api.upstox.com/v2/mf/holdings' \
--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.
Responses
- 200
- 400
Response Body
{
"status": "success",
"data": [
{
"instrument_key": "INF200K01T51",
"folio": "3108290884",
"fund": "SBI SMALL CAP FUND - DIRECT PLAN - GROWTH",
"pnl": -703.68,
"quantity": 110.0,
"average_price": 181.80,
"last_price": 175.43,
"last_price_date": "2026-03-06",
"pledged_quantity": 0
},
{
"instrument_key": "INF179K01WM1",
"folio": "310829013",
"fund": "HDFC NIFTY 50 INDEX FUND - DIRECT PLAN - GROWTH",
"pnl": -46.8,
"quantity": 2.0,
"average_price": 250.0,
"last_price": 226.6,
"last_price_date": "2026-03-06",
"pledged_quantity": 0
},
{
"instrument_key": "INF204K01K15",
"folio": "3108290881",
"fund": "NIPPON INDIA SMALL CAP FUND DIRECT PLAN GROWTH PLAN GROWTH",
"pnl": 796.86,
"quantity": 11.0,
"average_price": 100.0,
"last_price": 172.45,
"last_price_date": "2026-03-06"
}
]
}
| Name | Type | Description |
|---|---|---|
| status | string | Outcome of the request. |
| data | array | Holding rows. |
| data[].instrument_key | string | Fund ISIN when available. |
| data[].folio | string | Folio number when available. |
| data[].average_price | number | Average cost per unit. |
| data[].last_price | number | Last available NAV. |
| data[].last_price_date | string | Date for which last NAV applies. |
| data[].pledged_quantity | number | Units pledged when applicable. |
| data[].fund | string | Fund display name. |
| data[].pnl | number | Unrealized profit or loss. |
| data[].quantity | number | Units held. |
Error codes
Errors follow the standard API error format. Ensure the request is authenticated and your account has access to mutual fund data.
Sample Code
Get mutual fund holdings
- Python
- Node.js
- Java
- PHP
import requests
url = 'https://api.upstox.com/v2/mf/holdings'
headers = {
'accept': 'application/json',
'Authorization': 'Bearer {your_access_token}',
}
print(requests.get(url, headers=headers).json())
const axios = require('axios');
axios.get('https://api.upstox.com/v2/mf/holdings', {
headers: {
accept: 'application/json',
Authorization: 'Bearer {your_access_token}',
},
}).then(r => console.log(r.data));
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 {
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.upstox.com/v2/mf/holdings"))
.header("accept", "application/json")
.header("Authorization", "Bearer {your_access_token}")
.GET()
.build();
System.out.println(HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString()).body());
}
}
<?php
$url = 'https://api.upstox.com/v2/mf/holdings';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'Authorization: Bearer {your_access_token}',
]);
echo curl_exec($ch);
curl_close($ch);
Loading...