Experimental endpoints

Sync transactions for a connection

post
https://api.snaptrade.com/api/v1/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

Path
authorizationIdstring (format: uuid)required

Unique identifier for the connection. This is the UUID used to reference the connection in SnapTrade.

Query
userIdstringrequired

SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.

userSecretstringrequired

SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the rotate user secret endpoint.

Authorization
Request
Installation
$
npm install snaptrade-typescript-sdk
1
import { Snaptrade } from "snaptrade-typescript-sdk";
2
3
const snaptrade = new Snaptrade({
4
clientId: "PARTNER_CLIENT_ID",
5
consumerKey: "CONSUMER_KEY",
6
});
7
8
const response =
9
await snaptrade.experimentalEndpoints.syncBrokerageAuthorizationTransactions(
10
{
11
authorizationId:
12
"87b24961-b51e-4db8-9226-f198f6518a89",
13
userId: "snaptrade-user-123",
14
userSecret:
15
"adf2aa34-8219-40f7-a6b3-60156985cc61",
16
},
17
);
18
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
}