Get Competitors
API to retrieve the list of competitor companies for a company identified by its ISIN. The response contains an array of competitor profiles, each including the company's ISIN, a brief description, sector, and sector market capitalisation in INR and USD.
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
| isin | true | string | International Securities Identification Number (ISIN) of the company. Example: INE002A01018. |
Request
curl --location 'https://api.upstox.com/v2/fundamentals/INE002A01018/competitors' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'
For additional samples in various languages, please refer to the Sample code section on this page.
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": [
{
"instrument_key": "NSE_EQ|INE242A01010",
"company_profile": "Indian Oil Corporation Limited is an India-based oil company. The Company's segments include Petroleum Products, Petrochemicals, Gas, and Other Business Activities. Its business interests span the entire hydrocarbon value-chain, ranging from refining, pipeline transportation and marketing to exploration and production of petrochemicals, natural gas and alternative energy.",
"sector": "Refineries",
"sector_market_cap_inr": {
"value": 204334.32,
"unit": "crore",
"formatted": "204,334.32 Cr"
},
"sector_market_cap_usd": {
"value": 22.7,
"unit": "billion",
"formatted": "$22.70B"
}
},
{
"instrument_key": "NSE_EQ|INE029A01011",
"company_profile": "Bharat Petroleum Corporation Limited is an India-based company, which is engaged in the refining of crude oil and marketing of petroleum products. Its segments include Downstream Petroleum and Exploration & Production of Hydrocarbons.",
"sector": "Refineries",
"sector_market_cap_inr": {
"value": 131391.64,
"unit": "crore",
"formatted": "131,391.64 Cr"
},
"sector_market_cap_usd": {
"value": 14.6,
"unit": "billion",
"formatted": "$14.60B"
}
}
]
}
| Name | Type | Description |
|---|---|---|
| status | string | A string indicating the outcome of the request. Possible values: success, error. |
| data | array | List of competitor company profiles. |
| data[].instrument_key | string | Instrument key of the competitor in the format EXCHANGE\|ISIN, e.g., NSE_EQ\|INE242A01010. |
| data[].company_profile | string | Brief description of the competitor company's business. |
| data[].sector | string | Sector to which the competitor belongs. |
| data[].sector_market_cap_inr | object | Market capitalisation of the competitor's sector in Indian Rupees. |
| data[].sector_market_cap_inr.value | number | Numeric market cap value in Crore. |
| data[].sector_market_cap_inr.unit | string | Unit of the value. Value: crore. |
| data[].sector_market_cap_inr.formatted | string | Human-readable formatted value, e.g., "131,391.64 Cr". |
| data[].sector_market_cap_usd | object | Market capitalisation of the competitor's sector in US Dollars. |
| data[].sector_market_cap_usd.value | number | Numeric market cap value in the specified unit. |
| data[].sector_market_cap_usd.unit | string | Unit of the value. Possible values: billion, million. |
| data[].sector_market_cap_usd.formatted | string | Human-readable formatted value, e.g., "$14.60B". |
Error codes
| Error code | Description |
|---|---|
| UDAPI1206 | Invalid ISIN - The provided ISIN is invalid. |
Sample Code
- Python
- Node.js
- Java
- PHP
import requests
url = 'https://api.upstox.com/v2/fundamentals/INE002A01018/competitors'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {your_access_token}'
}
response = requests.get(url, headers=headers)
print(response.json())
const axios = require('axios');
axios.get('https://api.upstox.com/v2/fundamentals/INE002A01018/competitors', {
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer {your_access_token}'
}
}).then(response => console.log(response.data))
.catch(error => console.error('Error:', error));
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class GetCompetitors {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI("https://api.upstox.com/v2/fundamentals/INE002A01018/competitors"))
.header("Accept", "application/json")
.header("Authorization", "Bearer {your_access_token}")
.GET()
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = 'https://api.upstox.com/v2/fundamentals/INE002A01018/competitors';
$headers = [
'Accept: application/json',
'Authorization: Bearer {your_access_token}'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_errno($ch) ? print('Error: ' . curl_error($ch)) : print($response);
curl_close($ch);
?>
Loading...