Amount of fromMint
to swap in exchange for toMint
.
True if all new open orders accounts should be automatically closed. Currently disabled.
Market client for the first leg of the swap. Can be given to prevent the client from making unnecessary network requests. It's recommended to use this in most cases. If not given, then swaps across a USD(x) quoted market.
Token mint to swap from.
Open orders account for the first leg of the swap. Can be given to prevent the client from making unnecessary network requests. It's recommended to use this in most cases.
Wallet for fromMint
. If not provided, uses an associated token address
for the configured provider.
The minimum rate used to calculate the number of tokens one should receive for the swap. This is a safety mechanism to prevent one from performing an unexpecteed trade.
RPC options. If not given the options on the program's provider are used.
Wallet of the quote currency to use in a transitive swap. Should be either a USDC or USDT wallet. If not provided uses an associated token address for the configured provider.
Token account to receive the Serum referral fee. The mint must be in the quote currency of the trade (USDC or USDT).
Market client for the second leg of the swap. Can be given to prevent the client from making unnecessary network requests. It's recommended to use this in most cases. If not given, then swaps across a USD(x) quoted market.
Token mint to swap to.
Open orders account for the second leg of the swap. Can be given to prevent the client from making unnecessary network requests. It's recommended to use this in most cases.
Wallet for toMint
. If not provided, uses the associated token address
for the configured provider.
Generated using TypeDoc
Parameters to perform a swap.