@qtsurfer/api-client
    Preparing search index...

    Function downloadTickers

    • Download one hour of tickers for an instrument as a Lastra segment Serves exactly one hour of raw ticker data for the given instrument on the requested exchange. The payload is a native Lastra file — QTSurfer's columnar format for tick-precision timeseries — with no JSON envelope.

      One segment = one hour, aligned to UTC. The hour query parameter selects the segment and must match YYYY-MM-DDTHH (no minutes/seconds, no timezone suffix). Example: hour=2026-10-15T10 is the segment h10.lastra of 2026-10-15, covering [10:00:00Z, 11:00:00Z). The hour has to be one of the last 7 days (see below): read the example as the shape of the value.

      Which hours. The last 7 days: an hour that started no more than 7 days before the request and has ended. This route gives one hour of one instrument, fast; it is not how to get older history or a range. An older hour is 400 with reason: OUTSIDE_WINDOW, and the error carries next, the POST /datasets/imports request that imports exactly that hour as a dataset (add a name); a longer span is imported the same way, within your plan's limits.

      The hour in progress and the last hours. The hour in progress, and an hour that has ended but is not stored yet, can be answered with what has been received so far, marked provisional: 200 with X-Data-Status: provisional and X-Data-Through, the instant of the last row. Not every deployment of the service gives provisional answers: where it does not, those hours are 404 with reason: NOT_YET_AVAILABLE and a Retry-After, and a client that needs them handles both. A provisional answer is not to keep: it can still grow, and the stored hour replaces it once there is one. It takes seconds to build, longer the further the hour has gone, and the service limits how many it builds at once (503 with Retry-After). When there is nothing to give, because the instrument has no rows in the hour yet or what has been received does not reach back to the start of the hour, the answer is also 404 with reason: NOT_YET_AVAILABLE.

      Timestamps. In a Lastra response the ts column holds microseconds since the epoch, declared by ts_unit: micros in the column's metadata and by the response header X-Ts-Unit: micros. In a Parquet response the timestamp column is a TIMESTAMP in milliseconds.

      A format=parquet query parameter switches the response to on-the-fly Parquet conversion via lastra-convert for clients that don't yet read Lastra. Lastra is the primary format and cheaper when the client can consume it.

      Clients:

      • lastra-java — reference Java reader/writer with per-column codecs (ALP, Gorilla, delta-varint, ZSTD) and CRC32 integrity.
      • lastra-ts — TypeScript reader (~4 kB bundle, browser + Node.js).
      • duckdb-lastra — DuckDB extension for ad-hoc SQL over Lastra files.
      • lastra-convert — CLI + Java API for converting to/from Parquet, Reef, and CSV.
      • curl -OJ for offline dumps (the Content-Disposition header sets a descriptive filename).

      Type Parameters

      • ThrowOnError extends boolean = false

      Returns RequestResult<Blob | File, ResponseError, ThrowOnError>