Dex
DEX - 路由
计算代币兑换的最佳路由,考虑价格影响和费用。返回最优路径和准备好的交易
POST
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
支持网络中列出的区块链名称
Available options:
sol
, base
Body
application/json
交易的 DEX 标识符
Available options:
raydium
, meteora
, pumpfun
, moonshot
, jupiter
Example:
"raydium"
发起交易的钱包公钥
Required string length:
8 - 64
Example:
"HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"
兑换数量。使用 "auto" 表示全部余额或百分比如 "50%"
Example:
"1000000000"
兑换方向模式
Available options:
ExactIn
, ExactOut
Example:
"ExactIn"
滑点容忍百分比
Required range:
0 <= x <= 100
Example:
5
优先费用,以 SOL 增加交易处理速度
Example:
"0.000001"
输入 Mint,基础代币地址
Required string length:
8 - 64
Example:
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Ouput Mint,报价代币地址
Required string length:
8 - 64
Example:
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
Response
200 - application/json
原始兑换请求参数
Base64 编码的交易
Example:
"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
详细路由信息
Example:
{
"inAmount": "1000000000",
"outAmount": "985000000",
"priceImpact": "0.15",
"route": ["USDC", "SOL"]
}
请求处理时间(毫秒)
Example:
245
此页面对您有帮助吗?