Endpoints
Get Index
GET
/
indices
/
{name}
Get Index
curl --request GET \
--url https://psxdata-api.fastapicloud.dev/indices/{name}import requests
url = "https://psxdata-api.fastapicloud.dev/indices/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://psxdata-api.fastapicloud.dev/indices/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"symbol": "<string>",
"current_index": 123,
"idx_weight": 123,
"idx_point": 123,
"market_cap_m": 123,
"freefloat_m": 123,
"shares_m": 123
}
],
"meta": {
"timestamp": "<string>",
"cached": true,
"count": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?
⌘I
Get Index
curl --request GET \
--url https://psxdata-api.fastapicloud.dev/indices/{name}import requests
url = "https://psxdata-api.fastapicloud.dev/indices/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://psxdata-api.fastapicloud.dev/indices/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"symbol": "<string>",
"current_index": 123,
"idx_weight": 123,
"idx_point": 123,
"market_cap_m": 123,
"freefloat_m": 123,
"shares_m": 123
}
],
"meta": {
"timestamp": "<string>",
"cached": true,
"count": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}