Description Usage Arguments Value References See Also Examples
Get prices of cryptocurrencies using the REST API of cryptowat.ch.
1 2 |
route |
A character string containing a market endpoint. Possible values: price, prices, trades, summary, summaries, orderbook, orderbook/liquidity, orderbooks/calculator, ohlc (required argument). See https://docs.cryptowat.ch/rest-api/markets for further information. |
pair |
A character string containing a pair symbol, e.g. btcusd (optional argument). Run |
exchange |
A character string containing the exchange (optional argument). Run |
params |
A list containing query parameters. E.g., for the route ohlc, this is |
api_key |
A character string containing the API key. See https://docs.cryptowat.ch/rest-api/rate-limit to learn how to create an account and how to generate an API key. |
allowance |
A logical (default is |
A list containing markets data.
See https://docs.cryptowat.ch/rest-api for further information
markets
, get_assets
, get_exchanges
, get_pairs
1 2 3 4 5 6 7 8 | ## Not run:
# Prices of Bitcoin in USD for all periods
btcusd.ohlc.all <- get_markets(route = "ohlc", pair = "btcusd", exchange = "kraken")
# Hourly prices of Bitcoin in USD for a specific time period
btcusd.ohlc.hourly <- get_markets(route = "ohlc", pair = "btcusd", exchange = "kraken",
list(periods = 3600, before = 1609851600, after = 1609506000))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.