getPairs() to fetch the market catalog.
Why it matters
pairIdis used across reads and management flowspairIdforopenTrade()is sourced from this list- leverage and overnight limits determine whether
isDayTradeis needed
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use getPairs to discover available Ostium markets, prices, leverage limits, and market state.
getPairs() to fetch the market catalog.
const { pairs } = await client.getPairs();
for (const pair of pairs) {
console.log(
pair.pairId,
`${pair.pairFrom}/${pair.pairTo}`,
pair.maxLeverage,
pair.overnightMaxLeverage,
pair.midPx,
pair.isMarketOpen,
);
}
pairId is used across reads and management flowspairId for openTrade() is sourced from this listisDayTrade is needed