v3
latestOpenAPI 3.0.02026-07-311784111.3 MBTrading
Matching Engine
Private
Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one.
You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.
Scope: trade:read_write
get/private/close_position
Query parameters
instrument_namestring required
Unique instrument identifier
Example:BTC-PERPETUAL
Instrument name
type'limit' | 'market' required
The order type
pricenumber
Optional price for limit order.
Response
Success response
Example response
{
"result": {
"order": {
"order_id": "ETH-100234",
"starbase_order_id": 103148386170,
"instrument_name": "BTC-PERPETUAL",
"creation_timestamp": 1536569522277,
"last_update_timestamp": 1536569522277,
"starbase_last_update_timestamp": 1536569522277000000,
"block_trade": true,
"trigger_order_id": "SLIB-370",
"combo_order_id": "103148386169",
"app_name": "Example Application",
"mmp_cancelled": true,
"oto_order_ids": [
"ETH-100234"
],
"primary_order_id": "ETH-100234"
},
"trades": [
{
"instrument_name": "BTC-PERPETUAL",
"timestamp": 1517329113791,
"block_trade_id": "154"
}
]
}
}