Skip to main content

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.

const fills = await client.getFillsByTime({
  startTime: Date.now() - 7 * 24 * 60 * 60 * 1000,
  endTime: Date.now(),
});
This method supports the same user and pair filters as getFills().

Response schema

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