snaptrade-typescript-sdk 9.0.191 → 9.0.193
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -8
- package/dist/api/account-information-api-generated.d.ts +10 -6
- package/dist/api/account-information-api-generated.js +9 -5
- package/dist/api/connections-api-generated.d.ts +61 -0
- package/dist/api/connections-api-generated.js +89 -0
- package/dist/api/experimental-endpoints-api-generated.d.ts +2 -2
- package/dist/api/experimental-endpoints-api-generated.js +1 -1
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/operationParameterMap.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.193)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -40,6 +40,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
40
40
|
* [`snaptrade.connections.deleteConnection`](#snaptradeconnectionsdeleteconnection)
|
|
41
41
|
* [`snaptrade.connections.detailBrokerageAuthorization`](#snaptradeconnectionsdetailbrokerageauthorization)
|
|
42
42
|
* [`snaptrade.connections.disableBrokerageAuthorization`](#snaptradeconnectionsdisablebrokerageauthorization)
|
|
43
|
+
* [`snaptrade.connections.listBrokerageAuthorizationAccounts`](#snaptradeconnectionslistbrokerageauthorizationaccounts)
|
|
43
44
|
* [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
|
|
44
45
|
* [`snaptrade.connections.refreshBrokerageAuthorization`](#snaptradeconnectionsrefreshbrokerageauthorization)
|
|
45
46
|
* [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
|
|
@@ -519,7 +520,7 @@ defaults value is set to \"all\"
|
|
|
519
520
|
|
|
520
521
|
##### days: `number`<a id="days-number"></a>
|
|
521
522
|
|
|
522
|
-
Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
523
|
+
Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
523
524
|
|
|
524
525
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
525
526
|
|
|
@@ -707,14 +708,13 @@ const getUserHoldingsResponse =
|
|
|
707
708
|
|
|
708
709
|
|
|
709
710
|
### `snaptrade.accountInformation.listUserAccounts`<a id="snaptradeaccountinformationlistuseraccounts"></a>
|
|
711
|
+

|
|
712
|
+
|
|
713
|
+
**Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.**
|
|
710
714
|
|
|
711
715
|
Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
712
716
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
|
|
716
|
-
- If you do, real-time data can be fetched using the [update account details endpoint](/reference/Account%20Information/AccountInformation_getUserAccountDetails).
|
|
717
|
-
- If you don't, the data is cached and refreshed once a day. If you need real-time, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
717
|
+
This data is cached and only refreshed once a day, regardless of the customer's plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
718
718
|
|
|
719
719
|
|
|
720
720
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1116,6 +1116,49 @@ const disableBrokerageAuthorizationResponse =
|
|
|
1116
1116
|
---
|
|
1117
1117
|
|
|
1118
1118
|
|
|
1119
|
+
### `snaptrade.connections.listBrokerageAuthorizationAccounts`<a id="snaptradeconnectionslistbrokerageauthorizationaccounts"></a>
|
|
1120
|
+
|
|
1121
|
+
Returns all brokerage accounts that belong to the specified connection for the authenticated user.
|
|
1122
|
+
|
|
1123
|
+
On real-time plans, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call.
|
|
1124
|
+
|
|
1125
|
+
On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1126
|
+
|
|
1127
|
+
Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1131
|
+
|
|
1132
|
+
```typescript
|
|
1133
|
+
const listBrokerageAuthorizationAccountsResponse =
|
|
1134
|
+
await snaptrade.connections.listBrokerageAuthorizationAccounts({
|
|
1135
|
+
authorizationId: "87b24961-b51e-4db8-9226-f198f6518a89",
|
|
1136
|
+
userId: "snaptrade-user-123",
|
|
1137
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1138
|
+
});
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1142
|
+
|
|
1143
|
+
##### authorizationId: `string`<a id="authorizationid-string"></a>
|
|
1144
|
+
|
|
1145
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
1146
|
+
|
|
1147
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1148
|
+
|
|
1149
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1150
|
+
|
|
1151
|
+
[Account](./models/account.ts)
|
|
1152
|
+
|
|
1153
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1154
|
+
|
|
1155
|
+
`/authorizations/{authorizationId}/accounts` `GET`
|
|
1156
|
+
|
|
1157
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1158
|
+
|
|
1159
|
+
---
|
|
1160
|
+
|
|
1161
|
+
|
|
1119
1162
|
### `snaptrade.connections.listBrokerageAuthorizations`<a id="snaptradeconnectionslistbrokerageauthorizations"></a>
|
|
1120
1163
|
|
|
1121
1164
|
Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency.
|
|
@@ -1435,7 +1478,7 @@ defaults value is set to \"all\"
|
|
|
1435
1478
|
|
|
1436
1479
|
##### days: `number`<a id="days-number"></a>
|
|
1437
1480
|
|
|
1438
|
-
Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
1481
|
+
Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
1439
1482
|
|
|
1440
1483
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1441
1484
|
|
|
@@ -91,7 +91,7 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
91
91
|
* @param {string} userSecret
|
|
92
92
|
* @param {string} accountId
|
|
93
93
|
* @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
|
|
94
|
-
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
94
|
+
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
95
95
|
* @param {*} [options] Override http request option.
|
|
96
96
|
* @throws {RequiredError}
|
|
97
97
|
*/
|
|
@@ -139,11 +139,12 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
139
139
|
*/
|
|
140
140
|
getUserHoldings: (accountId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
141
141
|
/**
|
|
142
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
142
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
143
143
|
* @summary List accounts
|
|
144
144
|
* @param {string} userId
|
|
145
145
|
* @param {string} userSecret
|
|
146
146
|
* @param {*} [options] Override http request option.
|
|
147
|
+
* @deprecated
|
|
147
148
|
* @throws {RequiredError}
|
|
148
149
|
*/
|
|
149
150
|
listUserAccounts: (userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
@@ -253,10 +254,11 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
253
254
|
*/
|
|
254
255
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldingsAccount>>;
|
|
255
256
|
/**
|
|
256
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
257
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
257
258
|
* @summary List accounts
|
|
258
259
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
259
260
|
* @param {*} [options] Override http request option.
|
|
261
|
+
* @deprecated
|
|
260
262
|
* @throws {RequiredError}
|
|
261
263
|
*/
|
|
262
264
|
listUserAccounts(requestParameters: AccountInformationApiListUserAccountsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Account>>>;
|
|
@@ -364,10 +366,11 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
364
366
|
*/
|
|
365
367
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldingsAccount>;
|
|
366
368
|
/**
|
|
367
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
369
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
368
370
|
* @summary List accounts
|
|
369
371
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
370
372
|
* @param {*} [options] Override http request option.
|
|
373
|
+
* @deprecated
|
|
371
374
|
* @throws {RequiredError}
|
|
372
375
|
*/
|
|
373
376
|
listUserAccounts(requestParameters: AccountInformationApiListUserAccountsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<Account>>;
|
|
@@ -591,7 +594,7 @@ export type AccountInformationApiGetUserAccountOrdersRequest = {
|
|
|
591
594
|
*/
|
|
592
595
|
readonly state?: 'all' | 'open' | 'executed';
|
|
593
596
|
/**
|
|
594
|
-
* Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
597
|
+
* Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
595
598
|
* @type {number}
|
|
596
599
|
* @memberof AccountInformationApiGetUserAccountOrders
|
|
597
600
|
*/
|
|
@@ -861,10 +864,11 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
861
864
|
*/
|
|
862
865
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountHoldingsAccount, any, {}>>;
|
|
863
866
|
/**
|
|
864
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
867
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
865
868
|
* @summary List accounts
|
|
866
869
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
867
870
|
* @param {*} [options] Override http request option.
|
|
871
|
+
* @deprecated
|
|
868
872
|
* @throws {RequiredError}
|
|
869
873
|
* @memberof AccountInformationApiGenerated
|
|
870
874
|
*/
|
|
@@ -403,7 +403,7 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
403
403
|
* @param {string} userSecret
|
|
404
404
|
* @param {string} accountId
|
|
405
405
|
* @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
|
|
406
|
-
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
406
|
+
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
407
407
|
* @param {*} [options] Override http request option.
|
|
408
408
|
* @throws {RequiredError}
|
|
409
409
|
*/
|
|
@@ -688,11 +688,12 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
688
688
|
};
|
|
689
689
|
}),
|
|
690
690
|
/**
|
|
691
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
691
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
692
692
|
* @summary List accounts
|
|
693
693
|
* @param {string} userId
|
|
694
694
|
* @param {string} userSecret
|
|
695
695
|
* @param {*} [options] Override http request option.
|
|
696
|
+
* @deprecated
|
|
696
697
|
* @throws {RequiredError}
|
|
697
698
|
*/
|
|
698
699
|
listUserAccounts: (userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -951,10 +952,11 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
951
952
|
});
|
|
952
953
|
},
|
|
953
954
|
/**
|
|
954
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
955
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
955
956
|
* @summary List accounts
|
|
956
957
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
957
958
|
* @param {*} [options] Override http request option.
|
|
959
|
+
* @deprecated
|
|
958
960
|
* @throws {RequiredError}
|
|
959
961
|
*/
|
|
960
962
|
listUserAccounts(requestParameters, options) {
|
|
@@ -1098,10 +1100,11 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
1098
1100
|
return localVarFp.getUserHoldings(requestParameters, options).then((request) => request(axios, basePath));
|
|
1099
1101
|
},
|
|
1100
1102
|
/**
|
|
1101
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
1103
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1102
1104
|
* @summary List accounts
|
|
1103
1105
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
1104
1106
|
* @param {*} [options] Override http request option.
|
|
1107
|
+
* @deprecated
|
|
1105
1108
|
* @throws {RequiredError}
|
|
1106
1109
|
*/
|
|
1107
1110
|
listUserAccounts(requestParameters, options) {
|
|
@@ -1250,10 +1253,11 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1250
1253
|
return (0, exports.AccountInformationApiFp)(this.configuration).getUserHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1251
1254
|
}
|
|
1252
1255
|
/**
|
|
1253
|
-
* Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
|
|
1256
|
+
* **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This data is cached and only refreshed once a day, regardless of the customer\'s plan. To get real-time data on a real-time plan, use the connection-scoped endpoint linked above. Customers on delayed plans can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
1254
1257
|
* @summary List accounts
|
|
1255
1258
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
1256
1259
|
* @param {*} [options] Override http request option.
|
|
1260
|
+
* @deprecated
|
|
1257
1261
|
* @throws {RequiredError}
|
|
1258
1262
|
* @memberof AccountInformationApiGenerated
|
|
1259
1263
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestArgs, BaseAPI } from '../base';
|
|
4
|
+
import { Account } from '../models';
|
|
4
5
|
import { BrokerageAuthorization } from '../models';
|
|
5
6
|
import { BrokerageAuthorizationDisabledConfirmation } from '../models';
|
|
6
7
|
import { BrokerageAuthorizationRefreshConfirmation } from '../models';
|
|
@@ -42,6 +43,16 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
|
|
|
42
43
|
* @throws {RequiredError}
|
|
43
44
|
*/
|
|
44
45
|
disableBrokerageAuthorization: (authorizationId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
48
|
+
* @summary List accounts for a connection
|
|
49
|
+
* @param {string} authorizationId
|
|
50
|
+
* @param {string} userId
|
|
51
|
+
* @param {string} userSecret
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
*/
|
|
55
|
+
listBrokerageAuthorizationAccounts: (authorizationId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
45
56
|
/**
|
|
46
57
|
* Returns a list of all connections for the specified user. 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.
|
|
47
58
|
* @summary List all connections
|
|
@@ -122,6 +133,14 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
|
122
133
|
* @throws {RequiredError}
|
|
123
134
|
*/
|
|
124
135
|
disableBrokerageAuthorization(requestParameters: ConnectionsApiDisableBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BrokerageAuthorizationDisabledConfirmation>>;
|
|
136
|
+
/**
|
|
137
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
138
|
+
* @summary List accounts for a connection
|
|
139
|
+
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
140
|
+
* @param {*} [options] Override http request option.
|
|
141
|
+
* @throws {RequiredError}
|
|
142
|
+
*/
|
|
143
|
+
listBrokerageAuthorizationAccounts(requestParameters: ConnectionsApiListBrokerageAuthorizationAccountsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Account>>>;
|
|
125
144
|
/**
|
|
126
145
|
* Returns a list of all connections for the specified user. 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.
|
|
127
146
|
* @summary List all connections
|
|
@@ -192,6 +211,14 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
|
|
|
192
211
|
* @throws {RequiredError}
|
|
193
212
|
*/
|
|
194
213
|
disableBrokerageAuthorization(requestParameters: ConnectionsApiDisableBrokerageAuthorizationRequest, options?: AxiosRequestConfig): AxiosPromise<BrokerageAuthorizationDisabledConfirmation>;
|
|
214
|
+
/**
|
|
215
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
216
|
+
* @summary List accounts for a connection
|
|
217
|
+
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
218
|
+
* @param {*} [options] Override http request option.
|
|
219
|
+
* @throws {RequiredError}
|
|
220
|
+
*/
|
|
221
|
+
listBrokerageAuthorizationAccounts(requestParameters: ConnectionsApiListBrokerageAuthorizationAccountsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<Account>>;
|
|
195
222
|
/**
|
|
196
223
|
* Returns a list of all connections for the specified user. 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.
|
|
197
224
|
* @summary List all connections
|
|
@@ -308,6 +335,31 @@ export type ConnectionsApiDisableBrokerageAuthorizationRequest = {
|
|
|
308
335
|
*/
|
|
309
336
|
readonly userSecret: string;
|
|
310
337
|
};
|
|
338
|
+
/**
|
|
339
|
+
* Request parameters for listBrokerageAuthorizationAccounts operation in ConnectionsApi.
|
|
340
|
+
* @export
|
|
341
|
+
* @interface ConnectionsApiListBrokerageAuthorizationAccountsRequest
|
|
342
|
+
*/
|
|
343
|
+
export type ConnectionsApiListBrokerageAuthorizationAccountsRequest = {
|
|
344
|
+
/**
|
|
345
|
+
*
|
|
346
|
+
* @type {string}
|
|
347
|
+
* @memberof ConnectionsApiListBrokerageAuthorizationAccounts
|
|
348
|
+
*/
|
|
349
|
+
readonly authorizationId: string;
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* @type {string}
|
|
353
|
+
* @memberof ConnectionsApiListBrokerageAuthorizationAccounts
|
|
354
|
+
*/
|
|
355
|
+
readonly userId: string;
|
|
356
|
+
/**
|
|
357
|
+
*
|
|
358
|
+
* @type {string}
|
|
359
|
+
* @memberof ConnectionsApiListBrokerageAuthorizationAccounts
|
|
360
|
+
*/
|
|
361
|
+
readonly userSecret: string;
|
|
362
|
+
};
|
|
311
363
|
/**
|
|
312
364
|
* Request parameters for listBrokerageAuthorizations operation in ConnectionsApi.
|
|
313
365
|
* @export
|
|
@@ -467,6 +519,15 @@ export declare class ConnectionsApiGenerated extends BaseAPI {
|
|
|
467
519
|
* @memberof ConnectionsApiGenerated
|
|
468
520
|
*/
|
|
469
521
|
disableBrokerageAuthorization(requestParameters: ConnectionsApiDisableBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageAuthorizationDisabledConfirmation, any, {}>>;
|
|
522
|
+
/**
|
|
523
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
524
|
+
* @summary List accounts for a connection
|
|
525
|
+
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
* @memberof ConnectionsApiGenerated
|
|
529
|
+
*/
|
|
530
|
+
listBrokerageAuthorizationAccounts(requestParameters: ConnectionsApiListBrokerageAuthorizationAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Account[], any, {}>>;
|
|
470
531
|
/**
|
|
471
532
|
* Returns a list of all connections for the specified user. 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.
|
|
472
533
|
* @summary List all connections
|
|
@@ -200,6 +200,61 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
|
|
|
200
200
|
options: localVarRequestOptions,
|
|
201
201
|
};
|
|
202
202
|
}),
|
|
203
|
+
/**
|
|
204
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
205
|
+
* @summary List accounts for a connection
|
|
206
|
+
* @param {string} authorizationId
|
|
207
|
+
* @param {string} userId
|
|
208
|
+
* @param {string} userSecret
|
|
209
|
+
* @param {*} [options] Override http request option.
|
|
210
|
+
* @throws {RequiredError}
|
|
211
|
+
*/
|
|
212
|
+
listBrokerageAuthorizationAccounts: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
// verify required parameter 'authorizationId' is not null or undefined
|
|
214
|
+
(0, common_1.assertParamExists)('listBrokerageAuthorizationAccounts', 'authorizationId', authorizationId);
|
|
215
|
+
// verify required parameter 'userId' is not null or undefined
|
|
216
|
+
(0, common_1.assertParamExists)('listBrokerageAuthorizationAccounts', 'userId', userId);
|
|
217
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
218
|
+
(0, common_1.assertParamExists)('listBrokerageAuthorizationAccounts', 'userSecret', userSecret);
|
|
219
|
+
const localVarPath = `/authorizations/{authorizationId}/accounts`
|
|
220
|
+
.replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
|
|
221
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
222
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
223
|
+
let baseOptions;
|
|
224
|
+
if (configuration) {
|
|
225
|
+
baseOptions = configuration.baseOptions;
|
|
226
|
+
}
|
|
227
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
228
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
229
|
+
const localVarQueryParameter = {};
|
|
230
|
+
// authentication PartnerClientId required
|
|
231
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
232
|
+
// authentication PartnerSignature required
|
|
233
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
234
|
+
// authentication PartnerTimestamp required
|
|
235
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
236
|
+
if (userId !== undefined) {
|
|
237
|
+
localVarQueryParameter['userId'] = userId;
|
|
238
|
+
}
|
|
239
|
+
if (userSecret !== undefined) {
|
|
240
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
241
|
+
}
|
|
242
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
243
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
244
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
245
|
+
queryParameters: localVarQueryParameter,
|
|
246
|
+
requestConfig: localVarRequestOptions,
|
|
247
|
+
path: localVarPath,
|
|
248
|
+
configuration,
|
|
249
|
+
pathTemplate: '/authorizations/{authorizationId}/accounts',
|
|
250
|
+
httpMethod: 'GET'
|
|
251
|
+
});
|
|
252
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
253
|
+
return {
|
|
254
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
255
|
+
options: localVarRequestOptions,
|
|
256
|
+
};
|
|
257
|
+
}),
|
|
203
258
|
/**
|
|
204
259
|
* Returns a list of all connections for the specified user. 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.
|
|
205
260
|
* @summary List all connections
|
|
@@ -522,6 +577,19 @@ const ConnectionsApiFp = function (configuration) {
|
|
|
522
577
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
523
578
|
});
|
|
524
579
|
},
|
|
580
|
+
/**
|
|
581
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
582
|
+
* @summary List accounts for a connection
|
|
583
|
+
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
584
|
+
* @param {*} [options] Override http request option.
|
|
585
|
+
* @throws {RequiredError}
|
|
586
|
+
*/
|
|
587
|
+
listBrokerageAuthorizationAccounts(requestParameters, options) {
|
|
588
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
589
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listBrokerageAuthorizationAccounts(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
|
|
590
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
591
|
+
});
|
|
592
|
+
},
|
|
525
593
|
/**
|
|
526
594
|
* Returns a list of all connections for the specified user. 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.
|
|
527
595
|
* @summary List all connections
|
|
@@ -627,6 +695,16 @@ const ConnectionsApiFactory = function (configuration, basePath, axios) {
|
|
|
627
695
|
disableBrokerageAuthorization(requestParameters, options) {
|
|
628
696
|
return localVarFp.disableBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
|
|
629
697
|
},
|
|
698
|
+
/**
|
|
699
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
700
|
+
* @summary List accounts for a connection
|
|
701
|
+
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
702
|
+
* @param {*} [options] Override http request option.
|
|
703
|
+
* @throws {RequiredError}
|
|
704
|
+
*/
|
|
705
|
+
listBrokerageAuthorizationAccounts(requestParameters, options) {
|
|
706
|
+
return localVarFp.listBrokerageAuthorizationAccounts(requestParameters, options).then((request) => request(axios, basePath));
|
|
707
|
+
},
|
|
630
708
|
/**
|
|
631
709
|
* Returns a list of all connections for the specified user. 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.
|
|
632
710
|
* @summary List all connections
|
|
@@ -720,6 +798,17 @@ class ConnectionsApiGenerated extends base_1.BaseAPI {
|
|
|
720
798
|
disableBrokerageAuthorization(requestParameters, options) {
|
|
721
799
|
return (0, exports.ConnectionsApiFp)(this.configuration).disableBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
722
800
|
}
|
|
801
|
+
/**
|
|
802
|
+
* Returns all brokerage accounts that belong to the specified connection for the authenticated user. On real-time plans, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On delayed plans, this endpoint returns cached data that is refreshed once a day. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
|
|
803
|
+
* @summary List accounts for a connection
|
|
804
|
+
* @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
|
|
805
|
+
* @param {*} [options] Override http request option.
|
|
806
|
+
* @throws {RequiredError}
|
|
807
|
+
* @memberof ConnectionsApiGenerated
|
|
808
|
+
*/
|
|
809
|
+
listBrokerageAuthorizationAccounts(requestParameters, options) {
|
|
810
|
+
return (0, exports.ConnectionsApiFp)(this.configuration).listBrokerageAuthorizationAccounts(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
811
|
+
}
|
|
723
812
|
/**
|
|
724
813
|
* Returns a list of all connections for the specified user. 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.
|
|
725
814
|
* @summary List all connections
|
|
@@ -38,7 +38,7 @@ export declare const ExperimentalEndpointsApiAxiosParamCreator: (configuration?:
|
|
|
38
38
|
* @param {string} userSecret
|
|
39
39
|
* @param {string} accountId
|
|
40
40
|
* @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
|
|
41
|
-
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
41
|
+
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
42
42
|
* @param {*} [options] Override http request option.
|
|
43
43
|
* @throws {RequiredError}
|
|
44
44
|
*/
|
|
@@ -244,7 +244,7 @@ export type ExperimentalEndpointsApiGetUserAccountOrdersV2Request = {
|
|
|
244
244
|
*/
|
|
245
245
|
readonly state?: 'all' | 'open' | 'executed';
|
|
246
246
|
/**
|
|
247
|
-
* Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
247
|
+
* Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
248
248
|
* @type {number}
|
|
249
249
|
* @memberof ExperimentalEndpointsApiGetUserAccountOrdersV2
|
|
250
250
|
*/
|
|
@@ -156,7 +156,7 @@ const ExperimentalEndpointsApiAxiosParamCreator = function (configuration) {
|
|
|
156
156
|
* @param {string} userSecret
|
|
157
157
|
* @param {string} accountId
|
|
158
158
|
* @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
|
|
159
|
-
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
|
|
159
|
+
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
160
160
|
* @param {*} [options] Override http request option.
|
|
161
161
|
* @throws {RequiredError}
|
|
162
162
|
*/
|