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 all user accounts

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

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

The results list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the kind discriminator to determine the schema for each account.

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 institution. 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.listAllUserAccounts(
15
{
16
userId: "USER_ID",
17
userSecret: "USER_SECRET",
18
},
19
);
20
console.log(response.data);

Response fields

object

Accounts across all of the user's connections.

resultsarray of objects

Accounts returned for the request.

1
{
2
"results": [
3
{
4
"kind": "investment",
5
"id": "917c8734-8470-4a3e-a18f-57c3f2ee6631",
6
"connection_id": "87b24961-b51e-4db8-9226-f198f6518a89",
7
"status": "open",
8
"display_name": "Robinhood Individual",
9
"masked_account_number": "****8443",
10
"institution_account_id": "54953432",
11
"institution_id": "b6e1a9f0-6e2a-4c37-9b0a-6f1e2d3c4b5a",
12
"opening_date": "2024-07-20T09:30:00.000Z",
13
"funding_date": "2024-07-25T12:00:00.000Z",
14
"sync_status": {
15
"transactions": {
16
"initial_sync_completed": true,
17
"last_successful_sync": "2022-01-24T00:00:00.000Z",
18
"first_transaction_date": "2022-01-24T00:00:00.000Z"
19
},
20
"orders": "2024-06-28T18:42:46.561Z",
21
"positions": "2024-06-28T18:42:46.561Z",
22
"balances": "2024-06-28T18:42:46.561Z"
23
},
24
"raw_type": "Margin",
25
"cash_or_margin": "margin",
26
"is_paper": false,
27
"net_value": {
28
"amount": 84213.55,
29
"currency": "USD"
30
}
31
}
32
]
33
}