AlphaVantage.Cryptocurrencies (Alpha Vantage v0.2.1) View Source

A set of functions for fetching cryptocurrency data from Alpha Vantage.

Link to this section Summary

Functions

Returns the real-time price of AVC with the United States Dollar (USD) as the base currency. The AVC price is streamed from the major decentralized exchange (DEX) Uniswap.

Returns the daily historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD.

Returns the realtime exchange rate for any pair of digital currency (e.g., Bitcoin) and physical currency (e.g., USD). Data returned for physical currency (Forex) pairs also include realtime bid and ask prices.

Returns intraday time series (timestamp, open, high, low, close, volume) of the cryptocurrency specified, updated realtime.

Returns the monthly historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD.

Returns the weekly historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD.

Link to this section Functions

Link to this function

alpha_vantage_coin(opts \\ [])

View Source

Specs

alpha_vantage_coin(Keyword.t()) :: AlphaVantage.Gateway.response()

Returns the real-time price of AVC with the United States Dollar (USD) as the base currency. The AVC price is streamed from the major decentralized exchange (DEX) Uniswap.

Please reference https://www.alphavantage.co/documentation/#avc-price for more detail.

Parameters

Optional (accepted as a keyword list)

  • :datatype
    • "map" returns a map (default);
    • "json" returns JSON format;
    • "csv" returns a CSV (comma separated value) file string.
Link to this function

daily(symbol, market, opts \\ [])

View Source

Specs

daily(String.t(), String.t(), Keyword.t()) :: AlphaVantage.Gateway.response()

Returns the daily historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD.

Please reference https://www.alphavantage.co/documentation/#currency-daily for more detail.

Parameters

Required

  • :symbol

    The digital/crypto currency of your choice. It can be any of the currencies in the digital currency list. For example: "BTC"

  • :market

    The exchange market of your choice. It can be any of the market in the market list. For example: "CNY"

Optional (accepted as a keyword list)

  • :datatype
    • "map" returns a map (default);
    • "json" returns JSON format;
    • "csv" returns a CSV (comma separated value) file string.
Link to this function

exchange_rate(from_currency, to_currency, opts \\ [])

View Source

Specs

exchange_rate(String.t(), String.t(), Keyword.t()) ::
  AlphaVantage.Gateway.response()

Returns the realtime exchange rate for any pair of digital currency (e.g., Bitcoin) and physical currency (e.g., USD). Data returned for physical currency (Forex) pairs also include realtime bid and ask prices.

Please reference https://www.alphavantage.co/documentation/#crypto-exchange for more detail.

Parameters

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: "USD", "EUR", or "BTC"

  • :to_currency

    The destination currency for the exchange rate. It can either be a physical currency or digital/crypto currency. For example: "USD", "EUR", or "BTC"

Optional (accepted as a keyword list)

  • :datatype

    • "map" returns a map (default);
    • "json" returns JSON format;

    *Please note that "csv" is not yet supported by Alpha Vantage for this function.

Link to this function

intraday(symbol, market, interval, opts \\ [])

View Source

Specs

intraday(String.t(), String.t(), String.t(), Keyword.t()) ::
  AlphaVantage.Gateway.response()

Returns intraday time series (timestamp, open, high, low, close, volume) of the cryptocurrency specified, updated realtime.

Please reference https://www.alphavantage.co/documentation/#crypto-intraday for more detail.

Parameters

Required

  • :symbol

    The digital/crypto currency of your choice. It can be any of the currencies in the digital currency list. For example: "BTC"

  • :market

    The exchange market of your choice. It can be any of the market in the market list. For example: "USD"

  • :interval

    Time interval between two consecutive data points in the time series. The following values are supported and accepted as strings: "1min", "5min", "15min", "30min", "60min"

Optional (accepted as a keyword list)

  • :datatype

    • "map" returns a map (default);
    • "json" returns JSON format;
    • "csv" returns a CSV (comma separated value) file string.
  • :outputsize

    • "compact" returns only the latest 100 data points in the intraday time series (default);
    • "full" returns the full-length intraday time series.

    The "compact" option is recommended if you would like to reduce the data size of each API call.

Link to this function

monthly(symbol, market, opts \\ [])

View Source

Specs

monthly(String.t(), String.t(), Keyword.t()) :: AlphaVantage.Gateway.response()

Returns the monthly historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD.

Please reference https://www.alphavantage.co/documentation/#currency-monthly for more detail.

Parameters

Required

  • :symbol

    The digital/crypto currency of your choice. It can be any of the currencies in the digital currency list. For example: "BTC"

  • :market

    The exchange market of your choice. It can be any of the market in the market list. For example: "CNY"

Optional (accepted as a keyword list)

  • :datatype
    • "map" returns a map (default);
    • "json" returns JSON format;
    • "csv" returns a CSV (comma separated value) file string.
Link to this function

weekly(symbol, market, opts \\ [])

View Source

Specs

weekly(String.t(), String.t(), Keyword.t()) :: AlphaVantage.Gateway.response()

Returns the weekly historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD.

Please reference https://www.alphavantage.co/documentation/#currency-weekly for more detail.

Parameters

Required

  • :symbol

    The digital/crypto currency of your choice. It can be any of the currencies in the digital currency list. For example: "BTC"

  • :market

    The exchange market of your choice. It can be any of the market in the market list. For example: "CNY"

Optional (accepted as a keyword list)

  • :datatype
    • "map" returns a map (default);
    • "json" returns JSON format;
    • "csv" returns a CSV (comma separated value) file string.