const ix = pool.swap(user, { isX: true, // true = sell token X for Y, false = sell Y for X amountIn: 1_000_000n, minOut: 0n, feeRecipient: feePk,});
Param
Type
Description
user
PublicKey
The user’s wallet
params.isX
boolean
Direction: true = X→Y, false = Y→X
params.amountIn
bigint
Input amount in token atoms
params.minOut
bigint
Minimum output (slippage protection)
params.feeRecipient
PublicKey
Address to receive fees
params.expiration?
number
Optional slot expiration
Hadron does not currently support custom matching across multiple propAMMs for the same asset natively. For multi-prop matching, please use one of our supported aggregators or reach out to us to discuss more.