Skip to main content
getBuilderOrders(builder, params?) returns builder-tagged orders plus related sibling orders for the same positions.
const orders = await client.getBuilderOrders('0xBuilderAddress', {
  start: 1765411200,
  end: 1765497599,
  pairIds: [0, 1],
  limit: 100,
});

How it works

The subgraph stores builder on open orders. The SDK first fetches orders tagged with the builder address, then fetches sibling close, take-profit, and stop-loss orders matched by pid. limit caps the first builder-tagged phase only. Sibling orders from the second phase are appended without a cap, so the final array can contain more than limit rows.

Parameters

type GetBuilderOrdersParams = Omit<
  GetOrdersParams,
  'builder' | 'orderIds' | 'initiatedTxHashes'
>;
Supported filters:
ParameterTypeDescription
userAddress | 'ALL'Scope to one trader or all traders.
isPendingbooleanFilter by pending status.
isCanceledbooleanFilter by cancelled status.
isCancelledbooleanAlias for isCanceled.
pairIdsArray<string | number>Filter by pair ids.
startnumberInclusive lower bound on execution time, as Unix seconds UTC.
endnumberInclusive upper bound on execution time, as Unix seconds UTC.
limitnumberCap for the first builder-tagged query. Defaults to 100.

Response schema

Same Order[] schema as getOrders.