> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ostium.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getBuilderOrders

> Fetch orders routed through a builder, including sibling close, TP, and SL orders on the same positions.

`getBuilderOrders(builder, params?)` returns builder-tagged orders plus related sibling orders for the same positions.

```ts theme={null}
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

```ts theme={null}
type GetBuilderOrdersParams = Omit<
  GetOrdersParams,
  'builder' | 'orderIds' | 'initiatedTxHashes'
>;
```

Supported filters:

| Parameter     | Type                      | Description                                                   |
| ------------- | ------------------------- | ------------------------------------------------------------- |
| `user`        | `Address \| 'ALL'`        | Scope to one trader or all traders.                           |
| `isPending`   | `boolean`                 | Filter by pending status.                                     |
| `isCanceled`  | `boolean`                 | Filter by cancelled status.                                   |
| `isCancelled` | `boolean`                 | Alias for `isCanceled`.                                       |
| `pairIds`     | `Array<string \| number>` | Filter by pair ids.                                           |
| `start`       | `number`                  | Inclusive lower bound on execution time, as Unix seconds UTC. |
| `end`         | `number`                  | Inclusive upper bound on execution time, as Unix seconds UTC. |
| `limit`       | `number`                  | Cap for the first builder-tagged query. Defaults to `100`.    |

## Response schema

Same `Order[]` schema as [getOrders](/developer/reference/get-orders).
