For AI agents: the complete documentation index is available at https://docs.snaptrade.com/llms.txt, and the full documentation text is available at https://docs.snaptrade.com/llms-full.txt. Markdown versions of documentation pages are available by appending .md to the URL path.
View as Markdown
Account Information

List accounts

get
https://api.snaptrade.com/accounts

Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.

This endpoint returns Daily data regardless of the customer's plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user's connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the list accounts for a connection endpoint. Customers on Pay as you Go / Daily can force a refresh with the manual refresh endpoint.

Execute an API Request

Authentication Method

Use commercial authentication when acting on behalf of your application and passing end-user credentials with requests that require them.

Credentials
Request
Installation
$
npm install snaptrade-typescript-sdk
1
import {
2
Snaptrade,
3
SnaptradeAuth,
4
} from "snaptrade-typescript-sdk";
5
6
const snaptrade = new Snaptrade({
7
auth: SnaptradeAuth.commercialApiKey({
8
consumerKey: "CONSUMER_KEY",
9
clientId: "CLIENT_ID",
10
}),
11
});
12
13
const response =
14
await snaptrade.accountInformation.listUserAccounts(
15
{
16
userId: "USER_ID",
17
userSecret: "USER_SECRET",
18
},
19
);
20
console.log(response.data);

Response fields

array of objects

List of brokerage accounts across all connections.

object

A single account at a brokerage.

1
[
2
{
3
"id": "917c8734-8470-4a3e-a18f-57c3f2ee6631",
4
"brokerage_authorization": "87b24961-b51e-4db8-9226-f198f6518a89",
5
"name": "Robinhood Individual",
6
"number": "Q6542138443",
7
"institution_account_id": "54953432",
8
"institution_name": "Robinhood",
9
"created_date": "2024-07-23T22:50:22.761Z",
10
"funding_date": "2024-07-25T12:00:00.000Z",
11
"opening_date": "2024-07-20T09:30:00.000Z",
12
"sync_status": {
13
"transactions": {
14
"initial_sync_completed": true,
15
"last_successful_sync": "2022-01-24T00:00:00.000Z",
16
"first_transaction_date": "2022-01-24T00:00:00.000Z"
17
},
18
"holdings": {
19
"initial_sync_completed": true,
20
"last_successful_sync": "2024-06-28T18:42:46.561Z"
21
}
22
},
23
"balance": {
24
"total": {
25
"amount": 15363.23,
26
"currency": "USD"
27
}
28
},
29
"status": "open",
30
"raw_type": "Margin",
31
"account_category": "INVESTMENT",
32
"meta": {
33
"type": "Margin",
34
"status": "ACTIVE",
35
"institution_name": "Robinhood"
36
},
37
"portfolio_group": "2bcd7cc3-e922-4976-bce1-9858296801c3",
38
"cash_restrictions": [],
39
"is_paper": false
40
}
41
]