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 result = await client.openTrade({
  pairId: 0,
  buy: true,
  price: '65000',
  collateral: '100',
  leverage: '10',
  type: OrderType.Market,
});

Important behavior

  • pairId comes from getPairs()
  • market orders respect slippage
  • limit and stop orders do not use slippage
  • isDayTrade may be required for high leverage on some markets

Response schema

interface Response {
  txHash: `0x${string}`;
  smartAccountAddress?: `0x${string}`;
}