Reputation: 47
When you make a Quote Endpoint call from the Alpha Vantage API, for example (https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=MSFT&apikey=demo), you don't get currency with it.
How can I know which currency is being used for the price listed in the response?
Sample response:
{
"Global Quote": {
"01. symbol": "MSFT",
"02. open": "162.8235",
"03. high": "163.2200",
"04. low": "161.8250",
"05. price": "162.2000",
"06. volume": "10067390",
"07. latest trading day": "2020-01-10",
"08. previous close": "162.0900",
"09. change": "0.1100",
"10. change percent": "0.0679%"
}
}
Upvotes: 2
Views: 1532
Reputation: 113
This one has a currency field:
https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=IH2O.L&apikey=XXX
But abusing search for it does feel a little odd. Also the currency indicated in case of UK stocks is likely wrong since most UK stocks are listed in GBX (pence not pounds)...
Upvotes: 0
Reputation: 6131
Whichever exchange the company is listed on lists the price in their currency of choice. That is the currency that is returned.
For example in the API call above, the currency will be in USD since MSFT is listed on the NASDAQ (An exchange in the United States)
However, a call like for ticker BP.LON will result in the currency being in GBX since the ticker is listed on the London exchange.
https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=BP.LON&apikey=XXX
Upvotes: 1