> For the complete documentation index, see [llms.txt](https://ajaib.gitbook.io/ajaib-exchange-open-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajaib.gitbook.io/ajaib-exchange-open-api/api-references/markdown/get-trades.md).

# Get Trades

## Retrieve all trades under exchange client&#x20;

<mark style="color:green;">`GET`</mark> `/v1/trades`

**Functionality:** Retrieves all trades belonging to the exchange client's trading account. No sub-accounts yet.&#x20;

**Authentication**: Required

#### URL Parameters

<table><thead><tr><th width="157">Name</th><th width="109">Type</th><th width="168" data-type="checkbox">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>symbol</td><td>string</td><td>true</td><td>Symbol of trading pair. Refer to <a href="https://ajaib.gitbook.io/coin-exchange-open-api/getting-started/quickstart#:~:text=Asset%20Symbols%20/%20Trading%20Pairs">this</a>.</td></tr><tr><td>timestamp</td><td>long</td><td>true</td><td>Timestamp when client sending request.<br>Example: <code>1750135489589</code></td></tr><tr><td>recvWindow</td><td>long</td><td>false</td><td>Number of milliseconds after timestamp the request is valid for. Refer to <a href="https://ajaib.gitbook.io/ajaib-exchange-open-api/getting-started/timing-security">this</a>.</td></tr><tr><td>orderId</td><td>string</td><td>false</td><td>Unique identifier generated by Ajaib exchange.</td></tr><tr><td>limit</td><td>long</td><td>false</td><td>Default 500; max 1000</td></tr><tr><td>startTime</td><td>long</td><td>false</td><td>Start time (in milliseconds) from which trades should be retrieved.<br>Example: <code>1750048915000</code></td></tr><tr><td>endTime</td><td>long</td><td>false</td><td>End time (in milliseconds) from which trades should be retrieved<br>Example: <code>1750135255943</code></td></tr></tbody></table>

These are the supported combinations of all parameters:

* `symbol`
* `symbol` + `orderId`
* `symbol` + `startTime`
* `symbol` + `endTime`
* `symbol` + `startTime` + `endTime`<br>

**Response Body**

<table><thead><tr><th width="167">Name</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>symbol</td><td>string</td><td>Symbol of trading pair. Refer to <a href="https://ajaib.gitbook.io/coin-exchange-open-api/getting-started/quickstart#:~:text=Asset%20Symbols%20/%20Trading%20Pairs">this</a>.</td></tr><tr><td>id</td><td>string</td><td>Unique identifier generated by Ajaib exchange for all generated trades.</td></tr><tr><td>orderId</td><td>string</td><td>Unique identifier generated by Ajaib exchange for all orders submitted successfully</td></tr><tr><td>price</td><td>string</td><td>Price of trade / match execution.</td></tr><tr><td>qty</td><td>string</td><td>Quantity of trade / match execution.</td></tr><tr><td>quoteQty</td><td>string</td><td>Amount of trade / match execution. (price * qty)</td></tr><tr><td>time</td><td>long</td><td>Timestamp of when trade is generated or match execution. Using UTC timezone in unix epoch.</td></tr><tr><td>isMaker</td><td>boolean</td><td>Flag whether trade is classified under maker or taker</td></tr><tr><td>isSelfTrade</td><td>boolean</td><td>Flag whether trade is classified as self trading</td></tr><tr><td>isBuyer</td><td>boolean</td><td>Flag indicating whether the trade comes from a BUY order.</td></tr><tr><td>commission</td><td>string</td><td>The amount of commission charged for the trade.</td></tr><tr><td>commissionAsset</td><td>string</td><td>The asset in which the commission is charged.</td></tr><tr><td>tax</td><td>string</td><td>The amount of tax charged for the trade.</td></tr><tr><td>taxAsset</td><td>string</td><td>The asset in which the tax is charged.</td></tr></tbody></table>

{% tabs %}
{% tab title="200 OK" %}

```javascript
[
  {
    "symbol": "BNB_BTC",
    "id": "e397b597-1102-453b-bcb9-82368c1f1a52",
    "orderId": "e397b597-1102-453b-bcb9-82368c1f1a51",
    "price": "4.00000100",
    "qty": "12.00000000",
    "quoteQty": "48.000012",
    "time": 1499865549590,
    "isMaker": false,
    "isSelfTrade": false,
    "commission": "10",
    "commissionAsset": "IDR"
    "tax": "10",
    "taxAsset": "IDR"
  }
]
```

{% endtab %}
{% endtabs %}
