Skip to main content

createTradePtExactOutInstruction

Sells PT tokens to receive an exact amount of SY tokens. This instruction uses createTradePtExactOutInstruction with swapDirection: { sellPt: {} } to sell PT on the CLMM market and receive a precise quantity of SY. The caller specifies the exact SY amount to receive, and an optional maximum PT input constraint can be set for slippage protection.

Usage

Accounts

Args

Returns

TransactionInstruction — a transaction instruction ready to be added to a transaction.