Skip to main content

Close SmartTrade at market price

POST
/v2/smart_trades/:id/close_by_market
Permission: SMART_TRADES_WRITE
Security: SIGNED

Cancels an existing SmartTrade in place using its ID.


Path Parameter

idintegerrequired

Unique 3Commas ID for this SmartTrade entity.

Example Request

POST
/v2/smart_trades/12345678/close_by_market

Response Parameter

If successful, the response includes an updated copy of the SmartTrade entity.

Example Responses

{
"id": 12345678,
"version": 2,
"account": {
"id": 32402783,
"type": "binance_us",
"name": "My Binance US",
"market": "Binance US Spot",
"link": "/accounts/32402783"
},
"pair": "USDT_1INCH",
"instant": false,
"status": {
"type": "panic_sell_pending",
"basic_type": "panic_sell_pending",
"title": "Closing at Market Price"
},
"leverage": {
"enabled": false
},
"position": {
"type": "sell",
"editable": false,
"units": {
"value": "7.8",
"editable": false
},
"price": {
"value": "0.2534",
"value_without_commission": "0.255",
"editable": false
},
"total": {
"value": "1.977066"
},
"order_type": "conditional",
"conditional": {
"editable": false,
"price": {
"value": "0.255",
"type": "bid"
},
"order_type": "limit",
"trailing": {
"enabled": false,
"percent": null
}
},
"status": {
"type": "finished",
"basic_type": "finished",
"title": "Finished"
}
},
"take_profit": {
"enabled": false,
"price_type": "value",
"steps": []
},
"stop_loss": {
"enabled": false
},
"reduce_funds": {
"steps": []
},
"market_close": {},
"note": "",
"note_raw": null,
"skip_enter_step": false,
"data": {
"editable": false,
"current_price": {
"day_change_percent": "-0.72",
"bid": "0.2582",
"ask": "0.264",
"last": "0.2621",
"quote_volume": "1550.73315"
},
"target_price_type": "price",
"orderbook_price_currency": "USDT",
"base_order_finished": true,
"missing_funds_to_close": "0.0",
"liquidation_price": null,
"average_enter_price": "0.2534",
"average_close_price": null,
"average_enter_price_without_commission": "0.255",
"average_close_price_without_commission": null,
"panic_sell_available": false,
"add_funds_available": false,
"reduce_funds_available": false,
"force_start_available": false,
"force_process_available": true,
"cancel_available": false,
"finished": false,
"base_position_step_finished": true,
"entered_amount": "7.8",
"entered_total": "1.977066",
"closed_amount": "0.0",
"closed_total": "0.0",
"commission": 0.001,
"created_at": "2024-09-10T14:44:22.416Z",
"updated_at": "2024-09-10T17:53:29.049Z",
"type": "smart_cover"
},
"profit": {
"volume": "-0.0841932",
"usd": "-0.0841932",
"percent": "-4.26",
"roe": null
},
"margin": {
"amount": null,
"total": null
},
"is_position_not_filled": false
}