Skip to content

Read accounts ​

Fetch the user's connected brokerage accounts from your server using their OAuth access token.

Scopes: brokerage:read tool:execute.

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

See Get accounts for the sample response and full API reference.