Connections

Get connection detail

get
https://api.snaptrade.com/api/v1/authorizations/{authorizationId}

Returns a single connection for the specified ID.

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
Loading...

Response fields

object

A single connection with a brokerage. Note that Connection and Brokerage Authorization are interchangeable, but the term Connection is preferred and used in the doc for consistency.

A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts.

SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.

idstring (format: uuid)

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

created_datestring (format: date-time)

Timestamp of when the connection was established in SnapTrade.

brokerageobject

Describes a brokerage that SnapTrade supports.

namestring

A short, human-readable name for the connection.

typestring

Whether the connection is read-only or trade-enabled. A read-only connection can only be used to fetch data, while a trade-enabled connection can be used to place trades. Valid values are read and trade.

disabledboolean

Whether the connection is disabled. A disabled connection can no longer access the latest data from the brokerage, but will continue to return the last cached state. A connection can become disabled for many reasons and differs by brokerage. Here are some common scenarios:

  • The user has changed their username or password at the brokerage.
  • The user has explicitly removed the access grant at the brokerage.
  • The session has expired at the brokerage and now requires explicit user re-authentication.

Please see this guide on how to fix a disabled connection.

disabled_datestring (format: date-time) or null

Timestamp of when the connection was disabled in SnapTrade.

metaobject

Additional data about the connection. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version.

updated_datestring (format: date-time)

Timestamp of when the connection was last updated in SnapTrade. This field is deprecated. Please let us know if you have a valid use case for this field.

1
{
2
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
3
"created_date": "2024-08-20T21:56:19.123Z",
4
"brokerage": {
5
"id": "ebf91a5b-0920-4266-9e36-f6cfe8c40946",
6
"slug": "ROBINHOOD",
7
"name": "Robinhood",
8
"display_name": "Robinhood",
9
"description": "Robinhood is an American multinational financial services corporation based in Menlo Park, California.",
10
"aws_s3_logo_url": "https://passiv-brokerage-logos.s3.ca-central-1.amazonaws.com/robinhood-logo.png",
11
"aws_s3_square_logo_url": "https://passiv-brokerage-logos.s3.ca-central-1.amazonaws.com/robinhood-logo-square.png",
12
"url": "https://robinhood.com",
13
"enabled": true,
14
"maintenance_mode": true,
15
"allows_trading": true,
16
"allows_fractional_units": true,
17
"has_reporting": true,
18
"is_real_time_connection": true,
19
"brokerage_type": {
20
"id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
21
"name": "Traditional Brokerage"
22
},
23
"exchanges": [
24
"2bcd7cc3-e922-4976-bce1-9858296801c3",
25
"4bcd8cc3-c122-4974-dc21-1858296801f4"
26
],
27
"open_url": "string"
28
},
29
"name": "Connection-1",
30
"type": "trade",
31
"disabled": false,
32
"disabled_date": "2022-01-21T20:11:19.217Z",
33
"meta": {
34
"identifier": 123456
35
},
36
"updated_date": "2024-08-20T21:56:20.057Z"
37
}