data_pooler: Indodax Historical Data Generator

Description Value Methods Author(s)

Description

Pooling historical data from Indodax server and clean it up.

Value

Object of type data_pooler

Methods

Public methods


Method indodax_crypto_pooler()

Method to pool historical data from Indodax server

Usage
data_pooler$indodax_crypto_pooler(
  date_range,
  pair,
  resolution = c(1, 5, 15, 60, 240, "D"),
  url,
  sleep = 4,
  type = c("initial", "getter"),
  direct = FALSE
)
Arguments
date_range:

character vector of start date and end date we want to pool the data out

pair:

the pair in coin_idr format. It must be a single coin for each data.

resolution:

The time frame we are wanted to pull out. It must be a single time frame.

url:

The url to fetch data

sleep:

Since indodax only allow open API to be hit by 18 times per minute, then we need to set sleep to meet this limitation.

type:

Getter type only used when we are fixing missing data.

direct:

TRUE is only used when we are fixing missing data.

Returns

object of type data_pooler when it is initial and non direct type. A data frame when it is getter and direct type.


Method indodax_data_fixer()

Method to fix historical data fetched from Indodax server

Usage
data_pooler$indodax_data_fixer(
  asset_name,
  resolution,
  interval,
  data,
  type = "getter",
  direct = TRUE,
  ...
)
Arguments
asset_name:

the pair in coin_idr format. It must be a single coin for each data.

resolution:

The time frame we are wanted to pull out. It must be a single time frame.

type:

Getter type only used when we are fixing missing data.

direct:

TRUE is only used when we are fixing missing data.

interval:

Second unit for time frame.

data:

data that we want to be fixed

...:

Arguments to be implemented to indodax_crypto_pooler()

Returns

object of type data_pooler.


Method push_data()

Method to push our data into database

Usage
data_pooler$push_data(
  db_name,
  table_name,
  .fun,
  name_fun = deparse(substitute(.fun)),
  ...
)
Arguments
db_name:

The database name where we want to store our data.

table_name:

The table name where we want to store our data.

.fun:

It can be SQLite() or Any other database driver.

name_fun:

The name of the database driver we want to use.

...:

Additional arguments to be added to our .fun()

Returns

object of type data_pooler.


Method print()

Method to print out our data_pooler class specifically

Usage
data_pooler$print()
Returns

String to print about the object information.


Method clone()

The objects of this class are cloneable with this method.

Usage
data_pooler$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Suberlin Sinaga @2021


blakcjack/ims documentation built on Dec. 19, 2021, 9:52 a.m.