get_price_conversion | R Documentation |
Convert an amount of one cryptocurrency or fiat currency into one or more different currencies utilizing the latest market rate for each currency. You may optionally pass a historical timestamp as time to convert values based on historical rates (as your API plan supports).
get_price_conversion(amount = NULL, id, symbol, time, convert, convert_id)
amount |
An amount of currency to convert. Example: 10.43 |
id |
The CoinMarketCap currency ID of the base cryptocurrency or fiat to convert from.
If |
symbol |
Alternatively the currency symbol of the base cryptocurrency or fiat to convert from.
One |
time |
Optional timestamp to reference historical pricing during conversion. If not passed, the current time will be used. If passed, we'll reference the closest historic values available for this conversion. |
convert |
Pass up to 120 comma-separated fiat or cryptocurrency symbols to convert the source amount to. Default is 'USD'. |
convert_id |
Optionally calculate market quotes by CoinMarketCap ID instead of symbol. This option is identical to convert outside of ID format. Ex: convert_id=1,2781 would replace convert=BTC,USD in your query. This parameter cannot be used when convert is used. |
Cache / Update frequency:Every 60 seconds for the lastest cryptocurrency and fiat currency rates. Plan credit use: 1 call credit per call and 1 call credit per convert option beyond the first. CMC equivalent pages: Our cryptocurrency conversion page at converter.
A dataframe with price conversion information
## Not run: get_price_conversion(1) get_price_conversion(amount = 1, symbol = "BTC", convert = c("EUR","LTC","USD")) get_price_conversion(amount = 1, id=1, time = Sys.Date()-100) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.