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.

await client.closeTrade({
  pairId,
  idx,
  price: '66000',
  closePercent: 100,
});
For a partial close:
await client.closeTrade({
  pairId,
  idx,
  price: '66000',
  closePercent: 50,
});

Response schema

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