crypto_history: Get historic crypto currency market data

Description Usage Arguments Value Examples

Description

Scrape the crypto currency historic market tables from CoinMarketCap <https://coinmarketcap.com> and display the results in a date frame. This can be used to conduct analysis on the crypto financial markets or to attempt to predict future market movements or trends.

Usage

1
2
crypto_history(coin = NULL, limit = NULL, start_date = NULL,
  end_date = NULL, coin_list = NULL, sleep = NULL)

Arguments

coin

string Name, symbol or slug of crypto currency, default is all tokens

limit

integer Return the top n records, default is all tokens

start_date

string Start date to retrieve data from, format 'yyyymmdd'

end_date

string End date to retrieve data from, format 'yyyymmdd'

coin_list

string Valid values are 'api', 'static' or NULL

sleep

integer Seconds to sleep for between API requests

Value

Crypto currency historic OHLC market data in a dataframe:

slug

Coin url slug

symbol

Coin symbol

name

Coin name

date

Market date

ranknow

Current Rank

open

Market open

high

Market high

low

Market low

close

Market close

volume

Volume 24 hours

market

USD Market cap

close_ratio

Close rate, min-maxed with the high and low values that day

spread

Volatility premium, high minus low for that day

This is the main function of the crypto package. If you want to retrieve ALL coins then do not pass a argument to crypto_history(), or pass the coin name.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

# Retrieving market history for ALL crypto currencies
all_coins <- crypto_history(limit = 1)

# Retrieving this years market history for ALL crypto currencies
all_coins <- crypto_history(start_date = '20180101')

## End(Not run)

JesseVent/crypto documentation built on May 12, 2019, 8:40 a.m.