close_position
Close an open position for a cryptocurrency instrument by submitting a market order. Specify the instrument ID, margin mode, and position side to complete the closure.
Instructions
Close a position for an instrument via a market order.
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>",
"marginMode": "<marginMode>",
"positionSide": "<positionSide>"
},
"name": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instId | Yes | Instrument ID, e.g. BTC-USDT | |
| marginMode | Yes | Margin mode: cross or isolated | |
| positionSide | Yes | Position side: net (One-way Mode), long or short (Hedge Mode) | |
| clientOrderId | No | Client-supplied order ID | |
| brokerId | No | Broker ID provided by BloFin |