Skip to main content

createTradePtExactOutInstruction

Buys an exact amount of PT tokens by specifying the desired output amount. This instruction uses createTradePtExactOutInstruction with swapDirection: { buyPt: {} } to purchase a precise quantity of PT from the CLMM market, spending SY tokens as input. The caller specifies the exact PT amount to receive, and an optional maximum SY input constraint can be set for slippage protection.

Usage

Accounts

Args

Returns

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