Description Usage Arguments Value References See Also Examples
Get data.frame with trades of cryptocurrencies using the REST API of cryptowat.ch. The route is trades and returns trades for a specified market. See https://docs.cryptowat.ch/rest-api/markets/trades for further information.
1 2 |
pair |
A character string containing a pair symbol, e.g. btcusd (required argument). Run |
since |
An integer if datetime is |
limit |
An integer: Limit the number of trades (optional). Max: 1000. |
exchange |
A character string containing the exchange. Default is kraken. Run |
datetime |
A logical. |
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 data.frame containing trades of a given pair of currencies. If allowance is TRUE
, get_trades()
returns a list.
See https://docs.cryptowat.ch/rest-api for further information.
get_markets
, get_assets
, get_exchanges
, get_pairs
1 2 3 4 5 6 7 8 9 | ## Not run:
# Most recent trades (default is 50)
trades <- get_trades(pair)
# 200 trades (maximum is 1000) since 1589571417 (unix timestamp)
trades.unix <- get_trades(pair, since = 1589571417, limit = 200, datetime = FALSE)
# 1000 trades and datetime is TRUE
trades.datetime <- get_trades(pair, since = "2021-06-01", limit = 1000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.