BluxBlux

Get Offers

Fetch a paginated list of Stellar offers using the Blux core SDK.

The getOffers function returns a paginated list of Stellar offers.

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";
};

type GetOffersOptions = CallBuilderOptions & {
  forAccount?: string;
  buying?: Asset;
  selling?: Asset;
  sponsor?: string;
  seller?: string;
};

type GetOffersResult = {
  builder: OfferCallBuilder;
  response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OfferRecord>;
};

Usage

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

const result = await core.getOffers({});

On this page