Skip to main content
Use closeTrade() with the pairId and idx from getOpenPositions().
await client.closeTrade({
  pairId,
  idx,
  price: '66000',
  closePercent: 100,
});
Partial close:
await client.closeTrade({
  pairId,
  idx,
  price: '66000',
  closePercent: 50,
});