class quotek::data::record

Record is a container class specially crafted to store asset values data.

Public Functions


record constructor

record(long timestamp, float value, float spread)

record constructor 2


record destructor

std::string str(const bool add_timestamps)

str takes the data inside the record object and transforms it to a json-formated string.

the content of the record, formatted as a JSON string.
  • add_timestamps -

    if true, record timestamp will be added to the string.

Eigen::VectorXd to_vector(const bool add_timestamps)

Translates record to Eigen::VectorXd (dvector) type. Translates record to Eigen VectorXd

the record translated as Eigen::VectorXd (dvector)
  • add_timestamps -

    tells if timestamps must be added to vector or not.

Public Members

long timestamp

stores the epoch timestamp at which the asset was worth value.

float value

the value of the asset at time timestamp.

float spread

the spread offered by the broker for the asset at time timestamp.