okx_close_position
Close a trading position on OKX exchange. Specify the product ID, margin mode, and position side to execute the close.
Instructions
[L:WRITE] CAT:[交易] | → 请先调用 agent_catalog
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": {
"instId": "<instId>"
},
"name": "okx_close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ccy | No | 保证金币种(全仓可选填) | |
| instId | Yes | 产品ID,如 BTC-USDT-SWAP。必填 | |
| mgnMode | No | 保证金模式 | |
| posSide | No | 持仓方向。long=平多头, short=平空头。全仓必填 |