ticker: Cryptocurrency ticker/market cap data

Description Usage Arguments Details Value See Also Examples

Description

Get cryptocurrency ticker/market cap data from a specified API.

Usage

1
ticker(crypto = NULL, convert = "USD", api = "coinmarketcap.com")

Arguments

crypto

character, integer or NULL. See details.

convert

character or NULL, conversion currency trading symbol. See details.

api

character, the API to use. Defaults to "coinmarketcap.com". See apis.

Details

The current implementation of this function offers two common APIs: coinmarketcap.com and blockchain.info. coinmarketcap.com returns ticker/market cap information for many different cryptocurrencies and their value can be expressed in any of several fiat currencies (e.g., USD) or other cryptocurrencies (e.g. BTC). blockchain.info is specific to Bitcoin. It only returns Bitcoin information, which can be expressed in any of several fiat currencies.

crypto and convert are not case sensitive to cryptocurrency ticker symbols. Both arguments are handled somewhat different for each API. For simplicity, there are available wrapper functions, cap and bcinfo, that help separate the APIs and what information you intend to obtain from each.

crypto and convert may be vectors, though of course for blockchain.info, crypto is simply ignored. For coinmarketcap.com, the default crypto = NULL will return all available cryptocurrencies tracked by coinmarketcap.com. If an integer, the top crypto cryptocurrencies by market cap are returned by the coinmarketcap.com API.

convert may be NULL. This is handled differently by each API. For coinmarketcap.com, USD is assumed in order to limit the number of API calls. For blockchain.info all available fiat currency-Bitcoin ticker pairs are returned.

Value

a data frame. Available columns depend on the selected API.

See Also

cap, bcinfo

Examples

1
2
3
4
5
6
7
## Not run: 
ticker()
ticker(crypto = 5)
ticker(crypto = c("ETH", "LTC"), convert = c("EUR", "GBP", "BTC"))
ticker(api = "blockchain.info")

## End(Not run)

leonawicz/rockchain documentation built on May 29, 2019, 3:39 a.m.