ixWrapperRemoveOffer instruction removes an existing order from the Exponent orderbook.
Usage
Required Parameters
| Parameter | Type | Description |
|---|---|---|
trader | PublicKey | The trader’s wallet public key |
offerIdx | number | The index of the offer to remove |
mintSy | PublicKey | The SY token mint address |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
ptSrc | PublicKey | PT token source account |
ytSrc | PublicKey | YT token source account |
sySrc | PublicKey | SY token source account |
tokenBaseTrader | PublicKey | Base token account for the trader |
Returns
Returns aTransactionInstruction that removes the specified order from the orderbook.
Removing an order automatically stages any accrued YT interest before returning tokens to your escrow. Collect staged interest separately via ixWrapperCollectInterest.
Finding the Offer Index
UsegetUserOpenOrders to get the list of open orders and their indices: