Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can market be crypto too? #3

Open
dorienh opened this issue Dec 20, 2020 · 0 comments
Open

Can market be crypto too? #3

dorienh opened this issue Dec 20, 2020 · 0 comments

Comments

@dorienh
Copy link

dorienh commented Dec 20, 2020

The alpha vantage documentation says that for currency exchanges both can be a crypto. However, I get an error when market is crypto:
data, meta_data = cc.get_digital_currency_daily(symbol='BTC', market='ETH')

/usr/local/lib/python3.6/dist-packages/alpha_vantage/alphavantage.py in _handle_api_call(self, url)
    335                     'Error getting data from the api, no return was given.')
    336             elif "Error Message" in json_response:
--> 337                 raise ValueError(json_response["Error Message"])
    338             elif "Information" in json_response and self.treat_info_as_error:
    339                 raise ValueError(json_response["Information"])

ValueError: Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for DIGITAL_CURRENCY_DAILY.

Documentation from https://www.alphavantage.co/documentation/:

❚ Required: function

The function of your choice. In this case, function=CURRENCY_EXCHANGE_RATE

❚ Required: from_currency

The currency you would like to get the exchange rate for. It can either be a physical currency or digital/crypto currency. For example: from_currency=USD or from_currency=BTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant