Learn R Programming

yfscreen (version 0.1.1)

get_data: Get Data from the Yahoo Finance API

Description

A function to get data from the Yahoo Finance API using the specified payload.

Usage

get_data(payload = NULL)

Value

A data frame that contains data from the Yahoo Finance API for the specified search criteria.

Arguments

payload

list. Payload that contains search criteria created using the create_query and create_payload functions.

Examples

Run this code
filters <- list(
  list("eq", list("region", "us")),
  list("btwn", list("intradaymarketcap", 2000000000, 10000000000)),
  list("btwn", list("intradaymarketcap", 10000000000, 100000000000)),
  list("gt", list("intradaymarketcap", 100000000000)),
  list("gt", list("dayvolume", 5000000))
)

query <- create_query(filters)

payload <- create_payload("equity", query)

data <- get_data(payload)

Run the code above in your browser using DataLab