Title: | Client for the 'currencyapi.com' Currency Conversion API |
---|---|
Description: | An R client for the 'currencyapi.com' currency conversion API. The API requires registration of an API key. Basic features are free, some require a paid subscription. You can find the full API documentation at <https://currencyapi.com/docs> . |
Authors: | Dominik Kukacka [aut, cre] |
Maintainer: | Dominik Kukacka <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-02-04 04:39:53 UTC |
Source: | https://github.com/cran/currencyapi |
Convert a value to a specific range of other currencies from the Currencyapi.com API. Retrieve the latest exchange rate data or for a specific historic date.
convert_exchange_rates( value, date = NULL, base_currency = NULL, currencies = NULL )
convert_exchange_rates( value, date = NULL, base_currency = NULL, currencies = NULL )
value |
(required) The value you want to convert |
date |
Date to retrieve historical rates from (format: 2021-12-31) |
base_currency |
The base currency for the conversion (e.g., "USD") |
currencies |
A list of comma seperated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown |
Returns calculated values for today or any given date for all or a specific set of currencies.
currencyapi.com requires authentication via an API key. For this package, the API key is saved as a
environmental variable. In interactive mode, using currencyapi_api_key
will require you to enter an API key. Alternatively, you can also use
Sys.setenv(CURRENCYAPI_API_KEY = <key>)
to set the API key manually.
currencyapi_api_key(force = FALSE)
currencyapi_api_key(force = FALSE)
force |
If |
Returns the set API key that has been stored as an enviroment variable.
Get the current status of the API.
get_api_status()
get_api_status()
Returns your current quota. Requests to this endpoint do not count against your quota or rate limit.
Get historical exchange rates for a specific date for a single or multiple currencies.
get_date_range_historical_exchange_rates( datetime_start, datetime_end, accuracy = NULL, base_currency = NULL, currencies = NULL )
get_date_range_historical_exchange_rates( datetime_start, datetime_end, accuracy = NULL, base_currency = NULL, currencies = NULL )
datetime_start |
(required) Datetime for the start of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime) |
datetime_end |
(required) Datetime for the end of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime) |
accuracy |
The accuracy you want to receive; Possible Values: day, hour, quarter_hour, minute; Default: day For valid time ranges see below |
base_currency |
The base currency for the conversion (e.g., "USD") |
currencies |
A list of comma seperated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown |
Returns exchange rates for a given time range. Generally, we provide data going back to 1999.
Get historical exchange rates for a specific date for a single or multiple currencies.
get_historical_exchange_rates(date, base_currency = NULL, currencies = NULL)
get_historical_exchange_rates(date, base_currency = NULL, currencies = NULL)
date |
(required) Date to retrieve historical rates from (format: 2021-12-31) |
base_currency |
The base currency for the conversion (e.g., "USD") |
currencies |
A list of comma seperated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown |
Returns exchange rates for a given time range. Generally, we provide data going back to 1999.
Get exchange rate from the Currencyapi.com API
get_latest_exchange_rates(base_currency = NULL)
get_latest_exchange_rates(base_currency = NULL)
base_currency |
The base currency for the conversion (e.g., "USD") |
Returns the latest currency exchange rates.
Get the current status of the API.
get_supported_currencies(currencies = NULL)
get_supported_currencies(currencies = NULL)
currencies |
(required) A list of comma seperated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown |
Returns all our supported currencies.