snaptrade-typescript-sdk 9.0.76 → 9.0.78

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 CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect brokerage accounts to your app for live positions and trading
8
8
 
9
- [![npm](https://img.shields.io/badge/npm-v9.0.76-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.76)
9
+ [![npm](https://img.shields.io/badge/npm-v9.0.78-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.78)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -183,9 +183,11 @@ main();
183
183
 
184
184
  ### `snaptrade.accountInformation.getAccountActivities`<a id="snaptradeaccountinformationgetaccountactivities"></a>
185
185
 
186
- Returns all historical transactions for the specified account. It's recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request.
186
+ Returns all historical transactions for the specified account.
187
187
 
188
- There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order.
188
+ This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options.
189
+
190
+ Transaction are returned in reverse chronological order, using the `trade_date` field.
189
191
 
190
192
  The data returned here is always cached and refreshed once a day.
191
193
 
@@ -220,13 +222,21 @@ The start date (inclusive) of the transaction history to retrieve. If not provid
220
222
 
221
223
  The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
222
224
 
225
+ ##### offset: `number`<a id="offset-number"></a>
226
+
227
+ An integer that specifies the starting point of the paginated results. Default is 0.
228
+
229
+ ##### limit: `number`<a id="limit-number"></a>
230
+
231
+ An integer that specifies the maximum number of transactions to return. Default of 1000.
232
+
223
233
  ##### type: `string`<a id="type-string"></a>
224
234
 
225
235
  Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
226
236
 
227
237
  #### 🔄 Return<a id="🔄-return"></a>
228
238
 
229
- [UniversalActivity](./models/universal-activity.ts)
239
+ [PaginatedUniversalActivity](./models/paginated-universal-activity.ts)
230
240
 
231
241
  #### 🌐 Endpoint<a id="🌐-endpoint"></a>
232
242
 
@@ -6,28 +6,30 @@ import { AccountHoldings } from '../models';
6
6
  import { AccountHoldingsAccount } from '../models';
7
7
  import { AccountOrderRecord } from '../models';
8
8
  import { Balance } from '../models';
9
+ import { PaginatedUniversalActivity } from '../models';
9
10
  import { Position } from '../models';
10
11
  import { RateOfReturnResponse } from '../models';
11
12
  import { RecentOrdersResponse } from '../models';
12
- import { UniversalActivity } from '../models';
13
13
  /**
14
14
  * AccountInformationApi - axios parameter creator
15
15
  * @export
16
16
  */
17
17
  export declare const AccountInformationApiAxiosParamCreator: (configuration?: Configuration) => {
18
18
  /**
19
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
19
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
20
20
  * @summary List account activities
21
21
  * @param {string} accountId
22
22
  * @param {string} userId
23
23
  * @param {string} userSecret
24
24
  * @param {string | Date} [startDate] The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on &#x60;trade_date&#x60;.
25
25
  * @param {string | Date} [endDate] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on &#x60;trade_date&#x60;.
26
+ * @param {number} [offset] An integer that specifies the starting point of the paginated results. Default is 0.
27
+ * @param {number} [limit] An integer that specifies the maximum number of transactions to return. Default of 1000.
26
28
  * @param {string} [type] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - &#x60;BUY&#x60; - Asset bought. - &#x60;SELL&#x60; - Asset sold. - &#x60;DIVIDEND&#x60; - Dividend payout. - &#x60;CONTRIBUTION&#x60; - Cash contribution. - &#x60;WITHDRAWAL&#x60; - Cash withdrawal. - &#x60;REI&#x60; - Dividend reinvestment. - &#x60;INTEREST&#x60; - Interest deposited into the account. - &#x60;FEE&#x60; - Fee withdrawn from the account. - &#x60;OPTIONEXPIRATION&#x60; - Option expiration event. - &#x60;OPTIONASSIGNMENT&#x60; - Option assignment event. - &#x60;OPTIONEXERCISE&#x60; - Option exercise event. - &#x60;TRANSFER&#x60; - Transfer of assets from one account to another
27
29
  * @param {*} [options] Override http request option.
28
30
  * @throws {RequiredError}
29
31
  */
30
- getAccountActivities: (accountId: string, userId: string, userSecret: string, startDate?: string | Date, endDate?: string | Date, type?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
32
+ getAccountActivities: (accountId: string, userId: string, userSecret: string, startDate?: string | Date, endDate?: string | Date, offset?: number, limit?: number, type?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
33
  /**
32
34
  * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
33
35
  * @summary List all accounts for the user, plus balances, positions, and orders for each account.
@@ -138,13 +140,13 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
138
140
  */
139
141
  export declare const AccountInformationApiFp: (configuration?: Configuration) => {
140
142
  /**
141
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
143
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
142
144
  * @summary List account activities
143
145
  * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
144
146
  * @param {*} [options] Override http request option.
145
147
  * @throws {RequiredError}
146
148
  */
147
- getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UniversalActivity>>>;
149
+ getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedUniversalActivity>>;
148
150
  /**
149
151
  * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
150
152
  * @summary List all accounts for the user, plus balances, positions, and orders for each account.
@@ -233,13 +235,13 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
233
235
  */
234
236
  export declare const AccountInformationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
235
237
  /**
236
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
238
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
237
239
  * @summary List account activities
238
240
  * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
239
241
  * @param {*} [options] Override http request option.
240
242
  * @throws {RequiredError}
241
243
  */
242
- getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<UniversalActivity>>;
244
+ getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<PaginatedUniversalActivity>;
243
245
  /**
244
246
  * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
245
247
  * @summary List all accounts for the user, plus balances, positions, and orders for each account.
@@ -359,6 +361,18 @@ export type AccountInformationApiGetAccountActivitiesRequest = {
359
361
  */
360
362
  readonly endDate?: string | Date;
361
363
  /**
364
+ * An integer that specifies the starting point of the paginated results. Default is 0.
365
+ * @type {number}
366
+ * @memberof AccountInformationApiGetAccountActivities
367
+ */
368
+ readonly offset?: number;
369
+ /**
370
+ * An integer that specifies the maximum number of transactions to return. Default of 1000.
371
+ * @type {number}
372
+ * @memberof AccountInformationApiGetAccountActivities
373
+ */
374
+ readonly limit?: number;
375
+ /**
362
376
  * Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another
363
377
  * @type {string}
364
378
  * @memberof AccountInformationApiGetAccountActivities
@@ -635,14 +649,14 @@ export type AccountInformationApiUpdateUserAccountRequest = {
635
649
  */
636
650
  export declare class AccountInformationApiGenerated extends BaseAPI {
637
651
  /**
638
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
652
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
639
653
  * @summary List account activities
640
654
  * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
641
655
  * @param {*} [options] Override http request option.
642
656
  * @throws {RequiredError}
643
657
  * @memberof AccountInformationApiGenerated
644
658
  */
645
- getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalActivity[], any>>;
659
+ getAccountActivities(requestParameters: AccountInformationApiGetAccountActivitiesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PaginatedUniversalActivity, any>>;
646
660
  /**
647
661
  * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account.
648
662
  * @summary List all accounts for the user, plus balances, positions, and orders for each account.
@@ -36,18 +36,20 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
36
36
  const AccountInformationApiAxiosParamCreator = function (configuration) {
37
37
  return {
38
38
  /**
39
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
39
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
40
40
  * @summary List account activities
41
41
  * @param {string} accountId
42
42
  * @param {string} userId
43
43
  * @param {string} userSecret
44
44
  * @param {string | Date} [startDate] The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on &#x60;trade_date&#x60;.
45
45
  * @param {string | Date} [endDate] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on &#x60;trade_date&#x60;.
46
+ * @param {number} [offset] An integer that specifies the starting point of the paginated results. Default is 0.
47
+ * @param {number} [limit] An integer that specifies the maximum number of transactions to return. Default of 1000.
46
48
  * @param {string} [type] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - &#x60;BUY&#x60; - Asset bought. - &#x60;SELL&#x60; - Asset sold. - &#x60;DIVIDEND&#x60; - Dividend payout. - &#x60;CONTRIBUTION&#x60; - Cash contribution. - &#x60;WITHDRAWAL&#x60; - Cash withdrawal. - &#x60;REI&#x60; - Dividend reinvestment. - &#x60;INTEREST&#x60; - Interest deposited into the account. - &#x60;FEE&#x60; - Fee withdrawn from the account. - &#x60;OPTIONEXPIRATION&#x60; - Option expiration event. - &#x60;OPTIONASSIGNMENT&#x60; - Option assignment event. - &#x60;OPTIONEXERCISE&#x60; - Option exercise event. - &#x60;TRANSFER&#x60; - Transfer of assets from one account to another
47
49
  * @param {*} [options] Override http request option.
48
50
  * @throws {RequiredError}
49
51
  */
50
- getAccountActivities: (accountId, userId, userSecret, startDate, endDate, type, options = {}) => __awaiter(this, void 0, void 0, function* () {
52
+ getAccountActivities: (accountId, userId, userSecret, startDate, endDate, offset, limit, type, options = {}) => __awaiter(this, void 0, void 0, function* () {
51
53
  // verify required parameter 'accountId' is not null or undefined
52
54
  (0, common_1.assertParamExists)('getAccountActivities', 'accountId', accountId);
53
55
  // verify required parameter 'userId' is not null or undefined
@@ -81,6 +83,12 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
81
83
  endDate.toISOString().substr(0, 10) :
82
84
  endDate;
83
85
  }
86
+ if (offset !== undefined) {
87
+ localVarQueryParameter['offset'] = offset;
88
+ }
89
+ if (limit !== undefined) {
90
+ localVarQueryParameter['limit'] = limit;
91
+ }
84
92
  if (type !== undefined) {
85
93
  localVarQueryParameter['type'] = type;
86
94
  }
@@ -676,7 +684,7 @@ const AccountInformationApiFp = function (configuration) {
676
684
  const localVarAxiosParamCreator = (0, exports.AccountInformationApiAxiosParamCreator)(configuration);
677
685
  return {
678
686
  /**
679
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
687
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
680
688
  * @summary List account activities
681
689
  * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
682
690
  * @param {*} [options] Override http request option.
@@ -684,7 +692,7 @@ const AccountInformationApiFp = function (configuration) {
684
692
  */
685
693
  getAccountActivities(requestParameters, options) {
686
694
  return __awaiter(this, void 0, void 0, function* () {
687
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountActivities(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.type, options);
695
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountActivities(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.offset, requestParameters.limit, requestParameters.type, options);
688
696
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
689
697
  });
690
698
  },
@@ -830,7 +838,7 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
830
838
  const localVarFp = (0, exports.AccountInformationApiFp)(configuration);
831
839
  return {
832
840
  /**
833
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
841
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
834
842
  * @summary List account activities
835
843
  * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
836
844
  * @param {*} [options] Override http request option.
@@ -951,7 +959,7 @@ exports.AccountInformationApiFactory = AccountInformationApiFactory;
951
959
  */
952
960
  class AccountInformationApiGenerated extends base_1.BaseAPI {
953
961
  /**
954
- * Returns all historical transactions for the specified account. It\'s recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There\'s a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. The data returned here is always cached and refreshed once a day.
962
+ * Returns all historical transactions for the specified account. This endpoint is paginated and will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. The data returned here is always cached and refreshed once a day.
955
963
  * @summary List account activities
956
964
  * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
957
965
  * @param {*} [options] Override http request option.