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 all account positions

get
https://api.snaptrade.com/accounts/{accountId}/positions/all

Returns a list of all positions in the specified account.

The results list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the instrument.kind discriminator to determine the schema for each position's instrument.

mutualfund positions may also include cash_equivalent. stock, etf, and mutualfund positions may include tax_lots when tax lot data is enabled for the account.

If the connection has become disabled, it can no longer access the latest data from the brokerage, 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.getAllAccountPositions(
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

Information about all account positions.

resultsarray of objects

Positions returned for the request.

Metadata describing freshness of the returned positions data.

1
{
2
"results": [
3
{
4
"instrument": {
5
"kind": "stock",
6
"id": "1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324",
7
"symbol": "AAPL",
8
"raw_symbol": "AAPL",
9
"description": "Apple Inc.",
10
"currency": "USD",
11
"exchange": "XNAS",
12
"figi_instrument": {
13
"figi_code": "BBG000B9Y5X2",
14
"figi_share_class": "BBG001S5N8V8"
15
}
16
},
17
"units": "10.5",
18
"price": "123.45",
19
"cost_basis": "118.2",
20
"currency": "USD",
21
"cash_equivalent": false,
22
"tax_lots": [
23
{
24
"original_purchase_date": "2022-01-15T10:30:00.000Z",
25
"quantity": "10",
26
"purchased_price": "100.50",
27
"cost_basis": "1005.00",
28
"current_value": "1200.00",
29
"position_type": "LONG",
30
"lot_id": "12345678"
31
}
32
]
33
}
34
],
35
"data_freshness": {
36
"as_of": "2026-06-02T14:30:00.000Z"
37
}
38
}