> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "Export market trades"
description: "Export trade history for a market as a CSV or TSV file download, newest first. Columns: tradeid, timestamp, price, count, side, volume."
api: "GET /api/v1/export/markets/{id}/trades.{ext}"
gridGap: 30
---

<Aside full>
  <RequestExample>
    ```bash title="cURL" lines=false
    curl -X GET "https://api.adjacent.markets/api/v1/export/markets/<id>/trades.csv" \
      -H "Authorization: Bearer <token>"
    ```
  </RequestExample>
</Aside>

<OpenAPIEndpoint {...{"method":"get","path":"/api/v1/export/markets/{id}/trades.{ext}","summary":"Export market trades","description":"Export trade history for a market as a CSV or TSV file download, newest first. Columns: trade_id, timestamp, price, count, side, volume.","parameters":[{"name":"id","in":"path","required":true,"description":"Market ID","schema":{"type":"string"}},{"name":"ext","in":"path","required":true,"description":"Export file format","schema":{"type":"string","enum":["csv","tsv"]}},{"name":"per_page","in":"query","description":"Number of trades to export (used as the row limit; clamped to 1-10000 for exports)","schema":{"type":"integer","default":100,"minimum":1,"maximum":10000}}],"responses":[{"status":"200","description":"CSV/TSV file of market trades","examples":[]},{"status":"400","description":"Invalid format (ext must be csv or tsv)","schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"examples":[]},{"status":"404","description":"Market not found","schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"examples":[]}],"security":[{"name":"bearerAuth","type":"http","scheme":"bearer","in":"header","description":"Clerk JWT Bearer token"}],"servers":[{"url":"https://api.adjacent.markets","description":"API server"}]}} />
