> For the complete documentation index, see [llms.txt](https://3commas.gitbook.io/3commas-official-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://3commas.gitbook.io/3commas-official-api-docs/smarttrade/10.-cancel-smarttrade.md).

# Cancel SmartTrade

**Description:** Cancels an existing SmartTrade in place using its ID<br>

**Permission:** SMART\_TRADES\_WRITE\
**Security:** SIGNED\ <br>

***

<mark style="color:red;">**DELETED**</mark>

<mark style="color:red;">**/v2/smart\_trades/{id}**</mark>

***

\ <br>

## Path Parameters<br>

| Name   | Type      | Mandatory | Values | Description                                  |
| ------ | --------- | --------- | ------ | -------------------------------------------- |
| **id** | `integer` | Yes       |        | Unique 3Commas ID for this SmartTrade entity |

\ <br>

## Parameters response<br>

{% hint style="info" %}
If successful, the response includes an updated copy of the [SmartTrade](/3commas-official-api-docs/smarttrade.md) entity.
{% endhint %}

\ <br>

## Example Request<br>

```json
DELETED /v2/smart_trades/12345678
```

\ <br>

## Example Response and errors<br>

<details>

<summary>Status: 200 OK</summary>

<br>

```json
{
    "id": 30404547,
    "version": 2,
    "account": {
        "id": 32402783,
        "type": "binance_us",
        "name": "My Binance US",
        "market": "Binance US Spot",
        "link": "/accounts/32402783"
    },
    "pair": "USDT_DOGE",
    "instant": false,
    "status": {
        "type": "cancellation_pending",
        "basic_type": "cancellation_pending",
        "title": "Cancelling"
    },
    "leverage": {
        "enabled": false
    },
    "position": {
        "type": "buy",
        "editable": false,
        "units": {
            "value": "14.91",
            "editable": false
        },
        "price": {
            "value": "0.10622",
            "value_without_commission": "0.10559",
            "editable": false
        },
        "total": {
            "value": "1.58385"
        },
        "order_type": "market",
        "status": {
            "type": "finished",
            "basic_type": "finished",
            "title": "Finished"
        }
    },
    "take_profit": {
        "enabled": true,
        "price_type": "value",
        "steps": [
            {
                "id": 1006090636,
                "order_type": "limit",
                "editable": true,
                "units": {
                    "value": "14.0"
                },
                "price": {
                    "type": "last",
                    "value": "0.11627",
                    "percent": null
                },
                "volume": "100.0",
                "total": "1.62778",
                "trailing": {
                    "enabled": false,
                    "percent": null
                },
                "status": {
                    "type": "order_placed",
                    "basic_type": "order_placed",
                    "title": "Placed"
                },
                "data": {
                    "cancelable": true,
                    "panic_sell_available": true
                },
                "position": 1
            }
        ]
    },
    "stop_loss": {
        "enabled": false
    },
    "reduce_funds": {
        "steps": []
    },
    "market_close": {},
    "note": "",
    "note_raw": null,
    "skip_enter_step": false,
    "data": {
        "editable": false,
        "current_price": {
            "bid": "0.10613",
            "ask": "0.10637",
            "last": "0.10636",
            "quote_volume": "181260.82083",
            "day_change_percent": "0.806"
        },
        "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.10622",
        "average_close_price": null,
        "average_enter_price_without_commission": "0.10559",
        "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": "14.91",
        "entered_total": "1.58385",
        "closed_amount": "0.0",
        "closed_total": "0.0",
        "commission": 0.001,
        "created_at": "2024-08-12T14:35:21.632Z",
        "updated_at": "2024-08-12T14:47:43.054Z",
        "type": "smart_trade"
    },
    "profit": {
        "volume": "-0.0030340983",
        "usd": "-0.0030340983",
        "percent": "-0.19",
        "roe": null
    },
    "margin": {
        "amount": null,
        "total": null
    },
    "is_position_not_filled": false
}

```

</details>

<details>

<summary>Status: 404 Not found</summary>

<br>

```json
{
    "error": "Not found",
    "error_description": "Smart Trade not found"
}
```

</details>
