snaptrade-typescript-sdk 9.0.54 → 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.54-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.54)
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>
@@ -23,6 +23,8 @@ Connect brokerage accounts to your app for live positions and trading
23
23
  * [`snaptrade.accountInformation.getUserAccountDetails`](#snaptradeaccountinformationgetuseraccountdetails)
24
24
  * [`snaptrade.accountInformation.getUserAccountOrders`](#snaptradeaccountinformationgetuseraccountorders)
25
25
  * [`snaptrade.accountInformation.getUserAccountPositions`](#snaptradeaccountinformationgetuseraccountpositions)
26
+ * [`snaptrade.accountInformation.getUserAccountRecentOrders`](#snaptradeaccountinformationgetuseraccountrecentorders)
27
+ * [`snaptrade.accountInformation.getUserAccountReturnRates`](#snaptradeaccountinformationgetuseraccountreturnrates)
26
28
  * [`snaptrade.accountInformation.getUserHoldings`](#snaptradeaccountinformationgetuserholdings)
27
29
  * [`snaptrade.accountInformation.listUserAccounts`](#snaptradeaccountinformationlistuseraccounts)
28
30
  * [`snaptrade.accountInformation.updateUserAccount`](#snaptradeaccountinformationupdateuseraccount)
@@ -37,6 +39,7 @@ Connect brokerage accounts to your app for live positions and trading
37
39
  * [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
38
40
  * [`snaptrade.connections.refreshBrokerageAuthorization`](#snaptradeconnectionsrefreshbrokerageauthorization)
39
41
  * [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
42
+ * [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
40
43
  * [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
41
44
  * [`snaptrade.options.getOptionStrategy`](#snaptradeoptionsgetoptionstrategy)
42
45
  * [`snaptrade.options.getOptionsChain`](#snaptradeoptionsgetoptionschain)
@@ -386,6 +389,83 @@ const getUserAccountPositionsResponse =
386
389
  ---
387
390
 
388
391
 
392
+ ### `snaptrade.accountInformation.getUserAccountRecentOrders`<a id="snaptradeaccountinformationgetuseraccountrecentorders"></a>
393
+
394
+ Returns a list of orders executed in the last 24 hours in the specified account.
395
+ This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution
396
+ Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old
397
+ *Please contact support for access as this endpoint is not enabled by default.*
398
+
399
+
400
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
401
+
402
+ ```typescript
403
+ const getUserAccountRecentOrdersResponse =
404
+ await snaptrade.accountInformation.getUserAccountRecentOrders({
405
+ userId: "snaptrade-user-123",
406
+ userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
407
+ accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
408
+ });
409
+ ```
410
+
411
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
412
+
413
+ ##### userId: `string`<a id="userid-string"></a>
414
+
415
+ ##### userSecret: `string`<a id="usersecret-string"></a>
416
+
417
+ ##### accountId: `string`<a id="accountid-string"></a>
418
+
419
+ #### 🔄 Return<a id="🔄-return"></a>
420
+
421
+ [RecentOrdersResponse](./models/recent-orders-response.ts)
422
+
423
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
424
+
425
+ `/accounts/{accountId}/recentOrders` `GET`
426
+
427
+ [🔙 **Back to Table of Contents**](#table-of-contents)
428
+
429
+ ---
430
+
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
+
389
469
  ### `snaptrade.accountInformation.getUserHoldings`<a id="snaptradeaccountinformationgetuserholdings"></a>
390
470
 
391
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.__
@@ -895,6 +975,42 @@ const removeBrokerageAuthorizationResponse =
895
975
  ---
896
976
 
897
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
+
898
1014
  ### `snaptrade.connections.sessionEvents`<a id="snaptradeconnectionssessionevents"></a>
899
1015
 
900
1016
  Returns a list of session events associated with a user.
@@ -7,6 +7,8 @@ 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';
11
+ import { RecentOrdersResponse } from '../models';
10
12
  /**
11
13
  * AccountInformationApi - axios parameter creator
12
14
  * @export
@@ -65,6 +67,26 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
65
67
  * @throws {RequiredError}
66
68
  */
67
69
  getUserAccountPositions: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
70
+ /**
71
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
72
+ * @summary List account recent executed orders
73
+ * @param {string} userId
74
+ * @param {string} userSecret
75
+ * @param {string} accountId
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
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>;
68
90
  /**
69
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**.
70
92
  * @summary List account holdings
@@ -141,6 +163,22 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
141
163
  * @throws {RequiredError}
142
164
  */
143
165
  getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Position>>>;
166
+ /**
167
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
168
+ * @summary List account recent executed orders
169
+ * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ */
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>>;
144
182
  /**
145
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**.
146
184
  * @summary List account holdings
@@ -212,6 +250,22 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
212
250
  * @throws {RequiredError}
213
251
  */
214
252
  getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<Position>>;
253
+ /**
254
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
255
+ * @summary List account recent executed orders
256
+ * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ */
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>;
215
269
  /**
216
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**.
217
271
  * @summary List account holdings
@@ -374,6 +428,56 @@ export type AccountInformationApiGetUserAccountPositionsRequest = {
374
428
  */
375
429
  readonly accountId: string;
376
430
  };
431
+ /**
432
+ * Request parameters for getUserAccountRecentOrders operation in AccountInformationApi.
433
+ * @export
434
+ * @interface AccountInformationApiGetUserAccountRecentOrdersRequest
435
+ */
436
+ export type AccountInformationApiGetUserAccountRecentOrdersRequest = {
437
+ /**
438
+ *
439
+ * @type {string}
440
+ * @memberof AccountInformationApiGetUserAccountRecentOrders
441
+ */
442
+ readonly userId: string;
443
+ /**
444
+ *
445
+ * @type {string}
446
+ * @memberof AccountInformationApiGetUserAccountRecentOrders
447
+ */
448
+ readonly userSecret: string;
449
+ /**
450
+ *
451
+ * @type {string}
452
+ * @memberof AccountInformationApiGetUserAccountRecentOrders
453
+ */
454
+ readonly accountId: string;
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
+ };
377
481
  /**
378
482
  * Request parameters for getUserHoldings operation in AccountInformationApi.
379
483
  * @export
@@ -496,6 +600,24 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
496
600
  * @memberof AccountInformationApiGenerated
497
601
  */
498
602
  getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Position[], any>>;
603
+ /**
604
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
605
+ * @summary List account recent executed orders
606
+ * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ * @memberof AccountInformationApiGenerated
610
+ */
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>>;
499
621
  /**
500
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**.
501
623
  * @summary List account holdings
@@ -319,6 +319,116 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
319
319
  options: localVarRequestOptions,
320
320
  };
321
321
  }),
322
+ /**
323
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
324
+ * @summary List account recent executed orders
325
+ * @param {string} userId
326
+ * @param {string} userSecret
327
+ * @param {string} accountId
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ getUserAccountRecentOrders: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
332
+ // verify required parameter 'userId' is not null or undefined
333
+ (0, common_1.assertParamExists)('getUserAccountRecentOrders', 'userId', userId);
334
+ // verify required parameter 'userSecret' is not null or undefined
335
+ (0, common_1.assertParamExists)('getUserAccountRecentOrders', 'userSecret', userSecret);
336
+ // verify required parameter 'accountId' is not null or undefined
337
+ (0, common_1.assertParamExists)('getUserAccountRecentOrders', 'accountId', accountId);
338
+ const localVarPath = `/accounts/{accountId}/recentOrders`
339
+ .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
340
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
341
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
342
+ let baseOptions;
343
+ if (configuration) {
344
+ baseOptions = configuration.baseOptions;
345
+ }
346
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
347
+ const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
348
+ const localVarQueryParameter = {};
349
+ // authentication PartnerClientId required
350
+ yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
351
+ // authentication PartnerSignature required
352
+ yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
353
+ // authentication PartnerTimestamp required
354
+ yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
355
+ if (userId !== undefined) {
356
+ localVarQueryParameter['userId'] = userId;
357
+ }
358
+ if (userSecret !== undefined) {
359
+ localVarQueryParameter['userSecret'] = userSecret;
360
+ }
361
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
362
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
363
+ (0, requestBeforeHook_1.requestBeforeHook)({
364
+ queryParameters: localVarQueryParameter,
365
+ requestConfig: localVarRequestOptions,
366
+ path: localVarPath,
367
+ configuration,
368
+ pathTemplate: '/accounts/{accountId}/recentOrders',
369
+ httpMethod: 'GET'
370
+ });
371
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
372
+ return {
373
+ url: (0, common_1.toPathString)(localVarUrlObj),
374
+ options: localVarRequestOptions,
375
+ };
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
+ }),
322
432
  /**
323
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**.
324
434
  * @summary List account holdings
@@ -556,6 +666,32 @@ const AccountInformationApiFp = function (configuration) {
556
666
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
557
667
  });
558
668
  },
669
+ /**
670
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
671
+ * @summary List account recent executed orders
672
+ * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ */
676
+ getUserAccountRecentOrders(requestParameters, options) {
677
+ return __awaiter(this, void 0, void 0, function* () {
678
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountRecentOrders(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
679
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
680
+ });
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
+ },
559
695
  /**
560
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**.
561
697
  * @summary List account holdings
@@ -656,6 +792,26 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
656
792
  getUserAccountPositions(requestParameters, options) {
657
793
  return localVarFp.getUserAccountPositions(requestParameters, options).then((request) => request(axios, basePath));
658
794
  },
795
+ /**
796
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
797
+ * @summary List account recent executed orders
798
+ * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ getUserAccountRecentOrders(requestParameters, options) {
803
+ return localVarFp.getUserAccountRecentOrders(requestParameters, options).then((request) => request(axios, basePath));
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
+ },
659
815
  /**
660
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**.
661
817
  * @summary List account holdings
@@ -752,6 +908,28 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
752
908
  getUserAccountPositions(requestParameters, options) {
753
909
  return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
754
910
  }
911
+ /**
912
+ * Returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution Differs from /orders in that it only returns orders that have been *executed* in the last 24 hours as opposed to pending or cancelled orders up to 30 days old *Please contact support for access as this endpoint is not enabled by default.*
913
+ * @summary List account recent executed orders
914
+ * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
915
+ * @param {*} [options] Override http request option.
916
+ * @throws {RequiredError}
917
+ * @memberof AccountInformationApiGenerated
918
+ */
919
+ getUserAccountRecentOrders(requestParameters, options) {
920
+ return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountRecentOrders(requestParameters, options).then((request) => request(this.axios, this.basePath));
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
+ }
755
933
  /**
756
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**.
757
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