JavaScript: Queries & Working with Large Datasets

The Liberator service can often return very large result sets, often measured as millions of rows. These queries may take a long time to run. Every dataset has different data frequencies. We suggest using short time frames for limited symbols until you become familiar with the datasets, some of our datasets are very large indeed and thus an over-extended request may result in an extremely large amount of data returned.

💡 Best Practice: Consider running a point-in-time query for one symbol to get an idea of how large your dataset is prior to running other queries.

In the vast majority of cases, dataset queries are either for a point in time query or for a time series.

As such, you should aim to become as familiar as you can with these queries early on in your use of the API.

Point-In-Time Queries

To specify a point in time query, do not provide a “back_to” parameter.

Time Series Queries

To specify a time series query, add a “back_to” parameter to your query.

This back_to should be a timestamp that is prior to your “as_of” parameter.

The “as_of” parameter defaults to now.

Parameters

Argument

Description

Type

symbols

The security trading symbol(s) you wish to query

String, or List

name

The name of the dataset (required)

String

as _of

The date in time that you wish the data to be. as_of defaults to now. This value can be any past date so that you can see the data as it was known on the “as of” date.

String

Format YYYY-MM-DD HH:MM:SS

(HH:MM:SS is optional)

back_to

The date where the return dataset should begin. This is reading all the data “back to” the specified date.

String

Format YYYY-MM-DD HH:MM:SS

(HH:MM:SS is optional)

system

The name of the authorized system that you are querying from. The security mechanism in liberator authorized users for individual systems.

String

This is almost always “API”

crux_key

if querying for a Crux data set

string

compress

The data compression method on the wire. CloudQuant uses compression.

String. Always compressed_transfer

json_xfer

Json transfer. This is usually False

Boolean. Always False

user

The user identifier (as assigned by CloudQuant)

String

token

The user’s assigned token

String