snaptrade-typescript-sdk 9.0.55 → 9.0.56

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.55-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.55)
9
+ [![npm](https://img.shields.io/badge/npm-v9.0.56-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.56)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -24,6 +24,7 @@ Connect brokerage accounts to your app for live positions and trading
24
24
  * [`snaptrade.accountInformation.getUserAccountOrders`](#snaptradeaccountinformationgetuseraccountorders)
25
25
  * [`snaptrade.accountInformation.getUserAccountPositions`](#snaptradeaccountinformationgetuseraccountpositions)
26
26
  * [`snaptrade.accountInformation.getUserAccountRecentOrders`](#snaptradeaccountinformationgetuseraccountrecentorders)
27
+ * [`snaptrade.accountInformation.getUserAccountReturnRates`](#snaptradeaccountinformationgetuseraccountreturnrates)
27
28
  * [`snaptrade.accountInformation.getUserHoldings`](#snaptradeaccountinformationgetuserholdings)
28
29
  * [`snaptrade.accountInformation.listUserAccounts`](#snaptradeaccountinformationlistuseraccounts)
29
30
  * [`snaptrade.accountInformation.updateUserAccount`](#snaptradeaccountinformationupdateuseraccount)
@@ -38,6 +39,7 @@ Connect brokerage accounts to your app for live positions and trading
38
39
  * [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
39
40
  * [`snaptrade.connections.refreshBrokerageAuthorization`](#snaptradeconnectionsrefreshbrokerageauthorization)
40
41
  * [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
42
+ * [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
41
43
  * [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
42
44
  * [`snaptrade.options.getOptionStrategy`](#snaptradeoptionsgetoptionstrategy)
43
45
  * [`snaptrade.options.getOptionsChain`](#snaptradeoptionsgetoptionschain)
@@ -427,6 +429,43 @@ const getUserAccountRecentOrdersResponse =
427
429
  ---
428
430
 
429
431
 
432
+ ### `snaptrade.accountInformation.getUserAccountReturnRates`<a id="snaptradeaccountinformationgetuseraccountreturnrates"></a>
433
+
434
+ Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example "ALL", "1Y", "6M", "3M", "1M"
435
+
436
+
437
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
438
+
439
+ ```typescript
440
+ const getUserAccountReturnRatesResponse =
441
+ await snaptrade.accountInformation.getUserAccountReturnRates({
442
+ userId: "snaptrade-user-123",
443
+ userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
444
+ accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
445
+ });
446
+ ```
447
+
448
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
449
+
450
+ ##### userId: `string`<a id="userid-string"></a>
451
+
452
+ ##### userSecret: `string`<a id="usersecret-string"></a>
453
+
454
+ ##### accountId: `string`<a id="accountid-string"></a>
455
+
456
+ #### 🔄 Return<a id="🔄-return"></a>
457
+
458
+ [RateOfReturnResponse](./models/rate-of-return-response.ts)
459
+
460
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
461
+
462
+ `/accounts/{accountId}/returnRates` `GET`
463
+
464
+ [🔙 **Back to Table of Contents**](#table-of-contents)
465
+
466
+ ---
467
+
468
+
430
469
  ### `snaptrade.accountInformation.getUserHoldings`<a id="snaptradeaccountinformationgetuserholdings"></a>
431
470
 
432
471
  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.__
@@ -936,6 +975,42 @@ const removeBrokerageAuthorizationResponse =
936
975
  ---
937
976
 
938
977
 
978
+ ### `snaptrade.connections.returnRates`<a id="snaptradeconnectionsreturnrates"></a>
979
+
980
+ Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example "ALL", "1Y", "6M", "3M", "1M"
981
+
982
+
983
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
984
+
985
+ ```typescript
986
+ const returnRatesResponse = await snaptrade.connections.returnRates({
987
+ userId: "snaptrade-user-123",
988
+ userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
989
+ authorizationId: "87b24961-b51e-4db8-9226-f198f6518a89",
990
+ });
991
+ ```
992
+
993
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
994
+
995
+ ##### userId: `string`<a id="userid-string"></a>
996
+
997
+ ##### userSecret: `string`<a id="usersecret-string"></a>
998
+
999
+ ##### authorizationId: `string`<a id="authorizationid-string"></a>
1000
+
1001
+ #### 🔄 Return<a id="🔄-return"></a>
1002
+
1003
+ [RateOfReturnResponse](./models/rate-of-return-response.ts)
1004
+
1005
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1006
+
1007
+ `/authorizations/{authorizationId}/returnRates` `GET`
1008
+
1009
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1010
+
1011
+ ---
1012
+
1013
+
939
1014
  ### `snaptrade.connections.sessionEvents`<a id="snaptradeconnectionssessionevents"></a>
940
1015
 
941
1016
  Returns a list of session events associated with a user.
@@ -7,6 +7,7 @@ import { AccountHoldingsAccount } from '../models';
7
7
  import { AccountOrderRecord } from '../models';
8
8
  import { Balance } from '../models';
9
9
  import { Position } from '../models';
10
+ import { RateOfReturnResponse } from '../models';
10
11
  import { RecentOrdersResponse } from '../models';
11
12
  /**
12
13
  * AccountInformationApi - axios parameter creator
@@ -76,6 +77,16 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
76
77
  * @throws {RequiredError}
77
78
  */
78
79
  getUserAccountRecentOrders: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
80
+ /**
81
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
82
+ * @summary List account rate of returns
83
+ * @param {string} userId
84
+ * @param {string} userSecret
85
+ * @param {string} accountId
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ getUserAccountReturnRates: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
79
90
  /**
80
91
  * 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**.
81
92
  * @summary List account holdings
@@ -160,6 +171,14 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
160
171
  * @throws {RequiredError}
161
172
  */
162
173
  getUserAccountRecentOrders(requestParameters: AccountInformationApiGetUserAccountRecentOrdersRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecentOrdersResponse>>;
174
+ /**
175
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
176
+ * @summary List account rate of returns
177
+ * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
178
+ * @param {*} [options] Override http request option.
179
+ * @throws {RequiredError}
180
+ */
181
+ getUserAccountReturnRates(requestParameters: AccountInformationApiGetUserAccountReturnRatesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RateOfReturnResponse>>;
163
182
  /**
164
183
  * 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**.
165
184
  * @summary List account holdings
@@ -239,6 +258,14 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
239
258
  * @throws {RequiredError}
240
259
  */
241
260
  getUserAccountRecentOrders(requestParameters: AccountInformationApiGetUserAccountRecentOrdersRequest, options?: AxiosRequestConfig): AxiosPromise<RecentOrdersResponse>;
261
+ /**
262
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
263
+ * @summary List account rate of returns
264
+ * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ */
268
+ getUserAccountReturnRates(requestParameters: AccountInformationApiGetUserAccountReturnRatesRequest, options?: AxiosRequestConfig): AxiosPromise<RateOfReturnResponse>;
242
269
  /**
243
270
  * 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**.
244
271
  * @summary List account holdings
@@ -426,6 +453,31 @@ export type AccountInformationApiGetUserAccountRecentOrdersRequest = {
426
453
  */
427
454
  readonly accountId: string;
428
455
  };
456
+ /**
457
+ * Request parameters for getUserAccountReturnRates operation in AccountInformationApi.
458
+ * @export
459
+ * @interface AccountInformationApiGetUserAccountReturnRatesRequest
460
+ */
461
+ export type AccountInformationApiGetUserAccountReturnRatesRequest = {
462
+ /**
463
+ *
464
+ * @type {string}
465
+ * @memberof AccountInformationApiGetUserAccountReturnRates
466
+ */
467
+ readonly userId: string;
468
+ /**
469
+ *
470
+ * @type {string}
471
+ * @memberof AccountInformationApiGetUserAccountReturnRates
472
+ */
473
+ readonly userSecret: string;
474
+ /**
475
+ *
476
+ * @type {string}
477
+ * @memberof AccountInformationApiGetUserAccountReturnRates
478
+ */
479
+ readonly accountId: string;
480
+ };
429
481
  /**
430
482
  * Request parameters for getUserHoldings operation in AccountInformationApi.
431
483
  * @export
@@ -557,6 +609,15 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
557
609
  * @memberof AccountInformationApiGenerated
558
610
  */
559
611
  getUserAccountRecentOrders(requestParameters: AccountInformationApiGetUserAccountRecentOrdersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RecentOrdersResponse, any>>;
612
+ /**
613
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
614
+ * @summary List account rate of returns
615
+ * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
616
+ * @param {*} [options] Override http request option.
617
+ * @throws {RequiredError}
618
+ * @memberof AccountInformationApiGenerated
619
+ */
620
+ getUserAccountReturnRates(requestParameters: AccountInformationApiGetUserAccountReturnRatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RateOfReturnResponse, any>>;
560
621
  /**
561
622
  * 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**.
562
623
  * @summary List account holdings
@@ -374,6 +374,61 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
374
374
  options: localVarRequestOptions,
375
375
  };
376
376
  }),
377
+ /**
378
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
379
+ * @summary List account rate of returns
380
+ * @param {string} userId
381
+ * @param {string} userSecret
382
+ * @param {string} accountId
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ getUserAccountReturnRates: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
387
+ // verify required parameter 'userId' is not null or undefined
388
+ (0, common_1.assertParamExists)('getUserAccountReturnRates', 'userId', userId);
389
+ // verify required parameter 'userSecret' is not null or undefined
390
+ (0, common_1.assertParamExists)('getUserAccountReturnRates', 'userSecret', userSecret);
391
+ // verify required parameter 'accountId' is not null or undefined
392
+ (0, common_1.assertParamExists)('getUserAccountReturnRates', 'accountId', accountId);
393
+ const localVarPath = `/accounts/{accountId}/returnRates`
394
+ .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
395
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
396
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
397
+ let baseOptions;
398
+ if (configuration) {
399
+ baseOptions = configuration.baseOptions;
400
+ }
401
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
402
+ const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
403
+ const localVarQueryParameter = {};
404
+ // authentication PartnerClientId required
405
+ yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
406
+ // authentication PartnerSignature required
407
+ yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
408
+ // authentication PartnerTimestamp required
409
+ yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
410
+ if (userId !== undefined) {
411
+ localVarQueryParameter['userId'] = userId;
412
+ }
413
+ if (userSecret !== undefined) {
414
+ localVarQueryParameter['userSecret'] = userSecret;
415
+ }
416
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
417
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
418
+ (0, requestBeforeHook_1.requestBeforeHook)({
419
+ queryParameters: localVarQueryParameter,
420
+ requestConfig: localVarRequestOptions,
421
+ path: localVarPath,
422
+ configuration,
423
+ pathTemplate: '/accounts/{accountId}/returnRates',
424
+ httpMethod: 'GET'
425
+ });
426
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
427
+ return {
428
+ url: (0, common_1.toPathString)(localVarUrlObj),
429
+ options: localVarRequestOptions,
430
+ };
431
+ }),
377
432
  /**
378
433
  * 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**.
379
434
  * @summary List account holdings
@@ -624,6 +679,19 @@ const AccountInformationApiFp = function (configuration) {
624
679
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
625
680
  });
626
681
  },
682
+ /**
683
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
684
+ * @summary List account rate of returns
685
+ * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
686
+ * @param {*} [options] Override http request option.
687
+ * @throws {RequiredError}
688
+ */
689
+ getUserAccountReturnRates(requestParameters, options) {
690
+ return __awaiter(this, void 0, void 0, function* () {
691
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountReturnRates(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
692
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
693
+ });
694
+ },
627
695
  /**
628
696
  * 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**.
629
697
  * @summary List account holdings
@@ -734,6 +802,16 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
734
802
  getUserAccountRecentOrders(requestParameters, options) {
735
803
  return localVarFp.getUserAccountRecentOrders(requestParameters, options).then((request) => request(axios, basePath));
736
804
  },
805
+ /**
806
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
807
+ * @summary List account rate of returns
808
+ * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
809
+ * @param {*} [options] Override http request option.
810
+ * @throws {RequiredError}
811
+ */
812
+ getUserAccountReturnRates(requestParameters, options) {
813
+ return localVarFp.getUserAccountReturnRates(requestParameters, options).then((request) => request(axios, basePath));
814
+ },
737
815
  /**
738
816
  * 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**.
739
817
  * @summary List account holdings
@@ -841,6 +919,17 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
841
919
  getUserAccountRecentOrders(requestParameters, options) {
842
920
  return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountRecentOrders(requestParameters, options).then((request) => request(this.axios, this.basePath));
843
921
  }
922
+ /**
923
+ * Returns a list of rate of return percents for a given account. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
924
+ * @summary List account rate of returns
925
+ * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
926
+ * @param {*} [options] Override http request option.
927
+ * @throws {RequiredError}
928
+ * @memberof AccountInformationApiGenerated
929
+ */
930
+ getUserAccountReturnRates(requestParameters, options) {
931
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountReturnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
932
+ }
844
933
  /**
845
934
  * 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**.
846
935
  * @summary List account holdings
@@ -5,6 +5,7 @@ import { BrokerageAuthorization } from '../models';
5
5
  import { BrokerageAuthorizationDisabledConfirmation } from '../models';
6
6
  import { BrokerageAuthorizationRefreshConfirmation } from '../models';
7
7
  import { ConnectionsSessionEvents200ResponseInner } from '../models';
8
+ import { RateOfReturnResponse } from '../models';
8
9
  /**
9
10
  * ConnectionsApi - axios parameter creator
10
11
  * @export
@@ -59,6 +60,16 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
59
60
  * @throws {RequiredError}
60
61
  */
61
62
  removeBrokerageAuthorization: (authorizationId: string, userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
63
+ /**
64
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
65
+ * @summary List connection rate of returns
66
+ * @param {string} userId
67
+ * @param {string} userSecret
68
+ * @param {string} authorizationId
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ */
72
+ returnRates: (userId: string, userSecret: string, authorizationId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
62
73
  /**
63
74
  * Returns a list of session events associated with a user.
64
75
  * @summary Get all session events for a user
@@ -115,6 +126,14 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
115
126
  * @throws {RequiredError}
116
127
  */
117
128
  removeBrokerageAuthorization(requestParameters: ConnectionsApiRemoveBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
129
+ /**
130
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
131
+ * @summary List connection rate of returns
132
+ * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
133
+ * @param {*} [options] Override http request option.
134
+ * @throws {RequiredError}
135
+ */
136
+ returnRates(requestParameters: ConnectionsApiReturnRatesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RateOfReturnResponse>>;
118
137
  /**
119
138
  * Returns a list of session events associated with a user.
120
139
  * @summary Get all session events for a user
@@ -169,6 +188,14 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
169
188
  * @throws {RequiredError}
170
189
  */
171
190
  removeBrokerageAuthorization(requestParameters: ConnectionsApiRemoveBrokerageAuthorizationRequest, options?: AxiosRequestConfig): AxiosPromise<void>;
191
+ /**
192
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
193
+ * @summary List connection rate of returns
194
+ * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ returnRates(requestParameters: ConnectionsApiReturnRatesRequest, options?: AxiosRequestConfig): AxiosPromise<RateOfReturnResponse>;
172
199
  /**
173
200
  * Returns a list of session events associated with a user.
174
201
  * @summary Get all session events for a user
@@ -297,6 +324,31 @@ export type ConnectionsApiRemoveBrokerageAuthorizationRequest = {
297
324
  */
298
325
  readonly userSecret: string;
299
326
  };
327
+ /**
328
+ * Request parameters for returnRates operation in ConnectionsApi.
329
+ * @export
330
+ * @interface ConnectionsApiReturnRatesRequest
331
+ */
332
+ export type ConnectionsApiReturnRatesRequest = {
333
+ /**
334
+ *
335
+ * @type {string}
336
+ * @memberof ConnectionsApiReturnRates
337
+ */
338
+ readonly userId: string;
339
+ /**
340
+ *
341
+ * @type {string}
342
+ * @memberof ConnectionsApiReturnRates
343
+ */
344
+ readonly userSecret: string;
345
+ /**
346
+ *
347
+ * @type {string}
348
+ * @memberof ConnectionsApiReturnRates
349
+ */
350
+ readonly authorizationId: string;
351
+ };
300
352
  /**
301
353
  * Request parameters for sessionEvents operation in ConnectionsApi.
302
354
  * @export
@@ -374,6 +426,15 @@ export declare class ConnectionsApiGenerated extends BaseAPI {
374
426
  * @memberof ConnectionsApiGenerated
375
427
  */
376
428
  removeBrokerageAuthorization(requestParameters: ConnectionsApiRemoveBrokerageAuthorizationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
429
+ /**
430
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
431
+ * @summary List connection rate of returns
432
+ * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ * @memberof ConnectionsApiGenerated
436
+ */
437
+ returnRates(requestParameters: ConnectionsApiReturnRatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RateOfReturnResponse, any>>;
377
438
  /**
378
439
  * Returns a list of session events associated with a user.
379
440
  * @summary Get all session events for a user
@@ -306,6 +306,61 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
306
306
  options: localVarRequestOptions,
307
307
  };
308
308
  }),
309
+ /**
310
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
311
+ * @summary List connection rate of returns
312
+ * @param {string} userId
313
+ * @param {string} userSecret
314
+ * @param {string} authorizationId
315
+ * @param {*} [options] Override http request option.
316
+ * @throws {RequiredError}
317
+ */
318
+ returnRates: (userId, userSecret, authorizationId, options = {}) => __awaiter(this, void 0, void 0, function* () {
319
+ // verify required parameter 'userId' is not null or undefined
320
+ (0, common_1.assertParamExists)('returnRates', 'userId', userId);
321
+ // verify required parameter 'userSecret' is not null or undefined
322
+ (0, common_1.assertParamExists)('returnRates', 'userSecret', userSecret);
323
+ // verify required parameter 'authorizationId' is not null or undefined
324
+ (0, common_1.assertParamExists)('returnRates', 'authorizationId', authorizationId);
325
+ const localVarPath = `/authorizations/{authorizationId}/returnRates`
326
+ .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
327
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
328
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
329
+ let baseOptions;
330
+ if (configuration) {
331
+ baseOptions = configuration.baseOptions;
332
+ }
333
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
334
+ const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
335
+ const localVarQueryParameter = {};
336
+ // authentication PartnerClientId required
337
+ yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
338
+ // authentication PartnerSignature required
339
+ yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
340
+ // authentication PartnerTimestamp required
341
+ yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
342
+ if (userId !== undefined) {
343
+ localVarQueryParameter['userId'] = userId;
344
+ }
345
+ if (userSecret !== undefined) {
346
+ localVarQueryParameter['userSecret'] = userSecret;
347
+ }
348
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
349
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
350
+ (0, requestBeforeHook_1.requestBeforeHook)({
351
+ queryParameters: localVarQueryParameter,
352
+ requestConfig: localVarRequestOptions,
353
+ path: localVarPath,
354
+ configuration,
355
+ pathTemplate: '/authorizations/{authorizationId}/returnRates',
356
+ httpMethod: 'GET'
357
+ });
358
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
359
+ return {
360
+ url: (0, common_1.toPathString)(localVarUrlObj),
361
+ options: localVarRequestOptions,
362
+ };
363
+ }),
309
364
  /**
310
365
  * Returns a list of session events associated with a user.
311
366
  * @summary Get all session events for a user
@@ -434,6 +489,19 @@ const ConnectionsApiFp = function (configuration) {
434
489
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
435
490
  });
436
491
  },
492
+ /**
493
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
494
+ * @summary List connection rate of returns
495
+ * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
496
+ * @param {*} [options] Override http request option.
497
+ * @throws {RequiredError}
498
+ */
499
+ returnRates(requestParameters, options) {
500
+ return __awaiter(this, void 0, void 0, function* () {
501
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.returnRates(requestParameters.userId, requestParameters.userSecret, requestParameters.authorizationId, options);
502
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
503
+ });
504
+ },
437
505
  /**
438
506
  * Returns a list of session events associated with a user.
439
507
  * @summary Get all session events for a user
@@ -507,6 +575,16 @@ const ConnectionsApiFactory = function (configuration, basePath, axios) {
507
575
  removeBrokerageAuthorization(requestParameters, options) {
508
576
  return localVarFp.removeBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
509
577
  },
578
+ /**
579
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
580
+ * @summary List connection rate of returns
581
+ * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ returnRates(requestParameters, options) {
586
+ return localVarFp.returnRates(requestParameters, options).then((request) => request(axios, basePath));
587
+ },
510
588
  /**
511
589
  * Returns a list of session events associated with a user.
512
590
  * @summary Get all session events for a user
@@ -582,6 +660,17 @@ class ConnectionsApiGenerated extends base_1.BaseAPI {
582
660
  removeBrokerageAuthorization(requestParameters, options) {
583
661
  return (0, exports.ConnectionsApiFp)(this.configuration).removeBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
584
662
  }
663
+ /**
664
+ * Returns a list of rate of return percents for a given connection. Will include timeframes available from the brokerage, for example \"ALL\", \"1Y\", \"6M\", \"3M\", \"1M\"
665
+ * @summary List connection rate of returns
666
+ * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
667
+ * @param {*} [options] Override http request option.
668
+ * @throws {RequiredError}
669
+ * @memberof ConnectionsApiGenerated
670
+ */
671
+ returnRates(requestParameters, options) {
672
+ return (0, exports.ConnectionsApiFp)(this.configuration).returnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
673
+ }
585
674
  /**
586
675
  * Returns a list of session events associated with a user.
587
676
  * @summary Get all session events for a user