Endpoints
Get Quote
GET
/
stocks
/
{symbol}
/
quote
Get Quote
curl --request GET \
--url https://psxdata-api.fastapicloud.dev/stocks/{symbol}/quoteimport requests
url = "https://psxdata-api.fastapicloud.dev/stocks/{symbol}/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://psxdata-api.fastapicloud.dev/stocks/{symbol}/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"symbol": "<string>",
"price": 123,
"market_cap": 123,
"pe_ratio": 123,
"dividend_yield": 123,
"free_float": 123,
"volume_avg_30d": 123,
"change_1y_pct": 123,
"ldcp": 123,
"change": 123,
"change_pct": 123
},
"meta": {
"timestamp": "<string>",
"cached": true
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?
⌘I
Get Quote
curl --request GET \
--url https://psxdata-api.fastapicloud.dev/stocks/{symbol}/quoteimport requests
url = "https://psxdata-api.fastapicloud.dev/stocks/{symbol}/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://psxdata-api.fastapicloud.dev/stocks/{symbol}/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"symbol": "<string>",
"price": 123,
"market_cap": 123,
"pe_ratio": 123,
"dividend_yield": 123,
"free_float": 123,
"volume_avg_30d": 123,
"change_1y_pct": 123,
"ldcp": 123,
"change": 123,
"change_pct": 123
},
"meta": {
"timestamp": "<string>",
"cached": true
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}