API reference for GET /order
API key for authentication. Contact [email protected] to obtain an API key.
Base58-encoded address of the swapper's wallet. If specified, the response will include a transaction allowing the user to submit the order.
Base58-encoded input mint address
Base58-encoded output mint address
Input amount as a scaled integer. For example, 1 SOL is 1000000000.
x >= 0Max allowed slippage for the swap. Default is "auto". Allowed values are:
x >= 0If true or unspecified, per-leg slippage checks are enabled. If false, per-leg slippage checks are disabled.
Max allowed slippage for prediction market orders. Allowed values are:
If specified as a u16:
slippage_bpsIf unspecified or "auto":
This will be the slippage value included in the created Prediction Order. This parameter is not used in routing, but only affects the minimum amount of Outcome mint that a prediction order must produce to fill successfully. Slippage tolerance specified in basis points
x >= 0Comma-separated list of DEXes to include. If not specified, all DEXes will be included.
Comma-separated list of DEXes to exclude. If not specified, all DEXes will be included.
If true, only use single-leg routes
If specified, the route will be limited to the specified number of legs. Ignored if
only_direct_routes is true.
x >= 0If true, only use JIT routes. Every leg in the route will use the JIT router.
If true, only use routes that are compatible with Jito bundles. This should only be specified as true if the swap will be executed in a Jito bundle. Default is false.
If true, allow synchronous execution. Default is true.
If true, allow asynchronous execution. Default is true.
If true, enforces that the input mint must be the revert mint for orders that use asynchronous execution. Default is false.
Optional platform fee mode. If not specified, the default is outputMint. For async
prediction market swaps, this is ignored, and the platform fee is paid in the stablecoin
mint.
outputMint, inputMint Optional platform fee in basis points. This should only be nonzero if the swap will collect the platform fee. The fee account must be able to collect the fee mint at execution time.
x >= 0Optional platform fee scale for async prediction market swaps, with 3 decimals. This should only be nonzero if the swap will collect the platform fee. The fee account must be able to collect the fee mint at fill time. Must be between >= 0 and < 1000. For example, a value of 50 means 0.050.
x >= 0Base58-encoded address of the token account that will receive the platform fee if a platform fee applies to the swap. If specified, this account's mint must match the fee mint for the swap. This must be specified if the platform fee is nonzero.
Base58-encoded address of the referral account associated with the fee account.
If the fee account isn't a referral token account derived from the seeds
["referral_ata", referral_account, mint] and the Referral program ID
REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3, this should be unspecified. If specified, the
the open transaction will create the fee_account if it doesn't already exist.
The user pays for the creation of the fee account. Ignored if fee_account is unspecified.
Base58-encoded address of the token account that will receive the positive slippage fee.
This must be a token account for the output mint, regardless of the platform fee mode. If at
swap execution time this account can't receive the positive slippage fee, then the positive
slippage fee transfer is skipped. If the platform fee mode is outputMint and the platform
fee account is specified, then this must be unspecified (in which case the platform fee
account will be used) or match the platform fee account. Otherwise, this must be specified.
Limit on the positive slippage fee in percent. The positive slippage fee is limited to the lesser of (1) the excess actual out amount above the quoted amount and (2) this percentage of the actual out amount after platform fee.
x >= 0Base58-encoded address of the sponsor's wallet. If specified, the sponsor will pay the transaction fee and for token account creation, and both the user and the sponsor must sign the swap transaction. This can be used to implement gasless swaps.
Cannot be specified alongside predictionMarketInitPayer parameter.
Base58-encoded address of the account that will receive the output token. This is either the
address of the destination token account, or, if the output is native SOL, the address of
the destination wallet. If both destinationTokenAccount and destinationWallet are
unspecified, the user's associated token account for the output mint will be used if the
output isn't native SOL, and the user's wallet will be used if the output is native SOL.
If the output isn't native SOL, the specified account must exist before the swap executes,
or else the swap will fail.
Mutually exclusive with destinationWallet.
Base58-encoded address of the wallet that will receive the output token. Mutually exclusive
with destinationTokenAccount. If specified:
Base58-encoded address of the wallet that will receive the revert mint if the order is an asynchronous order and it reverts.
If false, the order will use wrapped SOL
Prioritization fee in lamports. Mutually exclusive with computeUnitPriceMicroLamports.
If both prioritizationFeeLamports and computeUnitPriceMicroLamports are unspecified, the
default of prioritizationFeeLamports="auto" will be used.
Allowed values are:
auto, medium, high, veryHigh, disabled Maximum lamports to cap the prioritization fee determined by the server
x >= 0Compute unit price in micro-lamports. Mutually exclusive with prioritizationFeeLamports.
x >= 0If true, the server will simulate the transaction to determine its compute unit limit. If unspecified or false, the transaction will use the default compute unit limit.
If specified, the transaction will include a Jito sandwich mitigation account in the swap instruction. Allowed values are:
true - uses the default Jito sandwich mitigation accountfalse - does not include the accountIf unspecified, the account is not included. See https://docs.jito.wtf/lowlatencytxnsend/#sandwich-mitigation for more details.
Base58-encoded address of the account that will pay for market initialization if the market
is uninitialized. If specified and the market is uninitialized, this account must sign the
transaction, and the transaction will initialize the market if it is uninitialized at
execution time. If this account differs from userPublicKey, the transaction will have
two signers.
Cannot be specified alongside sponsor parameter.
Base58-encoded address of the account that will receive the rent from closing the outcome token account if it is empty after sale/redemption. If unspecified, the user's public key will be used.
Order response
Slot at which the request was evaluated
x >= 0Order execution mode
sync, async Maximum input amount as a scaled integer. For example, 1 SOL is 1000000000.
Base58-encoded input mint address
Same as other_amount_threshold
Minimum output amount after all fees as a scaled integer. If the swap transaction doesn't produce at least this amount of the output token, the transaction will fail.
Expected output amount after all fees as a scaled integer. For example, 1 SOL is 1000000000.
Base58-encoded output mint address
Price impact of the swap. This is an estimate of the percentage difference between the expected price for the swap and the price for the same swap with the smallest input amount possible. For example, "0.01" means 1% price impact.
Max allowed slippage % in basis points
x >= 0Compute unit limit assigned to the transaction. Specified if and only if the request included the user's public key.
x >= 0Cost in lamports to initialize a prediction market. Specified if and only if the transaction will initialize the prediction market.
x >= 0The last block height at which the blockhash assigned to the transaction is valid. Useful to determine whether the transaction has expired. Specified if and only if the request included the user's public key.
x >= 0Platform fee that was applied to the quote, if any
Whether the predictionMarketInitPayer must sign the transaction. Specified if and only if
the request included predictionMarketInitPayer and the market is uninitialized.
Max allowed slippage for prediction market orders in basis points. Only specified for prediction market orders.
x >= 0Prioritization fee in lamports. Specified if and only if the request included the user's public key.
x >= 0Prioritization fee type for the transaction. Specified if and only if the request included the user's public key.
Base58-encoded mint address of the token that will be returned to the user if the order is an asynchronous order and the order reverts after it is successfully opened. Specified if and only if the order is an asynchronous order.
Route that the swap will take. Specified if and only if the route plan is known at order opening time. This will be specified for all synchronous orders.
Base64-encoded transaction. The user must sign before sending it to Solana. Specified if and only if the request included the user's public key.