> ## 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.

# getFills

> Fetch executed Ostium fills for one trader or across all traders.

```ts theme={null}
const fills = await client.getFills({ limit: 100 });
```

Filter by pair:

```ts theme={null}
const fills = await client.getFills({ pairId: 0, limit: 100 });
```

Across all traders:

```ts theme={null}
const fills = await client.getFills({ user: 'ALL', pairId: 0 });
```

## Parameters

```ts theme={null}
interface GetFillsParams {
  user?: `0x${string}` | 'ALL';
  pairId?: string | number;
  limit?: number;
}
```

On `OstiumClient`, `user` defaults to the connected trader. Pass `user: 'ALL'` to remove the trader filter.

`oid` is the on-chain keeper order id formatted as a base-10 numeric string. It uses the same id space as `Order.oid` and the value returned by `extractOrderIdFromReceipt()`.

## Response schema

```ts theme={null}
type Response = Array<{
  pairTo: string;
  pairFrom: string;
  pairId: string;
  oid: string;
  pid: string;
  trader: string;
  side: 'B' | 'S';
  action: 'Open' | 'Close' | 'Liquidation' | 'StopLoss' | 'TakeProfit' | 'RemoveCollateral' | 'CloseDayTrade';
  type: 'Market' | 'Limit' | 'REMOVE_COLLATERAL';
  px: string;
  szi: string;
  ntl: string;
  collateralUsed: string;
  builder: string;
  fees: {
    opening: string;
    rollover: string;
    liquidation: string;
    builder: string;
    priceImpact: string;
  };
  closedPnl: string;
  hash: string;
  time: number;
  timestamp: number;
}>;
```
