Create a dataset by importing history instead of uploading it
A second way to get data into a dataset, alongside POST /datasets: instead of PUTting a
file yourself, ask the API to go fetch history on your behalf. Creates the dataset and
starts the fetch in the same call — there is no separate upload step, and the result lands
as a dataset version indistinguishable from an uploaded one once it's ready. Poll
GET /datasets/{datasetId}/imports/{importId} for progress.
type selects the source. dex — history over a pool/pair's own on-chain market — is the
only value today; other source types join this same endpoint later.
A dex import has two data shapes, chosen by the top-level cadence:
Omitted/blank (default) — on-chain swap history, replayed directly from the pool/pair's
own chain. Cadence is native, not resampled: each swap keeps the timestamp it happened
at rather than being bucketed into candles, so the resulting version's cadence is rt
unless the swaps happen to sit on a fixed grid (see DatasetVersion.cadence).
One of 1s / 1m / 5m — pre-aggregated candles at that width instead of raw trades.
The resulting dataset's type is klines, not ticker. Not every network supports every
cadence yet — an unsupported combination fails asynchronously, same as an unresolvable
pool (see the failed status on the poll endpoint below).
Create a dataset by importing history instead of uploading it A second way to get data into a dataset, alongside
POST /datasets: instead ofPUTting a file yourself, ask the API to go fetch history on your behalf. Creates the dataset and starts the fetch in the same call — there is no separate upload step, and the result lands as a dataset version indistinguishable from an uploaded one once it's ready. PollGET /datasets/{datasetId}/imports/{importId}for progress.typeselects the source.dex— history over a pool/pair's own on-chain market — is the only value today; other source types join this same endpoint later.A
deximport has two data shapes, chosen by the top-levelcadence:cadenceisrtunless the swaps happen to sit on a fixed grid (seeDatasetVersion.cadence).1s/1m/5m— pre-aggregated candles at that width instead of raw trades. The resulting dataset'stypeisklines, notticker. Not every network supports every cadence yet — an unsupported combination fails asynchronously, same as an unresolvable pool (see thefailedstatus on the poll endpoint below).