For AI agents: the documentation index is available at https://docs.snaptrade.com/llms.txt, and the comprehensive documentation index is available at https://docs.snaptrade.com/llms-full.txt. The complete public OpenAPI specification is available at https://docs.snaptrade.com/openapi.yaml. Complete public OpenAPI specification with all documented operations, schemas, servers, and authentication requirements. Use it for SDK generation and API tooling; beta operations are marked x-beta. Markdown versions of documentation pages are available by appending .md to the URL path.
Account Information

List user accounts

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

Deprecated. Use the list all user accounts endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, and annuity 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
"holdings_unavailable": true
22
}
23
},
24
"balance": {
25
"total": {
26
"amount": 15363.23,
27
"currency": "USD"
28
}
29
},
30
"status": "open",
31
"raw_type": "Margin",
32
"account_category": "INVESTMENT",
33
"meta": {
34
"type": "Margin",
35
"status": "ACTIVE",
36
"institution_name": "Robinhood"
37
},
38
"portfolio_group": "2bcd7cc3-e922-4976-bce1-9858296801c3",
39
"cash_restrictions": [],
40
"is_paper": false
41
}
42
]