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.
Poll by transaction hash
const orders = await client.getOrders({
initiatedTxHashes: [txHash],
});
Query by order id
const orders = await client.getOrders({ orderIds: [123] });
Without filters, the method returns recent orders for the connected trader.
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;
initiatedTx: string;
initiatedTime: number;
isPending: boolean;
isCancelled: boolean;
cancelReason?: string;
}>;