snaptrade-typescript-sdk 9.0.34 → 9.0.35
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 +25 -20
- package/dist/api/account-information-api-generated.d.ts +40 -40
- package/dist/api/account-information-api-generated.js +36 -36
- package/dist/api/options-api-generated.d.ts +10 -10
- package/dist/api/options-api-generated.js +9 -9
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-balance-total.d.ts +1 -1
- package/dist/models/account-holdings-account.d.ts +3 -3
- package/dist/models/account-sync-status.d.ts +1 -1
- package/dist/models/account.d.ts +12 -10
- package/dist/models/balance-currency.d.ts +25 -0
- package/dist/models/balance.d.ts +3 -3
- package/dist/models/holdings-status.d.ts +4 -4
- package/dist/models/index.d.ts +1 -3
- package/dist/models/index.js +1 -3
- package/dist/models/transactions-status.d.ts +6 -6
- package/package.json +1 -1
- package/dist/models/amount.d.ts +0 -19
- package/dist/models/snap-trade-holdings-account-account-id-balance.d.ts +0 -14
- package/dist/models/snap-trade-holdings-account-account-id-balance.js +0 -2
- package/dist/models/snap-trade-holdings-account-account-id.d.ts +0 -74
- package/dist/models/snap-trade-holdings-account-account-id.js +0 -2
- /package/dist/models/{amount.js → balance-currency.js} +0 -0
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.35)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -222,7 +222,10 @@ Optional. Comma seperated list of authorization IDs (only use if filtering is ne
|
|
|
222
222
|
|
|
223
223
|
### `snaptrade.accountInformation.getUserAccountBalance`<a id="snaptradeaccountinformationgetuseraccountbalance"></a>
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).
|
|
226
|
+
|
|
227
|
+
The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
228
|
+
|
|
226
229
|
|
|
227
230
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
228
231
|
|
|
@@ -243,8 +246,6 @@ const getUserAccountBalanceResponse =
|
|
|
243
246
|
|
|
244
247
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
245
248
|
|
|
246
|
-
The ID of the account to get balances.
|
|
247
|
-
|
|
248
249
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
249
250
|
|
|
250
251
|
[Balance](./models/balance.ts)
|
|
@@ -260,8 +261,9 @@ The ID of the account to get balances.
|
|
|
260
261
|
|
|
261
262
|
### `snaptrade.accountInformation.getUserAccountDetails`<a id="snaptradeaccountinformationgetuseraccountdetails"></a>
|
|
262
263
|
|
|
263
|
-
Returns
|
|
264
|
-
|
|
264
|
+
Returns account detail known to SnapTrade for the specified account.
|
|
265
|
+
|
|
266
|
+
The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
265
267
|
|
|
266
268
|
|
|
267
269
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -283,8 +285,6 @@ const getUserAccountDetailsResponse =
|
|
|
283
285
|
|
|
284
286
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
285
287
|
|
|
286
|
-
The ID of the account to get detail of.
|
|
287
|
-
|
|
288
288
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
289
289
|
|
|
290
290
|
[Account](./models/account.ts)
|
|
@@ -300,7 +300,10 @@ The ID of the account to get detail of.
|
|
|
300
300
|
|
|
301
301
|
### `snaptrade.accountInformation.getUserAccountOrders`<a id="snaptradeaccountinformationgetuseraccountorders"></a>
|
|
302
302
|
|
|
303
|
-
|
|
303
|
+
Returns a list of recent orders in the specified account.
|
|
304
|
+
|
|
305
|
+
The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
306
|
+
|
|
304
307
|
|
|
305
308
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
306
309
|
|
|
@@ -323,8 +326,6 @@ const getUserAccountOrdersResponse =
|
|
|
323
326
|
|
|
324
327
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
325
328
|
|
|
326
|
-
The ID of the account to get orders.
|
|
327
|
-
|
|
328
329
|
##### state: `'all' | 'open' | 'executed'`<a id="state-all--open--executed"></a>
|
|
329
330
|
|
|
330
331
|
defaults value is set to \"all\"
|
|
@@ -348,7 +349,10 @@ Number of days in the past to fetch the most recent orders. Defaults to the last
|
|
|
348
349
|
|
|
349
350
|
### `snaptrade.accountInformation.getUserAccountPositions`<a id="snaptradeaccountinformationgetuseraccountpositions"></a>
|
|
350
351
|
|
|
351
|
-
Returns a list of positions in the specified account.
|
|
352
|
+
Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).
|
|
353
|
+
|
|
354
|
+
The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
355
|
+
|
|
352
356
|
|
|
353
357
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
354
358
|
|
|
@@ -369,8 +373,6 @@ const getUserAccountPositionsResponse =
|
|
|
369
373
|
|
|
370
374
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
371
375
|
|
|
372
|
-
The ID of the account to get positions.
|
|
373
|
-
|
|
374
376
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
375
377
|
|
|
376
378
|
[Position](./models/position.ts)
|
|
@@ -386,7 +388,7 @@ The ID of the account to get positions.
|
|
|
386
388
|
|
|
387
389
|
### `snaptrade.accountInformation.getUserHoldings`<a id="snaptradeaccountinformationgetuserholdings"></a>
|
|
388
390
|
|
|
389
|
-
|
|
391
|
+
Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
|
|
390
392
|
|
|
391
393
|
The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
392
394
|
|
|
@@ -425,7 +427,10 @@ const getUserHoldingsResponse =
|
|
|
425
427
|
|
|
426
428
|
### `snaptrade.accountInformation.listUserAccounts`<a id="snaptradeaccountinformationlistuseraccounts"></a>
|
|
427
429
|
|
|
428
|
-
|
|
430
|
+
Returns all brokerage accounts known to SnapTrade for the authenticated user.
|
|
431
|
+
|
|
432
|
+
The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
433
|
+
|
|
429
434
|
|
|
430
435
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
431
436
|
|
|
@@ -1066,7 +1071,9 @@ Option strategy id obtained from response when creating option strategy object
|
|
|
1066
1071
|
|
|
1067
1072
|
### `snaptrade.options.listOptionHoldings`<a id="snaptradeoptionslistoptionholdings"></a>
|
|
1068
1073
|
|
|
1069
|
-
Returns a list of
|
|
1074
|
+
Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions).
|
|
1075
|
+
|
|
1076
|
+
The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
1070
1077
|
|
|
1071
1078
|
|
|
1072
1079
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1075,7 +1082,7 @@ Returns a list of Options Positions.
|
|
|
1075
1082
|
const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({
|
|
1076
1083
|
userId: "snaptrade-user-123",
|
|
1077
1084
|
userSecret: "USERSECRET123",
|
|
1078
|
-
accountId: "
|
|
1085
|
+
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1079
1086
|
});
|
|
1080
1087
|
```
|
|
1081
1088
|
|
|
@@ -1087,8 +1094,6 @@ const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({
|
|
|
1087
1094
|
|
|
1088
1095
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
1089
1096
|
|
|
1090
|
-
The ID of the account to fetch options holdings for.
|
|
1091
|
-
|
|
1092
1097
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1093
1098
|
|
|
1094
1099
|
[OptionsPosition](./models/options-position.ts)
|
|
@@ -24,31 +24,31 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
24
24
|
*/
|
|
25
25
|
getAllUserHoldings: (userId: string, userSecret: string, brokerageAuthorizations?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
28
28
|
* @summary List account balances
|
|
29
29
|
* @param {string} userId
|
|
30
30
|
* @param {string} userSecret
|
|
31
|
-
* @param {string} accountId
|
|
31
|
+
* @param {string} accountId
|
|
32
32
|
* @param {*} [options] Override http request option.
|
|
33
33
|
* @throws {RequiredError}
|
|
34
34
|
*/
|
|
35
35
|
getUserAccountBalance: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
36
|
/**
|
|
37
|
-
* Returns
|
|
38
|
-
* @summary
|
|
37
|
+
* Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
38
|
+
* @summary Get account detail
|
|
39
39
|
* @param {string} userId
|
|
40
40
|
* @param {string} userSecret
|
|
41
|
-
* @param {string} accountId
|
|
41
|
+
* @param {string} accountId
|
|
42
42
|
* @param {*} [options] Override http request option.
|
|
43
43
|
* @throws {RequiredError}
|
|
44
44
|
*/
|
|
45
45
|
getUserAccountDetails: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @summary List account orders
|
|
47
|
+
* Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
48
|
+
* @summary List account recent orders
|
|
49
49
|
* @param {string} userId
|
|
50
50
|
* @param {string} userSecret
|
|
51
|
-
* @param {string} accountId
|
|
51
|
+
* @param {string} accountId
|
|
52
52
|
* @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
|
|
53
53
|
* @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.
|
|
54
54
|
* @param {*} [options] Override http request option.
|
|
@@ -56,17 +56,17 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
56
56
|
*/
|
|
57
57
|
getUserAccountOrders: (userId: string, userSecret: string, accountId: string, state?: 'all' | 'open' | 'executed', days?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
58
58
|
/**
|
|
59
|
-
* Returns a list of positions in the specified account.
|
|
59
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
60
60
|
* @summary List account positions
|
|
61
61
|
* @param {string} userId
|
|
62
62
|
* @param {string} userSecret
|
|
63
|
-
* @param {string} accountId
|
|
63
|
+
* @param {string} accountId
|
|
64
64
|
* @param {*} [options] Override http request option.
|
|
65
65
|
* @throws {RequiredError}
|
|
66
66
|
*/
|
|
67
67
|
getUserAccountPositions: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
70
70
|
* @summary List account holdings
|
|
71
71
|
* @param {string} accountId
|
|
72
72
|
* @param {string} userId
|
|
@@ -76,7 +76,7 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
76
76
|
*/
|
|
77
77
|
getUserHoldings: (accountId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
80
80
|
* @summary List accounts
|
|
81
81
|
* @param {string} userId
|
|
82
82
|
* @param {string} userSecret
|
|
@@ -110,7 +110,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
110
110
|
*/
|
|
111
111
|
getAllUserHoldings(requestParameters: AccountInformationApiGetAllUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AccountHoldings>>>;
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
114
114
|
* @summary List account balances
|
|
115
115
|
* @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
|
|
116
116
|
* @param {*} [options] Override http request option.
|
|
@@ -118,23 +118,23 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
118
118
|
*/
|
|
119
119
|
getUserAccountBalance(requestParameters: AccountInformationApiGetUserAccountBalanceRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Balance>>>;
|
|
120
120
|
/**
|
|
121
|
-
* Returns
|
|
122
|
-
* @summary
|
|
121
|
+
* Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
122
|
+
* @summary Get account detail
|
|
123
123
|
* @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
|
|
124
124
|
* @param {*} [options] Override http request option.
|
|
125
125
|
* @throws {RequiredError}
|
|
126
126
|
*/
|
|
127
127
|
getUserAccountDetails(requestParameters: AccountInformationApiGetUserAccountDetailsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Account>>;
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @summary List account orders
|
|
129
|
+
* Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
130
|
+
* @summary List account recent orders
|
|
131
131
|
* @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
|
|
132
132
|
* @param {*} [options] Override http request option.
|
|
133
133
|
* @throws {RequiredError}
|
|
134
134
|
*/
|
|
135
135
|
getUserAccountOrders(requestParameters: AccountInformationApiGetUserAccountOrdersRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AccountOrderRecord>>>;
|
|
136
136
|
/**
|
|
137
|
-
* Returns a list of positions in the specified account.
|
|
137
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
138
138
|
* @summary List account positions
|
|
139
139
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
140
140
|
* @param {*} [options] Override http request option.
|
|
@@ -142,7 +142,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
142
142
|
*/
|
|
143
143
|
getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Position>>>;
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
145
|
+
* Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
146
146
|
* @summary List account holdings
|
|
147
147
|
* @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
|
|
148
148
|
* @param {*} [options] Override http request option.
|
|
@@ -150,7 +150,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
150
150
|
*/
|
|
151
151
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldingsAccount>>;
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
153
|
+
* Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
154
154
|
* @summary List accounts
|
|
155
155
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
156
156
|
* @param {*} [options] Override http request option.
|
|
@@ -181,7 +181,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
181
181
|
*/
|
|
182
182
|
getAllUserHoldings(requestParameters: AccountInformationApiGetAllUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<AccountHoldings>>;
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
185
185
|
* @summary List account balances
|
|
186
186
|
* @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
|
|
187
187
|
* @param {*} [options] Override http request option.
|
|
@@ -189,23 +189,23 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
189
189
|
*/
|
|
190
190
|
getUserAccountBalance(requestParameters: AccountInformationApiGetUserAccountBalanceRequest, options?: AxiosRequestConfig): AxiosPromise<Array<Balance>>;
|
|
191
191
|
/**
|
|
192
|
-
* Returns
|
|
193
|
-
* @summary
|
|
192
|
+
* Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
193
|
+
* @summary Get account detail
|
|
194
194
|
* @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
|
|
195
195
|
* @param {*} [options] Override http request option.
|
|
196
196
|
* @throws {RequiredError}
|
|
197
197
|
*/
|
|
198
198
|
getUserAccountDetails(requestParameters: AccountInformationApiGetUserAccountDetailsRequest, options?: AxiosRequestConfig): AxiosPromise<Account>;
|
|
199
199
|
/**
|
|
200
|
-
*
|
|
201
|
-
* @summary List account orders
|
|
200
|
+
* Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
201
|
+
* @summary List account recent orders
|
|
202
202
|
* @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
|
|
203
203
|
* @param {*} [options] Override http request option.
|
|
204
204
|
* @throws {RequiredError}
|
|
205
205
|
*/
|
|
206
206
|
getUserAccountOrders(requestParameters: AccountInformationApiGetUserAccountOrdersRequest, options?: AxiosRequestConfig): AxiosPromise<Array<AccountOrderRecord>>;
|
|
207
207
|
/**
|
|
208
|
-
* Returns a list of positions in the specified account.
|
|
208
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
209
209
|
* @summary List account positions
|
|
210
210
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
211
211
|
* @param {*} [options] Override http request option.
|
|
@@ -213,7 +213,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
213
213
|
*/
|
|
214
214
|
getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<Position>>;
|
|
215
215
|
/**
|
|
216
|
-
*
|
|
216
|
+
* Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
217
217
|
* @summary List account holdings
|
|
218
218
|
* @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
|
|
219
219
|
* @param {*} [options] Override http request option.
|
|
@@ -221,7 +221,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
221
221
|
*/
|
|
222
222
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldingsAccount>;
|
|
223
223
|
/**
|
|
224
|
-
*
|
|
224
|
+
* Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
225
225
|
* @summary List accounts
|
|
226
226
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
227
227
|
* @param {*} [options] Override http request option.
|
|
@@ -281,7 +281,7 @@ export type AccountInformationApiGetUserAccountBalanceRequest = {
|
|
|
281
281
|
*/
|
|
282
282
|
readonly userSecret: string;
|
|
283
283
|
/**
|
|
284
|
-
*
|
|
284
|
+
*
|
|
285
285
|
* @type {string}
|
|
286
286
|
* @memberof AccountInformationApiGetUserAccountBalance
|
|
287
287
|
*/
|
|
@@ -306,7 +306,7 @@ export type AccountInformationApiGetUserAccountDetailsRequest = {
|
|
|
306
306
|
*/
|
|
307
307
|
readonly userSecret: string;
|
|
308
308
|
/**
|
|
309
|
-
*
|
|
309
|
+
*
|
|
310
310
|
* @type {string}
|
|
311
311
|
* @memberof AccountInformationApiGetUserAccountDetails
|
|
312
312
|
*/
|
|
@@ -331,7 +331,7 @@ export type AccountInformationApiGetUserAccountOrdersRequest = {
|
|
|
331
331
|
*/
|
|
332
332
|
readonly userSecret: string;
|
|
333
333
|
/**
|
|
334
|
-
*
|
|
334
|
+
*
|
|
335
335
|
* @type {string}
|
|
336
336
|
* @memberof AccountInformationApiGetUserAccountOrders
|
|
337
337
|
*/
|
|
@@ -368,7 +368,7 @@ export type AccountInformationApiGetUserAccountPositionsRequest = {
|
|
|
368
368
|
*/
|
|
369
369
|
readonly userSecret: string;
|
|
370
370
|
/**
|
|
371
|
-
*
|
|
371
|
+
*
|
|
372
372
|
* @type {string}
|
|
373
373
|
* @memberof AccountInformationApiGetUserAccountPositions
|
|
374
374
|
*/
|
|
@@ -461,7 +461,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
461
461
|
*/
|
|
462
462
|
getAllUserHoldings(requestParameters: AccountInformationApiGetAllUserHoldingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountHoldings[], any>>;
|
|
463
463
|
/**
|
|
464
|
-
*
|
|
464
|
+
* Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
465
465
|
* @summary List account balances
|
|
466
466
|
* @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
|
|
467
467
|
* @param {*} [options] Override http request option.
|
|
@@ -470,8 +470,8 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
470
470
|
*/
|
|
471
471
|
getUserAccountBalance(requestParameters: AccountInformationApiGetUserAccountBalanceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Balance[], any>>;
|
|
472
472
|
/**
|
|
473
|
-
* Returns
|
|
474
|
-
* @summary
|
|
473
|
+
* Returns account detail known to SnapTrade for the specified account. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
474
|
+
* @summary Get account detail
|
|
475
475
|
* @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
|
|
476
476
|
* @param {*} [options] Override http request option.
|
|
477
477
|
* @throws {RequiredError}
|
|
@@ -479,8 +479,8 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
479
479
|
*/
|
|
480
480
|
getUserAccountDetails(requestParameters: AccountInformationApiGetUserAccountDetailsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Account, any>>;
|
|
481
481
|
/**
|
|
482
|
-
*
|
|
483
|
-
* @summary List account orders
|
|
482
|
+
* Returns a list of recent orders in the specified account. The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
483
|
+
* @summary List account recent orders
|
|
484
484
|
* @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
|
|
485
485
|
* @param {*} [options] Override http request option.
|
|
486
486
|
* @throws {RequiredError}
|
|
@@ -488,7 +488,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
488
488
|
*/
|
|
489
489
|
getUserAccountOrders(requestParameters: AccountInformationApiGetUserAccountOrdersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord[], any>>;
|
|
490
490
|
/**
|
|
491
|
-
* Returns a list of positions in the specified account.
|
|
491
|
+
* Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
492
492
|
* @summary List account positions
|
|
493
493
|
* @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
|
|
494
494
|
* @param {*} [options] Override http request option.
|
|
@@ -497,7 +497,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
497
497
|
*/
|
|
498
498
|
getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Position[], any>>;
|
|
499
499
|
/**
|
|
500
|
-
*
|
|
500
|
+
* Returns a list of balances, positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__ The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
501
501
|
* @summary List account holdings
|
|
502
502
|
* @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
|
|
503
503
|
* @param {*} [options] Override http request option.
|
|
@@ -506,7 +506,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
506
506
|
*/
|
|
507
507
|
getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountHoldingsAccount, any>>;
|
|
508
508
|
/**
|
|
509
|
-
*
|
|
509
|
+
* Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
|
|
510
510
|
* @summary List accounts
|
|
511
511
|
* @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
|
|
512
512
|
* @param {*} [options] Override http request option.
|