跳转到主要内容
GET
Swap Quote

查询参数

inputMint
string
必填

Input token mint address.

示例:

"So11111111111111111111111111111111111111112"

outputMint
string
必填

Output token mint address.

示例:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

amount
string
必填

Raw amount to swap before decimals are applied, as an unsigned integer string.

Pattern: ^\d+$
示例:

"1000000"

slippageBps
integer

Slippage threshold in basis points.

必填范围: x >= 0
示例:

50

swapMode
enum<string>

Use ExactIn for fixed input amount or ExactOut for fixed output amount.

可用选项:
ExactIn,
ExactOut
示例:

"ExactIn"

dexes
string

Optional comma-separated list of DEX labels to include.

示例:

"Raydium,Orca+V2"

excludeDexes
string

Optional comma-separated list of DEX labels to exclude.

示例:

"Meteora+DLMM"

restrictIntermediateTokens
boolean

Restrict intermediate tokens to a more stable set.

示例:

true

onlyDirectRoutes
boolean

Limit routing to a single hop.

示例:

false

asLegacyTransaction
boolean

Request a legacy transaction-compatible route.

示例:

false

platformFeeBps
integer

Optional platform fee in basis points.

必填范围: x >= 0
示例:

20

maxAccounts
integer

Approximate maximum account budget for the route.

必填范围: x >= 0
示例:

64

instructionVersion
enum<string>

Instruction format to target.

可用选项:
V1,
V2
示例:

"V1"

dynamicSlippage
boolean

Keep for compatibility with upstream quote parameters.

示例:

false

forJitoBundle
boolean

Exclude routes that are incompatible with Jito bundles.

示例:

false

supportDynamicIntermediateTokens
boolean

Allow dynamic selection of intermediate tokens.

示例:

false

响应

Swap quote

inputMint
string
必填
inAmount
string
必填
outputMint
string
必填
outAmount
string
必填
otherAmountThreshold
string
必填
swapMode
enum<string>
必填
可用选项:
ExactIn,
ExactOut
slippageBps
integer
必填
必填范围: x >= 0
priceImpactPct
string
必填
routePlan
object[]
必填
instructionVersion
enum<string> | null
可用选项:
V1,
V2,
null
platformFee
object | null
contextSlot
integer
必填范围: x >= 0
timeTaken
number