Get Orderbook
Fetch orderbook data using the Blux core SDK.
The getOrderbook function returns orderbook data for a given asset pair.
The return value contains two properties:
response— the orderbook record you can use directlybuilder— exposesnext()andprev()to paginate through results
Type
export type CallBuilderOptions = {
cursor?: string;
limit?: number;
network?: string;
order?: "asc" | "desc";
};
type GetOrderbookResult = {
builder: OrderbookCallBuilder;
response: Horizon.ServerApi.OrderbookRecord;
};Usage
import { core } from "@bluxcc/core";
const result = await core.getOrderbook({});