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
Connections

Sync transactions for a connection

BETA
post
https://api.snaptrade.com/authorizations/{authorizationId}/transactions/sync

Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day's transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing

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

Unique identifier for the connection (brokerage_authorization_id). This is the UUID used to reference the connection 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.connections.syncBrokerageAuthorizationTransactions(
15
{
16
authorizationId:
17
"87b24961-b51e-4db8-9226-f198f6518a89",
18
userId: "USER_ID",
19
userSecret: "USER_SECRET",
20
},
21
);
22
console.log(response.data);

Response fields

object

Confirmation that the transaction syncs have been scheduled.

detailstring

Transactions sync confirmation details

1
{
2
"detail": "Connection 0b3ebefb-ed47-43df-cd8f-729a4420b5cf scheduled for transactions sync"
3
}