平仓
build_close_position生成市价平仓交易(兼容 USDC 本位与 Meme 币本位),默认全平;传 sizeUsd 可部分平仓(按比例取回保证金)。
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": {
"account": "<account>",
"market": "<market>",
"side": "<side>",
"slippagePct": "<slippagePct>"
},
"name": "build_close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | long 做多,short 做空 | |
| agent | No | agent 专用通道:填 agent 自己的钱包地址后,交易由 agent 用自己的私钥直接签名发送,不用用户逐笔确认(用户需先用 build_agent_authorize 授权这个地址)。不填则由用户钱包签名 | |
| market | Yes | 市场:短链接 slug、市场合约地址、代币地址、代币代号,或标的代号如 BTC / ETH / XAU(表示该标的的官方市场) | |
| account | Yes | 用户钱包地址(交易的签名人和收款人) | |
| sizeUsd | No | 要平掉的仓位规模(美元名义);不填为全平 | |
| slippagePct | Yes | 滑点百分数,默认 0.3(即 0.3%) |