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 account balances (V2)

BETA
get
https://api.snaptrade.com/accounts/{accountId}/balances/v2

Returns the account's balances in a single snapshot: total net value, cash per currency, buying power, and margin details for margin accounts. Every field is always present and is null when the institution doesn't report it.

Beta: this endpoint is only available for partners it has been enabled for. Please contact the SnapTrade team to enable it. The response schema may change.

Check your API key on the Customer Dashboard billing page to see if you have real-time data access:

  • If you do, this endpoint returns real-time data.
  • If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. If you need real-time, use the manual refresh endpoint.

data_freshness.as_of is the time the returned data was fetched from the institution.

If the connection has become disabled, it can no longer access the latest data from the institution, but will continue to return the last available cached state. Please see this guide on how to fix a disabled connection.

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
Path
accountIdstring (format: uuid)required

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

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.getAccountBalancesV2(
15
{
16
accountId:
17
"917c8734-8470-4a3e-a18f-57c3f2ee6631",
18
userId: "USER_ID",
19
userSecret: "USER_SECRET",
20
},
21
);
22
console.log(response.data);

Response fields

object

Balances for a single account, fetched together as one snapshot.

account_idstring (format: uuid)

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

Whether the account is a cash or margin account, normalized across institutions. Same values as cash_or_margin on the get account details endpoint.

  • cash: the account can't borrow on margin.
  • margin: the account can borrow on margin.
  • unknown: SnapTrade doesn't have enough information to tell, or the distinction doesn't apply (for example crypto accounts).
net_valueobject or null

Total value of the account as reported by the institution, in the account's currency.

casharray of objects

Cash held in the account, one entry per currency, as reported by the institution. Some institutions allow holding multiple currencies in the same account. May include proceeds from trades that haven't settled yet. Can be negative, for example on a margin account that is borrowing in a currency.

buying_powerarray of objects or null

How much the account can spend on new purchases, one entry per currency. Amounts are in different currencies and shouldn't be added together. Null when it can't be determined.

  • Cash accounts: one entry per currency held, each covering purchases in that currency and never more than the cash in that currency. Each entry is the settled cash available to spend in that currency where the institution reports it; otherwise it's the institution's buying power or cash, which may include proceeds from trades that haven't settled. Check basis.
  • Margin accounts: a single entry for the whole account, covering purchases in any currency. It's usually in the account's main currency (the currency of net_value). It's the institution's buying power, typically its overnight figure (day-trading buying power isn't included). How it's calculated varies by institution, it can be negative, and it may not cover options or other non-marginable securities.
marginobject or null

Margin details. Null when cash_or_margin is cash; present for margin and unknown accounts.

Metadata describing freshness of the returned balances.

1
{
2
"account_id": "378eb9a5-448b-4fbc-ab61-29d2bcf0ec09",
3
"cash_or_margin": "margin",
4
"net_value": {
5
"amount": "520692.19",
6
"currency": "CAD"
7
},
8
"cash": [
9
{
10
"currency": "CAD",
11
"amount": "121610.45"
12
},
13
{
14
"currency": "USD",
15
"amount": "-72658.27"
16
}
17
],
18
"buying_power": [
19
{
20
"currency": "CAD",
21
"amount": "1208463.36",
22
"basis": "margin"
23
}
24
],
25
"margin": {
26
"loan_balances": [
27
{
28
"currency": "USD",
29
"amount": "72658.27"
30
}
31
]
32
},
33
"data_freshness": {
34
"as_of": "2026-10-15T11:03:35.000Z"
35
}
36
}