# Read trade history

Source: https://docs.tradeit.app/sdk/trade-history

Fetch the user's recent trades from your server using their [OAuth access token](/sdk/authentication).

## Server side: fetch trade history [#server-side-fetch-trade-history]

```js
const response = await fetch('https://api.tradeit.app/api/tool/execute', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${accessToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    tool_name: 'get_trades',
    params: { limit: 20 },
  }),
});
if (!response.ok) throw new Error(`Trade history request failed: ${response.status}`);
const history = await response.json();
```

**Returns:** a page of [Trade[]](/models/trade) in `trades`. See [Get trades](/api/get-trades#example-response) for a sample response and pagination.
