Alpha Vantage API 不适用于巴西股票

Alpha Vantage API not working for Brazilian stocks

我正在尝试使用 Alpha Vantage API 获取巴西股票价格。对于这个例子,我将讨论 PETR4。 我用过 Alpha Vantage Search Endpoint。它returns货币符号:

{ "bestMatches": [ { "1. symbol": "PETR4.SAO", ... } }

然而,TIME_SERIES_DAILY endpoint(或任何其他事实上)returns 错误:

"Error Message": "Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_DAILY."

请注意它有效 with GOOG ticker,例如。

试试这个:https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=PETR4.SA&apikey=xxx

对于来自 Alpha Vantage 的所有代码,您需要尝试 "ticker.exchange"。 PETR4 在 B3 交易所上市。

但是,Sao Paolo exchange, which had the suffix .SA. This exchange has since merged with the B3 exchange, and it's suffix has not been changed. A good reference can be seen on the yahoo finance entry of the same ticker 上列出了一些巴西股票代码。

我遇到了同样的问题。这是我通过 function=SYMBOL_SEARCHkeywords=TOTVS 时的结果,例如:

{'1. symbol': 'TOTS3.SAO', '2. name': 'TOTVS S.A',

但是,当尝试到达 function=OVERVIEW 符号 TOTS3.SAO 时,查询 returns 为空。 TOTS3TOTS.SATOTS%2ESAOTOTS%2ESATOTS\.SATOTS\.SAO

也是如此