Learn R Programming

cryptotrackr (version 1.3.3)

coinmarketcap_api_call: coinmarketcap_api_call

Description

coinmarketcap_api_call

Usage

coinmarketcap_api_call(
  url,
  api_key,
  method,
  query = NULL,
  timeout_seconds = 60
)

Value

returns data from your CoinMarketCap API call

Arguments

url

the url for your CoinMarketCap API call

api_key

your CoinMarketCap API key

method

"GET" or "POST"

query

your query parameters. The default value is NULL.

timeout_seconds

seconds until the query times out. Default is 60.

Examples

Run this code
if (FALSE) {
url <- "https://pro-api.coinmarketcap.com/v1/cryptocurrency/map"
api_key <- "..."
query_string <- list(
  listing_status = "active",
  start = "1",
  limit = NULL,
  sort = "id",
  symbol = NULL,
  aux = "platform,first_historical_data,last_historical_data,is_active,status"
)
data <- coinmarketcap_api_call(url, api_key, 'GET', query = query_string)}

Run the code above in your browser using DataLab