BluxBlux

Get Trade Aggregation

Fetch trade aggregation data using the Blux core SDK.

The getTradeAggregation function returns aggregated trade data for a given asset pair and time range.

The return value contains two properties:

  • response — the records you can use directly
  • builder — exposes next() and prev() to paginate through results

Type

export type CallBuilderOptions = {
  cursor?: string;
  limit?: number;
  network?: string;
  order?: "asc" | "desc";
};

Usage

import { core } from "@bluxcc/core";

const result = await core.getTradeAggregation(
  [
    base: Asset,
    counter: Asset,
    start_time: number,
    end_time: number,
    resolution: number,
    offset: number,
  ],
  options,
);

On this page