get_kucoin_prices: Get historical data from specified symbols

Description Usage Arguments Details Value Examples

View source: R/market-data.R

Description

Get historical data from specified symbols

Usage

1

Arguments

symbols

A character vector of one or more pair symbol.

from

A character with valid date/datetime format, or date/datetime object as a start of datetime range.

to

A character with valid date/datetime format, or date/datetime object as an end of datetime range.

frequency

A character vector of one which specify the frequency option, see details for further information.

Details

There are several supported frequencies:

Value

A tibble containing prices data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# import library
library(rucoin)

# get one pair of symbol prices
prices <- get_kucoin_prices(
  symbols = "KCS/USDT",
  from = "2019-06-01 00:00:00",
  to = "2019-06-02 00:00:00",
  frequency = "1 hour"
)

# quick check
prices

# get multiple pair of symbols prices
prices <- get_kucoin_prices(
  symbols = c("KCS/USDT", "BTC/USDT", "KCS/BTC"),
  from = "2019-06-01 00:00:00",
  to = "2019-06-02 00:00:00",
  frequency = "1 hour"
)

# quick check
prices

bagasbgy/rucoin documentation built on Jan. 1, 2020, 8:34 p.m.