# Read accounts

Source: https://docs.tradeit.app/sdk/accounts

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

**Scopes:** `brokerage:read tool:execute`.

## Server side: fetch accounts [#server-side-fetch-accounts]

```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_accounts', params: {} }),
});
if (!response.ok) throw new Error(`Account request failed: ${response.status}`);
const accounts = await response.json();
```

**Returns:** [Account[]](/models/account), each wrapped with its `brokerage_metadata` and `connection`. See [Get accounts](/api/get-accounts#example-response) for a sample response.

To remove a brokerage login, pass its `connection.id` to [Delete connection](/api/delete-connection). This currently deletes the entire connection and its accounts across Trade It and all partners.
