> For the complete documentation index, see [llms.txt](https://docs.niza.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.niza.io/public-endpoints/historical-trades.md).

# Historical Trades

## Get historical trades

<mark style="color:green;">`GET`</mark> `/`historical\_trades

Returns trades for the given ticker

**Query Parameters**

<table><thead><tr><th>Name</th><th>Value</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>ticker_id</td><td>string: <code>DEMONIZA/USDT</code></td><td>true</td></tr><tr><td>type</td><td>string: <code>buy/sell</code></td><td>false</td></tr><tr><td>limit</td><td>integer: <code>10</code></td><td>false</td></tr><tr><td>start_time</td><td>timestamp: <code>1709150766</code></td><td>false</td></tr></tbody></table>

**Response**

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

```json
{
 "buy": [  
   {        
      "trade_id":1234567,
      "price":"0.009",
      "base_volume":"10000",
      "target_volume":"90",
      "trade_timestamp":"1700050000",
      "type":"buy"
   },
   ...
],
"sell": [
      {        
         "trade_id":1234567,
         "price":"0.009",
         "base_volume":"10000",
         "target_volume":"90",
         "trade_timestamp":"1700050000",
         "type":"sell"
      }
   ]
}


```

{% endtab %}

{% tab title="422" %}

```json
{
    "success": false,
    "error": {
        "message": "The given data was invalid!",
        "validations": [
            "Pair attribute must be set"
        ],
        "code": 422
    }
}
```

{% endtab %}
{% endtabs %}
