Sell / Close

This demo signs in and trades on mainnet, so it runs in your browser rather than at build time. The source below is the code it runs.

const { sell } = useCheckout()
// from a position row (client.wallets.positions):
<button onClick={() => sell(market, p.outcomeIndex, BigInt(p.shares))}>Sell</button>