> 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/4.-get-the-list-of-smarttrades.md).

# Get the list of SmartTrades

**Description:** Returns the list of SmartTrade. Use the query parameters to filter the results<br>

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

***

<mark style="color:blue;">**GET**</mark>\ <mark style="color:blue;">**/v2/smart\_trades**</mark>

***

\ <br>

## Query Parameters<br>

| Name                 | Type      | Mandatory | Values(default)                                                           | Description                                                                                                                                                           |
| -------------------- | --------- | --------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **account\_id**      | `integer` | No        |                                                                           | Returns entities related to the specified 3Commas exchange account                                                                                                    |
| **pair**             | `string`  | No        |                                                                           | Name of the trading pair in 3Commas format                                                                                                                            |
| **type**             | `string`  | No        |                                                                           | Set a type of SmartTrade what you want to get in response                                                                                                             |
| **page**             | `integer` | No        | `1`                                                                       | Page number for pagination                                                                                                                                            |
| **per\_page**        | `integer` | No        | `10`                                                                      | Quantity of records on one page. Minimum: `1`, Maximum: `100`.                                                                                                        |
| **status**           | `string`  | No        | `all`; `active`; `finished`; `successfully_finish`; `cancelled`; `failed` | all; active; finished; successfully\_finish; cancelled; failed                                                                                                        |
| **order\_by**        | `string`  | No        | `status`                                                                  | Set one of the fields to order the SmartTrade list. You can choose one of `created_at`, `updated_at`, `closed_at`, `status`, `profit`, `profit_percentage` the fields |
| **order\_direction** | `string`  | No        | `ASC` or `DESC`                                                           | Set the direction of order. Default: `DESC`)                                                                                                                          |
| **from**             | `string`  | No        |                                                                           | Parameter for filtering by creation date                                                                                                                              |
| **to**               | `string`  | No        |                                                                           | Parameter for filtering by creation date                                                                                                                              |
| **base**             | `string`  | No        |                                                                           | Base currency                                                                                                                                                         |
| **quote**            | `string`  | No        |                                                                           | Quote currency                                                                                                                                                        |

<br>

{% hint style="info" %}
Use endpoint [User connected exchanges and wallets list](https://github.com/3commas-io/3commas-official-api-docs/blob/gitbook/docs/SmartTrade/Account/User%20connected%20exchanges%20and%20wallets%20list.md) to get value for parameter 'account\_id' in 3Commas.
{% endhint %}

\ <br>

## Parameter response<br>

{% hint style="info" %}
If successful, the response will contain an array of [SmartTrade](/3commas-official-api-docs/smarttrade.md) entities.
{% endhint %}

\ <br>

## Example Response and errors<br>

<details>

<summary>Status: 200 OK</summary>

<br>

```json
[
    {
        "id": 28934742,
        "version": 2,
        "account": {
            "id": 32435557,
            "type": "kucoin",
            "name": "My Kucoin",
            "market": "Kucoin Spot",
            "link": "/accounts/32435557"
        },
        "pair": "USDT_DOGE",
        "instant": false,
        "status": {
            "type": "failed",
            "basic_type": "failed",
            "title": "Failed",
            "error": "You need to pass KYC on the exchange to trade on this pair"
        },
        "leverage": {
            "enabled": false
        },
        "position": {
            "type": "buy",
            "editable": false,
            "units": {
                "value": "10.0",
                "editable": false
            },
            "price": {
                "value": "0.1038",
                "value_without_commission": "0.1038",
                "editable": true
            },
            "total": {
                "value": "1.7542"
            },
            "order_type": "market",
            "status": {
                "type": "failed",
                "basic_type": "failed",
                "title": "Failed",
                "error": "You need to pass KYC on the exchange to trade on this pair"
            }
        },
        "take_profit": {
            "enabled": true,
            "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": {
                "bid": "0.10379",
                "ask": "0.1038",
                "last": "0.10379",
                "quote_volume": "4062766.6804568596516",
                "day_change_percent": "1.2"
            },
            "target_price_type": "price",
            "orderbook_price_currency": "USDT",
            "base_order_finished": true,
            "missing_funds_to_close": "0.0",
            "liquidation_price": null,
            "average_enter_price": null,
            "average_close_price": null,
            "average_enter_price_without_commission": null,
            "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": false,
            "cancel_available": false,
            "finished": false,
            "base_position_step_finished": true,
            "entered_amount": "0.0",
            "entered_total": "0.0",
            "closed_amount": "0.0",
            "closed_total": "0.0",
            "commission": "0.001",
            "created_at": "2024-04-05T02:53:32.225Z",
            "updated_at": "2024-04-05T02:54:39.074Z",
            "closed_at": "2024-04-05T02:54:39.045Z",
            "type": "smart_trade"
        },
        "profit": {
            "volume": null,
            "usd": null,
            "percent": "0.0",
            "roe": null
        },
        "margin": {
            "amount": null,
            "total": null
        },
        "is_position_not_filled": true
    }
]
```

</details>
