Query parameters reference
This page documents the parameters accepted by thequery function across all CloudQuant Data Liberator SDKs. Parameter names are consistent across languages; only the types and calling conventions differ.
At least one of the following is required for every query:
- A dataset via
nameor a rawsqlstatement. - A time anchor:
back_to,as_of,max_lookback(LKV mode), orrecord_limit(N-Query mode).
Time range parameters
For LKV mode, omit
back_to and use as_of (or the default “now”) together with max_lookback. For N-Query mode, provide either as_of (backward) or back_to (forward) along with record_limit.Date format
Datetime strings use the formatYYYY-MM-DD HH:MM:SS (the time portion is optional). When the time portion is omitted, 00:00:00 is assumed — for example, as_of: "2023-01-15" is interpreted as as_of: "2023-01-15 00:00:00". If as_of and back_to are identical, the result is a single point rather than a time series.
Dataset & symbol parameters
Custom WHERE filters
Thewhere parameter adds extra predicates on top of the time-range and symbol filters CloudQuant Data Liberator generates automatically. The value is appended as AND (<your clause>) to the internal query.
dataset column), where can filter on columns beyond symbol:
Raw SQL
Thesql parameter accepts a complete SQL SELECT and bypasses automatic query construction. Use it when you need direct control over joins, subqueries, or complex predicates.
Requirements
Parameters allowed with sql
When sql is supplied, only auth, transfer, and cache options may accompany it. Non-empty construction parameters (name, back_to, as_of, where, fields, etc.) raise an error.
Allowed alongside sql: user, system, token, compress, json_xfer, batch_size, debug_stream, force_regen, dependent_partition_name, skip_validation, skip_discovery, symbols, symbol_key_sequences, data_key_column.
Query limits & ordering
N-query mode
N-Query mode is activated by supplying a non-zerorecord_limit.
- Anchor: Backward N-Query uses
as_of(exclusive); forward N-Query usesback_to(inclusive). Exactly one anchor is required. - Per-symbol vs global: A negative
record_limitreturns up to N records per symbol; a positive value returns N records total, distributed by recency. - Compatibility: N-Query works with both single-dataset and superquery queries. When both
as_ofandback_toare set,record_limitis ignored and a standard time-range query is executed.
Superquery parameters
A superquery is triggered whenname is a list of dataset names. It merges and resamples data from multiple datasets into a single result.
Column-level aggregate aliases
Record-level aggregates (
last_timestamp, first_timestamp) apply to the entire dataset per bucket. Output columns are named {dataset}_{column}_{alias} (e.g. trades_price_o, trades_volume_s) for column-level aggregates, and {dataset}__first_timestamp / {dataset}__last_timestamp for record-level aggregates.
Dict format example:
Authentication & authorization
The
user and token parameters can be provided per-query or configured once at the SDK level:
- Python: Set via the
liberator.jsonfile in your working directory. - JavaScript: Use
liberator.set_default("query", credentials)to avoid passing them every time. - RESTful: Include in each request’s JSON body.
- Other SDKs: Loaded from
liberator.jsonin the working directory.

