> 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/dca-bot/deals/get-trades-of-deal.md).

# Get Trades of Deal

<br>

**Description:** Returns all type of trades for a specific deal<br>

**Permission:** BOTS\_READ\
**Security:** SIGNED\ <br>

> <mark style="color:blue;">**`GET`**</mark>
>
> `/ver1/deals/{deal_id}/market_orders`

<br>

## Path Parameter<br>

**deal\_id**     `integer`     <mark style="color:orange;">required</mark>\
Unique 3Commas ID Deal entity

<br>

## Response Parameters<br>

**order\_id**     `string`\
Unique 3Commas Trade entity ID

**order\_type**     `string`\
The side of the order to be created by this trade

<details>

<summary><em>Allowed value</em></summary>

* Buy
* Sell

</details>

**deal\_order\_type**     `string`\
The type of the order to be created by this trade

<details>

<summary><em>Allowed value</em></summary>

* Base
* Take profit
* Stop Loss
* Safety
* Manual Safety

</details>

**cancellable**     `boolean`\
Indicates whether this trade can be canceled (`true`) or not (`false`)

**status\_string**     `string`\
3Commas status for this Trade

<details>

<summary><em>Allowed value</em></summary>

* Active - the trade is currently open, waiting to be filled
* Filled - the trade has been fully executed
* Finished - the trade process is complete
* Cancelled - the trade was canceled before it could be fully executed

</details>

**created\_at**     `string`\
ISO 8601 datetime string of when this Trade entity was created

**updated\_at**     `string`\
ISO 8601 datetime string of when this Trade entity was updated

**quantity**     `string`\
Total quantity of the asset in this order

**quantity\_remaining**     `string`\
Remaining quantity of the asset left to be filled in this order

**total**     `string`\
Total value of the order based on `quantity` and `rate`

**rate**     `string`\
Price per unit of the asset in the order

**average\_price**     `string`\
The weighted average price at which the asset was bought or sold during the execution of the trades

\ <br>

## Example Request<br>

```json
GET /ver1/deals/1234567890/market_orders
```

\ <br>

## Example Response and errors<br>

<details>

<summary>Status: 200 OK</summary>

<br>

```json
[
    {
        "order_id": "1110863869",
        "order_type": "SELL",
        "deal_order_type": "Manual Safety",
        "cancellable": false,
        "status_string": "Inactive",
        "created_at": "2024-11-11T17:02:50.001Z",
        "updated_at": "2024-11-11T17:02:50.166Z",
        "quantity": "0.0",
        "quantity_remaining": "0.0",
        "total": "0.0",
        "rate": "0.297",
        "average_price": "0.0"
    },
    {
        "order_id": "1110817001",
        "order_type": "SELL",
        "deal_order_type": "Manual Safety",
        "cancellable": false,
        "status_string": "Inactive",
        "created_at": "2024-11-11T16:46:59.479Z",
        "updated_at": "2024-11-11T16:46:59.643Z",
        "quantity": "0.0",
        "quantity_remaining": "0.0",
        "total": "0.0",
        "rate": "0.297",
        "average_price": "0.0"
    },
    {
        "order_id": "1110812940",
        "order_type": "SELL",
        "deal_order_type": "Manual Safety",
        "cancellable": false,
        "status_string": "Inactive",
        "created_at": "2024-11-11T16:45:38.751Z",
        "updated_at": "2024-11-11T16:45:38.892Z",
        "quantity": "0.0",
        "quantity_remaining": "0.0",
        "total": "0.0",
        "rate": "0.297",
        "average_price": "0.0"
    },
    {
        "order_id": "1110811846",
        "order_type": "SELL",
        "deal_order_type": "Manual Safety",
        "cancellable": false,
        "status_string": "Inactive",
        "created_at": "2024-11-11T16:45:21.014Z",
        "updated_at": "2024-11-11T16:45:21.156Z",
        "quantity": "0.0",
        "quantity_remaining": "0.0",
        "total": "0.0",
        "rate": "0.2971",
        "average_price": "0.0"
    },
    {
        "order_id": "1110706583",
        "order_type": "SELL",
        "deal_order_type": "Manual Safety",
        "cancellable": false,
        "status_string": "Inactive",
        "created_at": "2024-11-11T16:22:01.176Z",
        "updated_at": "2024-11-11T16:22:01.391Z",
        "quantity": "0.0",
        "quantity_remaining": "0.0",
        "total": "0.0",
        "rate": "0.0",
        "average_price": "0.0"
    },
    {
        "order_id": "1110645798",
        "order_type": "SELL",
        "deal_order_type": "Manual Safety",
        "cancellable": false,
        "status_string": "Inactive",
        "created_at": "2024-11-11T16:04:51.619Z",
        "updated_at": "2024-11-11T16:04:51.750Z",
        "quantity": "0.0",
        "quantity_remaining": "0.0",
        "total": "0.0",
        "rate": "0.0",
        "average_price": "0.0"
    },
    {
        "order_id": "1102488856",
        "order_type": "BUY",
        "deal_order_type": "Take Profit",
        "cancellable": true,
        "status_string": "Active",
        "created_at": "2024-11-08T20:39:06.340Z",
        "updated_at": "2024-11-08T21:54:34.204Z",
        "quantity": "25.9",
        "quantity_remaining": "25.9",
        "total": "0.0",
        "rate": "0.25",
        "average_price": "0.0"
    },
    {
        "order_id": "1102488858",
        "order_type": "SELL",
        "deal_order_type": "Safety",
        "cancellable": false,
        "status_string": "Filled",
        "created_at": "2024-11-08T20:39:06.443Z",
        "updated_at": "2024-11-08T21:54:33.294Z",
        "quantity": "15.0",
        "quantity_remaining": "0.0",
        "total": "3.894858",
        "rate": "0.2607",
        "average_price": "0.2596572"
    },
    {
        "order_id": "1102488849",
        "order_type": "SELL",
        "deal_order_type": "Base",
        "cancellable": false,
        "status_string": "Filled",
        "created_at": "2024-11-08T20:39:05.801Z",
        "updated_at": "2024-11-08T20:39:06.147Z",
        "quantity": "10.0",
        "quantity_remaining": "0.0",
        "total": "2.580424",
        "rate": "0.2596",
        "average_price": "0.2580424"
    }
]
```

</details>
