snaptrade-typescript-sdk 9.0.190 → 9.0.191

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.
@@ -36,72 +36,15 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
36
36
  const ExperimentalEndpointsApiAxiosParamCreator = function (configuration) {
37
37
  return {
38
38
  /**
39
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and only available for certain brokerages with a maximum lookback of 1 year.
40
- * @summary List historical account total value
41
- * @param {string} userId
42
- * @param {string} userSecret
43
- * @param {string} accountId
44
- * @param {*} [options] Override http request option.
45
- * @throws {RequiredError}
46
- */
47
- getAccountBalanceHistory: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
48
- // verify required parameter 'userId' is not null or undefined
49
- (0, common_1.assertParamExists)('getAccountBalanceHistory', 'userId', userId);
50
- // verify required parameter 'userSecret' is not null or undefined
51
- (0, common_1.assertParamExists)('getAccountBalanceHistory', 'userSecret', userSecret);
52
- // verify required parameter 'accountId' is not null or undefined
53
- (0, common_1.assertParamExists)('getAccountBalanceHistory', 'accountId', accountId);
54
- const localVarPath = `/accounts/{accountId}/balanceHistory`
55
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
56
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
57
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
58
- let baseOptions;
59
- if (configuration) {
60
- baseOptions = configuration.baseOptions;
61
- }
62
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
63
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
64
- const localVarQueryParameter = {};
65
- // authentication PartnerClientId required
66
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
67
- // authentication PartnerSignature required
68
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
69
- // authentication PartnerTimestamp required
70
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
71
- if (userId !== undefined) {
72
- localVarQueryParameter['userId'] = userId;
73
- }
74
- if (userSecret !== undefined) {
75
- localVarQueryParameter['userSecret'] = userSecret;
76
- }
77
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
78
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
79
- (0, requestBeforeHook_1.requestBeforeHook)({
80
- queryParameters: localVarQueryParameter,
81
- requestConfig: localVarRequestOptions,
82
- path: localVarPath,
83
- configuration,
84
- pathTemplate: '/accounts/{accountId}/balanceHistory',
85
- httpMethod: 'GET'
86
- });
87
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
88
- return {
89
- url: (0, common_1.toPathString)(localVarUrlObj),
90
- options: localVarRequestOptions,
91
- };
92
- }),
93
- /**
94
- * Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
39
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
95
40
  * @summary List all account positions
96
41
  * @param {string} userId
97
42
  * @param {string} userSecret
98
43
  * @param {string} accountId
99
- * @param {number} [page] The page number to return. Defaults to 1.
100
- * @param {number} [pageSize] The number of positions to return per page. Defaults to 100 with a maximum of 1000.
101
44
  * @param {*} [options] Override http request option.
102
45
  * @throws {RequiredError}
103
46
  */
104
- getAllAccountPositions: (userId, userSecret, accountId, page, pageSize, options = {}) => __awaiter(this, void 0, void 0, function* () {
47
+ getAllAccountPositions: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
105
48
  // verify required parameter 'userId' is not null or undefined
106
49
  (0, common_1.assertParamExists)('getAllAccountPositions', 'userId', userId);
107
50
  // verify required parameter 'userSecret' is not null or undefined
@@ -131,12 +74,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function (configuration) {
131
74
  if (userSecret !== undefined) {
132
75
  localVarQueryParameter['userSecret'] = userSecret;
133
76
  }
134
- if (page !== undefined) {
135
- localVarQueryParameter['page'] = page;
136
- }
137
- if (pageSize !== undefined) {
138
- localVarQueryParameter['page_size'] = pageSize;
139
- }
140
77
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
78
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
142
79
  (0, requestBeforeHook_1.requestBeforeHook)({
@@ -400,20 +337,7 @@ const ExperimentalEndpointsApiFp = function (configuration) {
400
337
  const localVarAxiosParamCreator = (0, exports.ExperimentalEndpointsApiAxiosParamCreator)(configuration);
401
338
  return {
402
339
  /**
403
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and only available for certain brokerages with a maximum lookback of 1 year.
404
- * @summary List historical account total value
405
- * @param {ExperimentalEndpointsApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
406
- * @param {*} [options] Override http request option.
407
- * @throws {RequiredError}
408
- */
409
- getAccountBalanceHistory(requestParameters, options) {
410
- return __awaiter(this, void 0, void 0, function* () {
411
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountBalanceHistory(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
412
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
413
- });
414
- },
415
- /**
416
- * Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
340
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
417
341
  * @summary List all account positions
418
342
  * @param {ExperimentalEndpointsApiGetAllAccountPositionsRequest} requestParameters Request parameters.
419
343
  * @param {*} [options] Override http request option.
@@ -421,7 +345,7 @@ const ExperimentalEndpointsApiFp = function (configuration) {
421
345
  */
422
346
  getAllAccountPositions(requestParameters, options) {
423
347
  return __awaiter(this, void 0, void 0, function* () {
424
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.page, requestParameters.pageSize, options);
348
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
425
349
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
426
350
  });
427
351
  },
@@ -488,17 +412,7 @@ const ExperimentalEndpointsApiFactory = function (configuration, basePath, axios
488
412
  const localVarFp = (0, exports.ExperimentalEndpointsApiFp)(configuration);
489
413
  return {
490
414
  /**
491
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and only available for certain brokerages with a maximum lookback of 1 year.
492
- * @summary List historical account total value
493
- * @param {ExperimentalEndpointsApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
494
- * @param {*} [options] Override http request option.
495
- * @throws {RequiredError}
496
- */
497
- getAccountBalanceHistory(requestParameters, options) {
498
- return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios, basePath));
499
- },
500
- /**
501
- * Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
415
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
502
416
  * @summary List all account positions
503
417
  * @param {ExperimentalEndpointsApiGetAllAccountPositionsRequest} requestParameters Request parameters.
504
418
  * @param {*} [options] Override http request option.
@@ -558,18 +472,7 @@ exports.ExperimentalEndpointsApiFactory = ExperimentalEndpointsApiFactory;
558
472
  */
559
473
  class ExperimentalEndpointsApiGenerated extends base_1.BaseAPI {
560
474
  /**
561
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and only available for certain brokerages with a maximum lookback of 1 year.
562
- * @summary List historical account total value
563
- * @param {ExperimentalEndpointsApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
564
- * @param {*} [options] Override http request option.
565
- * @throws {RequiredError}
566
- * @memberof ExperimentalEndpointsApiGenerated
567
- */
568
- getAccountBalanceHistory(requestParameters, options) {
569
- return (0, exports.ExperimentalEndpointsApiFp)(this.configuration).getAccountBalanceHistory(requestParameters, options).then((request) => request(this.axios, this.basePath));
570
- }
571
- /**
572
- * Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
475
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. Stock positions may also include `cash_equivalent`, and may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
573
476
  * @summary List all account positions
574
477
  * @param {ExperimentalEndpointsApiGetAllAccountPositionsRequest} requestParameters Request parameters.
575
478
  * @param {*} [options] Override http request option.