链上兑换
platform_dex_swap【持仓与执行】链上 DEX 兑换(写操作,需确认,动用真实资金):钱包地址自动取本人智能账户,不接受任意地址;大额授权需 approvalToken(由平台签发)。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"toToken": "<toToken>",
"amount": "<amount>"
},
"name": "platform_dex_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | 链短名,如 ETH / BSC / BASE / SOL(必填) | |
| amount | Yes | 卖出数量(最小单位字符串,必填) | |
| toToken | Yes | 买入代币(地址或符号,必填) | |
| slippage | No | 滑点百分比(可选,默认 1) | |
| amountUsd | No | 本次金额 USD 估值(可选,用于大额授权校验) | |
| fromToken | No | 卖出代币(地址或符号;原生币可留空) | |
| reference | No | 幂等参考号(可选) | |
| approvalToken | No | 大额授权确认 token(可选,平台签发) |