snaptrade-typescript-sdk 2.4.0 → 4.0.0
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/.konfig/generate-id.txt +1 -1
- package/.konfigignore +3 -1
- package/README.md +107 -23
- package/api/account-information-api.ts +1075 -0
- package/api/api-disclaimer-api.ts +190 -0
- package/api/api-status-api.ts +128 -0
- package/api/authentication-api.ts +591 -0
- package/api/connections-api.ts +425 -0
- package/api/error-logs-api.ts +175 -0
- package/api/options-api.ts +758 -0
- package/api/portfolio-management-api.ts +3402 -0
- package/api/reference-data-api.ts +1076 -0
- package/api/trading-api.ts +1339 -0
- package/api/transactions-and-reporting-api.ts +391 -0
- package/api.ts +12 -11530
- package/base.ts +1 -2
- package/client.ts +55 -0
- package/common.ts +16 -54
- package/configuration.ts +33 -10
- package/dist/api/account-information-api.d.ts +525 -0
- package/dist/api/account-information-api.js +1049 -0
- package/dist/api/api-disclaimer-api.d.ts +102 -0
- package/dist/api/api-disclaimer-api.js +245 -0
- package/dist/api/api-status-api.d.ts +70 -0
- package/dist/api/api-status-api.js +203 -0
- package/dist/api/authentication-api.d.ts +280 -0
- package/dist/api/authentication-api.js +659 -0
- package/dist/api/connections-api.d.ts +214 -0
- package/dist/api/connections-api.js +470 -0
- package/dist/api/error-logs-api.d.ts +94 -0
- package/dist/api/error-logs-api.js +240 -0
- package/dist/api/options-api.d.ts +381 -0
- package/dist/api/options-api.js +728 -0
- package/dist/api/portfolio-management-api.d.ts +1624 -0
- package/dist/api/portfolio-management-api.js +3574 -0
- package/dist/api/reference-data-api.d.ts +481 -0
- package/dist/api/reference-data-api.js +1244 -0
- package/dist/api/trading-api.d.ts +662 -0
- package/dist/api/trading-api.js +1276 -0
- package/dist/api/transactions-and-reporting-api.d.ts +204 -0
- package/dist/api/transactions-and-reporting-api.js +387 -0
- package/dist/api.d.ts +12 -7363
- package/dist/api.js +24 -9175
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -2
- package/dist/client.d.ts +27 -0
- package/dist/client.js +34 -0
- package/dist/common.d.ts +1 -6
- package/dist/common.js +26 -81
- package/dist/configuration.d.ts +21 -6
- package/dist/configuration.js +13 -8
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- package/dist/index.test.js +84 -14
- package/dist/jest.config.js +0 -1
- package/dist/models/account-holdings.d.ts +47 -0
- package/dist/models/account-holdings.js +15 -0
- package/dist/models/account-order-record-status.d.ts +39 -0
- package/dist/models/account-order-record-status.js +43 -0
- package/dist/models/account-order-record.d.ts +126 -0
- package/dist/models/account-order-record.js +15 -0
- package/dist/models/account-simple.d.ts +37 -0
- package/dist/models/account-simple.js +15 -0
- package/dist/models/account.d.ts +76 -0
- package/dist/models/account.js +15 -0
- package/dist/models/action.d.ts +21 -0
- package/dist/models/action.js +25 -0
- package/dist/models/apidisclaimer-accept-request.d.ts +24 -0
- package/dist/models/apidisclaimer-accept-request.js +15 -0
- package/dist/models/authentication-login-snap-trade-user200-response.d.ts +18 -0
- package/dist/models/authentication-login-snap-trade-user200-response.js +15 -0
- package/dist/models/balance.d.ts +32 -0
- package/dist/models/balance.js +15 -0
- package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +37 -0
- package/dist/models/brokerage-authorization-type-read-only-brokerage.js +15 -0
- package/dist/models/brokerage-authorization-type-read-only.d.ts +56 -0
- package/dist/models/brokerage-authorization-type-read-only.js +26 -0
- package/dist/models/brokerage-authorization-type.d.ts +30 -0
- package/dist/models/brokerage-authorization-type.js +20 -0
- package/dist/models/brokerage-authorization.d.ts +76 -0
- package/dist/models/brokerage-authorization.js +15 -0
- package/dist/models/brokerage-symbol.d.ts +51 -0
- package/dist/models/brokerage-symbol.js +15 -0
- package/dist/models/brokerage-type.d.ts +31 -0
- package/dist/models/brokerage-type.js +15 -0
- package/dist/models/brokerage.d.ts +128 -0
- package/dist/models/brokerage.js +15 -0
- package/dist/models/calculated-trade.d.ts +32 -0
- package/dist/models/calculated-trade.js +15 -0
- package/dist/models/cash-restriction.d.ts +54 -0
- package/dist/models/cash-restriction.js +20 -0
- package/dist/models/currency.d.ts +37 -0
- package/dist/models/currency.js +15 -0
- package/dist/models/delete-user-response.d.ts +31 -0
- package/dist/models/delete-user-response.js +15 -0
- package/dist/models/dividend-at-date.d.ts +37 -0
- package/dist/models/dividend-at-date.js +15 -0
- package/dist/models/encrypted-response-encrypted-message-data.d.ts +37 -0
- package/dist/models/encrypted-response-encrypted-message-data.js +15 -0
- package/dist/models/encrypted-response.d.ts +31 -0
- package/dist/models/encrypted-response.js +15 -0
- package/dist/models/exchange-rate-pairs.d.ts +38 -0
- package/dist/models/exchange-rate-pairs.js +15 -0
- package/dist/models/exchange.d.ts +67 -0
- package/dist/models/exchange.js +15 -0
- package/dist/models/excluded-asset.d.ts +26 -0
- package/dist/models/excluded-asset.js +15 -0
- package/dist/models/index.d.ts +102 -0
- package/dist/models/index.js +118 -0
- package/dist/models/jwt.d.ts +25 -0
- package/dist/models/jwt.js +15 -0
- package/dist/models/login-redirect-uri.d.ts +30 -0
- package/dist/models/login-redirect-uri.js +15 -0
- package/dist/models/manual-trade-and-impact.d.ts +39 -0
- package/dist/models/manual-trade-and-impact.js +15 -0
- package/dist/models/manual-trade-balance.d.ts +39 -0
- package/dist/models/manual-trade-balance.js +15 -0
- package/dist/models/manual-trade-form.d.ts +69 -0
- package/dist/models/manual-trade-form.js +15 -0
- package/dist/models/manual-trade-symbol.d.ts +56 -0
- package/dist/models/manual-trade-symbol.js +15 -0
- package/dist/models/manual-trade.d.ts +72 -0
- package/dist/models/manual-trade.js +15 -0
- package/dist/models/model-asset-class-details.d.ts +32 -0
- package/dist/models/model-asset-class-details.js +15 -0
- package/dist/models/model-asset-class-target.d.ts +26 -0
- package/dist/models/model-asset-class-target.js +15 -0
- package/dist/models/model-asset-class.d.ts +31 -0
- package/dist/models/model-asset-class.js +15 -0
- package/dist/models/model-portfolio-asset-class.d.ts +32 -0
- package/dist/models/model-portfolio-asset-class.js +15 -0
- package/dist/models/model-portfolio-details.d.ts +39 -0
- package/dist/models/model-portfolio-details.js +15 -0
- package/dist/models/model-portfolio-security.d.ts +32 -0
- package/dist/models/model-portfolio-security.js +15 -0
- package/dist/models/model-portfolio.d.ts +43 -0
- package/dist/models/model-portfolio.js +21 -0
- package/dist/models/model400-failed-request-response.d.ts +31 -0
- package/dist/models/model400-failed-request-response.js +15 -0
- package/dist/models/model401-failed-request-response.d.ts +31 -0
- package/dist/models/model401-failed-request-response.js +15 -0
- package/dist/models/model403-failed-request-response.d.ts +31 -0
- package/dist/models/model403-failed-request-response.js +15 -0
- package/dist/models/model404-failed-request-response.d.ts +31 -0
- package/dist/models/model404-failed-request-response.js +15 -0
- package/dist/models/monthly-dividends.d.ts +32 -0
- package/dist/models/monthly-dividends.js +15 -0
- package/dist/models/net-contributions.d.ts +37 -0
- package/dist/models/net-contributions.js +15 -0
- package/dist/models/net-dividend.d.ts +38 -0
- package/dist/models/net-dividend.js +15 -0
- package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +37 -0
- package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +15 -0
- package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +38 -0
- package/dist/models/option-chain-inner-chain-per-root-inner.js +15 -0
- package/dist/models/option-chain-inner.d.ts +50 -0
- package/dist/models/option-chain-inner.js +15 -0
- package/dist/models/option-leg.d.ts +44 -0
- package/dist/models/option-leg.js +22 -0
- package/dist/models/option-strategy-legs-inner.d.ts +42 -0
- package/dist/models/option-strategy-legs-inner.js +15 -0
- package/dist/models/option-strategy.d.ts +51 -0
- package/dist/models/option-strategy.js +15 -0
- package/dist/models/options-get-option-strategy-request.d.ts +41 -0
- package/dist/models/options-get-option-strategy-request.js +19 -0
- package/dist/models/options-holdings.d.ts +57 -0
- package/dist/models/options-holdings.js +15 -0
- package/dist/models/options-place-option-strategy-request.d.ts +48 -0
- package/dist/models/options-place-option-strategy-request.js +26 -0
- package/dist/models/options-position.d.ts +63 -0
- package/dist/models/options-position.js +15 -0
- package/dist/models/options-symbol.d.ts +86 -0
- package/dist/models/options-symbol.js +15 -0
- package/dist/models/order-type.d.ts +23 -0
- package/dist/models/order-type.js +27 -0
- package/dist/models/partner-data.d.ts +92 -0
- package/dist/models/partner-data.js +15 -0
- package/dist/models/past-value.d.ts +37 -0
- package/dist/models/past-value.js +15 -0
- package/dist/models/performance-custom.d.ts +138 -0
- package/dist/models/performance-custom.js +15 -0
- package/dist/models/portfolio-group-info.d.ts +93 -0
- package/dist/models/portfolio-group-info.js +15 -0
- package/dist/models/portfolio-group-position.d.ts +38 -0
- package/dist/models/portfolio-group-position.js +15 -0
- package/dist/models/portfolio-group-settings.d.ts +50 -0
- package/dist/models/portfolio-group-settings.js +15 -0
- package/dist/models/portfolio-group.d.ts +31 -0
- package/dist/models/portfolio-group.js +15 -0
- package/dist/models/position-symbol.d.ts +56 -0
- package/dist/models/position-symbol.js +15 -0
- package/dist/models/position.d.ts +56 -0
- package/dist/models/position.js +15 -0
- package/dist/models/redirect-tokenand-pin.d.ts +31 -0
- package/dist/models/redirect-tokenand-pin.js +15 -0
- package/dist/models/security-type.d.ts +43 -0
- package/dist/models/security-type.js +15 -0
- package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +31 -0
- package/dist/models/snap-trade-apidisclaimer-accept-status.js +15 -0
- package/dist/models/snap-trade-holdings-account.d.ts +64 -0
- package/dist/models/snap-trade-holdings-account.js +15 -0
- package/dist/models/snap-trade-holdings-total-value.d.ts +31 -0
- package/dist/models/snap-trade-holdings-total-value.js +15 -0
- package/dist/models/snap-trade-login-user-request-body.d.ts +53 -0
- package/dist/models/snap-trade-login-user-request-body.js +20 -0
- package/dist/models/snap-trade-register-user-request-body.d.ts +30 -0
- package/dist/models/snap-trade-register-user-request-body.js +15 -0
- package/dist/models/status.d.ts +37 -0
- package/dist/models/status.js +15 -0
- package/dist/models/strategy-impact-legs-inner.d.ts +61 -0
- package/dist/models/strategy-impact-legs-inner.js +15 -0
- package/dist/models/strategy-impact.d.ts +86 -0
- package/dist/models/strategy-impact.js +15 -0
- package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +61 -0
- package/dist/models/strategy-order-place-orders-inner-legs-inner.js +15 -0
- package/dist/models/strategy-order-place-orders-inner.d.ts +278 -0
- package/dist/models/strategy-order-place-orders-inner.js +15 -0
- package/dist/models/strategy-order-place.d.ts +32 -0
- package/dist/models/strategy-order-place.js +15 -0
- package/dist/models/strategy-order-record.d.ts +120 -0
- package/dist/models/strategy-order-record.js +47 -0
- package/dist/models/strategy-quotes-greek.d.ts +49 -0
- package/dist/models/strategy-quotes-greek.js +15 -0
- package/dist/models/strategy-quotes.d.ts +57 -0
- package/dist/models/strategy-quotes.js +15 -0
- package/dist/models/sub-period-return-rate.d.ts +37 -0
- package/dist/models/sub-period-return-rate.js +15 -0
- package/dist/models/symbol-query.d.ts +24 -0
- package/dist/models/symbol-query.js +15 -0
- package/dist/models/symbol.d.ts +51 -0
- package/dist/models/symbol.js +15 -0
- package/dist/models/symbols-quotes.d.ts +56 -0
- package/dist/models/symbols-quotes.js +15 -0
- package/dist/models/target-asset.d.ts +55 -0
- package/dist/models/target-asset.js +15 -0
- package/dist/models/time-in-force.d.ts +22 -0
- package/dist/models/time-in-force.js +26 -0
- package/dist/models/trade-execution-status.d.ts +91 -0
- package/dist/models/trade-execution-status.js +27 -0
- package/dist/models/trade-impact.d.ts +51 -0
- package/dist/models/trade-impact.js +15 -0
- package/dist/models/trade.d.ts +74 -0
- package/dist/models/trade.js +20 -0
- package/dist/models/trading-place-ocoorder-request.d.ts +30 -0
- package/dist/models/trading-place-ocoorder-request.js +15 -0
- package/dist/models/underlying-symbol.d.ts +64 -0
- package/dist/models/underlying-symbol.js +15 -0
- package/dist/models/universal-activity.d.ts +134 -0
- package/dist/models/universal-activity.js +36 -0
- package/dist/models/universal-symbol-ticker.d.ts +70 -0
- package/dist/models/universal-symbol-ticker.js +15 -0
- package/dist/models/universal-symbol.d.ts +69 -0
- package/dist/models/universal-symbol.js +15 -0
- package/dist/models/user-error-log.d.ts +55 -0
- package/dist/models/user-error-log.js +15 -0
- package/dist/models/user-idand-secret.d.ts +31 -0
- package/dist/models/user-idand-secret.js +15 -0
- package/dist/models/user-settings.d.ts +80 -0
- package/dist/models/user-settings.js +15 -0
- package/dist/models/usexchange.d.ts +73 -0
- package/dist/models/usexchange.js +15 -0
- package/dist/pagination/page.d.ts +31 -0
- package/dist/pagination/page.js +58 -0
- package/dist/pagination/pageable.d.ts +53 -0
- package/dist/pagination/pageable.js +128 -0
- package/dist/pagination/paginate.d.ts +17 -0
- package/dist/pagination/paginate.js +78 -0
- package/dist/requestAfterHook.d.ts +8 -0
- package/dist/requestAfterHook.js +45 -0
- package/dist/requestBeforeHook.d.ts +8 -0
- package/dist/requestBeforeHook.js +8 -0
- package/docs/AccountInformationApi.md +485 -0
- package/docs/ApiDisclaimerApi.md +69 -0
- package/docs/ApiStatusApi.md +60 -0
- package/docs/AuthenticationApi.md +307 -0
- package/docs/ConnectionsApi.md +186 -0
- package/docs/ErrorLogsApi.md +65 -0
- package/docs/OptionsApi.md +321 -0
- package/docs/PortfolioManagementApi.md +1866 -0
- package/docs/ReferenceDataApi.md +597 -0
- package/docs/TradingApi.md +629 -0
- package/docs/TransactionsAndReportingApi.md +141 -0
- package/index.test.ts +62 -13
- package/index.ts +3 -3
- package/models/account-holdings.ts +61 -0
- package/models/account-order-record-status.ts +48 -0
- package/models/account-order-record.ts +142 -0
- package/models/account-simple.ts +43 -0
- package/models/account.ts +82 -0
- package/models/action.ts +30 -0
- package/models/apidisclaimer-accept-request.ts +29 -0
- package/models/authentication-login-snap-trade-user200-response.ts +31 -0
- package/models/balance.ts +40 -0
- package/models/brokerage-authorization-type-read-only-brokerage.ts +43 -0
- package/models/brokerage-authorization-type-read-only.ts +68 -0
- package/models/brokerage-authorization-type.ts +39 -0
- package/models/brokerage-authorization.ts +82 -0
- package/models/brokerage-symbol.ts +61 -0
- package/models/brokerage-type.ts +37 -0
- package/models/brokerage.ts +136 -0
- package/models/calculated-trade.ts +40 -0
- package/models/cash-restriction.ts +63 -0
- package/models/currency.ts +43 -0
- package/models/delete-user-response.ts +37 -0
- package/models/dividend-at-date.ts +43 -0
- package/models/encrypted-response-encrypted-message-data.ts +43 -0
- package/models/encrypted-response.ts +38 -0
- package/models/exchange-rate-pairs.ts +46 -0
- package/models/exchange.ts +73 -0
- package/models/excluded-asset.ts +34 -0
- package/models/index.ts +102 -0
- package/models/jwt.ts +31 -0
- package/models/login-redirect-uri.ts +35 -0
- package/models/manual-trade-and-impact.ts +49 -0
- package/models/manual-trade-balance.ts +49 -0
- package/models/manual-trade-form.ts +80 -0
- package/models/manual-trade-symbol.ts +64 -0
- package/models/manual-trade.ts +88 -0
- package/models/model-asset-class-details.ts +41 -0
- package/models/model-asset-class-target.ts +34 -0
- package/models/model-asset-class.ts +37 -0
- package/models/model-portfolio-asset-class.ts +40 -0
- package/models/model-portfolio-details.ts +50 -0
- package/models/model-portfolio-security.ts +40 -0
- package/models/model-portfolio.ts +52 -0
- package/models/model400-failed-request-response.ts +37 -0
- package/models/model401-failed-request-response.ts +37 -0
- package/models/model403-failed-request-response.ts +37 -0
- package/models/model404-failed-request-response.ts +37 -0
- package/models/monthly-dividends.ts +40 -0
- package/models/net-contributions.ts +43 -0
- package/models/net-dividend.ts +46 -0
- package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +43 -0
- package/models/option-chain-inner-chain-per-root-inner.ts +46 -0
- package/models/option-chain-inner.ts +58 -0
- package/models/option-leg.ts +53 -0
- package/models/option-strategy-legs-inner.ts +47 -0
- package/models/option-strategy.ts +61 -0
- package/models/options-get-option-strategy-request.ts +51 -0
- package/models/options-holdings.ts +67 -0
- package/models/options-place-option-strategy-request.ts +57 -0
- package/models/options-position.ts +73 -0
- package/models/options-symbol.ts +94 -0
- package/models/order-type.ts +32 -0
- package/models/partner-data.ts +100 -0
- package/models/past-value.ts +43 -0
- package/models/performance-custom.ts +154 -0
- package/models/portfolio-group-info.ts +115 -0
- package/models/portfolio-group-position.ts +46 -0
- package/models/portfolio-group-settings.ts +58 -0
- package/models/portfolio-group.ts +37 -0
- package/models/position-symbol.ts +64 -0
- package/models/position.ts +64 -0
- package/models/redirect-tokenand-pin.ts +37 -0
- package/models/security-type.ts +49 -0
- package/models/snap-trade-apidisclaimer-accept-status.ts +37 -0
- package/models/snap-trade-holdings-account.ts +70 -0
- package/models/snap-trade-holdings-total-value.ts +37 -0
- package/models/snap-trade-login-user-request-body.ts +61 -0
- package/models/snap-trade-register-user-request-body.ts +35 -0
- package/models/status.ts +43 -0
- package/models/strategy-impact-legs-inner.ts +67 -0
- package/models/strategy-impact.ts +94 -0
- package/models/strategy-order-place-orders-inner-legs-inner.ts +67 -0
- package/models/strategy-order-place-orders-inner.ts +286 -0
- package/models/strategy-order-place.ts +40 -0
- package/models/strategy-order-record.ts +133 -0
- package/models/strategy-quotes-greek.ts +55 -0
- package/models/strategy-quotes.ts +67 -0
- package/models/sub-period-return-rate.ts +43 -0
- package/models/symbol-query.ts +29 -0
- package/models/symbol.ts +61 -0
- package/models/symbols-quotes.ts +64 -0
- package/models/target-asset.ts +62 -0
- package/models/time-in-force.ts +31 -0
- package/models/trade-execution-status.ts +105 -0
- package/models/trade-impact.ts +61 -0
- package/models/trade.ts +88 -0
- package/models/trading-place-ocoorder-request.ts +35 -0
- package/models/underlying-symbol.ts +76 -0
- package/models/universal-activity.ts +151 -0
- package/models/universal-symbol-ticker.ts +82 -0
- package/models/universal-symbol.ts +80 -0
- package/models/user-error-log.ts +61 -0
- package/models/user-idand-secret.ts +37 -0
- package/models/user-settings.ts +88 -0
- package/models/usexchange.ts +79 -0
- package/package.json +1 -1
- package/pagination/page.ts +50 -0
- package/pagination/pageable.ts +107 -0
- package/pagination/paginate.ts +40 -0
- package/requestAfterHook.ts +53 -0
- package/requestBeforeHook.ts +14 -0
- package/tsconfig.json +0 -1
- package/dist/api.js.map +0 -1
- package/dist/base.js.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/configuration.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.test.js.map +0 -1
- package/dist/jest.config.js.map +0 -1
- package/git_push.sh +0 -57
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* SnapTrade
|
|
5
|
+
* Connect brokerage accounts to your app for live positions and trading
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: api@snaptrade.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
11
|
+
* https://konfigthis.com
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
16
|
+
import { Configuration } from '../configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { PerformanceCustom } from '../models';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import { UniversalActivity } from '../models';
|
|
26
|
+
import { paginate } from "../pagination/paginate";
|
|
27
|
+
import { requestBeforeHook } from '../requestBeforeHook';
|
|
28
|
+
/**
|
|
29
|
+
* TransactionsAndReportingApi - axios parameter creator
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
export const TransactionsAndReportingApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
33
|
+
return {
|
|
34
|
+
/**
|
|
35
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
36
|
+
* @summary Get transaction history for a user
|
|
37
|
+
* @param {string} userId
|
|
38
|
+
* @param {string} userSecret
|
|
39
|
+
* @param {string} [startDate]
|
|
40
|
+
* @param {string} [endDate]
|
|
41
|
+
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
getActivities: async (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
// verify required parameter 'userId' is not null or undefined
|
|
47
|
+
assertParamExists('getActivities', 'userId', userId)
|
|
48
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
49
|
+
assertParamExists('getActivities', 'userSecret', userSecret)
|
|
50
|
+
const localVarPath = `/activities`;
|
|
51
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
52
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
53
|
+
let baseOptions;
|
|
54
|
+
if (configuration) {
|
|
55
|
+
baseOptions = configuration.baseOptions;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
59
|
+
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
60
|
+
const localVarQueryParameter = {} as any;
|
|
61
|
+
|
|
62
|
+
// authentication PartnerClientId required
|
|
63
|
+
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
64
|
+
|
|
65
|
+
// authentication PartnerSignature required
|
|
66
|
+
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
67
|
+
|
|
68
|
+
// authentication PartnerTimestamp required
|
|
69
|
+
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
70
|
+
|
|
71
|
+
if (startDate !== undefined) {
|
|
72
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (endDate !== undefined) {
|
|
76
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (accounts !== undefined) {
|
|
80
|
+
localVarQueryParameter['accounts'] = accounts;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (userId !== undefined) {
|
|
84
|
+
localVarQueryParameter['userId'] = userId;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (userSecret !== undefined) {
|
|
88
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
94
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
95
|
+
|
|
96
|
+
requestBeforeHook({
|
|
97
|
+
queryParameters: localVarQueryParameter,
|
|
98
|
+
requestConfig: localVarRequestOptions,
|
|
99
|
+
path: localVarPath,
|
|
100
|
+
configuration
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
104
|
+
return {
|
|
105
|
+
url: toPathString(localVarUrlObj),
|
|
106
|
+
options: localVarRequestOptions,
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
111
|
+
* @summary Get performance information for a specific timeframe
|
|
112
|
+
* @param {string} startDate
|
|
113
|
+
* @param {string} endDate
|
|
114
|
+
* @param {string} userId
|
|
115
|
+
* @param {string} userSecret
|
|
116
|
+
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
117
|
+
* @param {boolean} [detailed] Optional, increases frequency of data points for the total value and contribution charts if set to true
|
|
118
|
+
* @param {string} [frequency] Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
*/
|
|
122
|
+
getReportingCustomRange: async (startDate: string, endDate: string, userId: string, userSecret: string, accounts?: string, detailed?: boolean, frequency?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
123
|
+
// verify required parameter 'startDate' is not null or undefined
|
|
124
|
+
assertParamExists('getReportingCustomRange', 'startDate', startDate)
|
|
125
|
+
// verify required parameter 'endDate' is not null or undefined
|
|
126
|
+
assertParamExists('getReportingCustomRange', 'endDate', endDate)
|
|
127
|
+
// verify required parameter 'userId' is not null or undefined
|
|
128
|
+
assertParamExists('getReportingCustomRange', 'userId', userId)
|
|
129
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
130
|
+
assertParamExists('getReportingCustomRange', 'userSecret', userSecret)
|
|
131
|
+
const localVarPath = `/performance/custom`;
|
|
132
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
133
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
134
|
+
let baseOptions;
|
|
135
|
+
if (configuration) {
|
|
136
|
+
baseOptions = configuration.baseOptions;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
140
|
+
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
141
|
+
const localVarQueryParameter = {} as any;
|
|
142
|
+
|
|
143
|
+
// authentication PartnerClientId required
|
|
144
|
+
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
145
|
+
|
|
146
|
+
// authentication PartnerSignature required
|
|
147
|
+
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
148
|
+
|
|
149
|
+
// authentication PartnerTimestamp required
|
|
150
|
+
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
151
|
+
|
|
152
|
+
if (startDate !== undefined) {
|
|
153
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (endDate !== undefined) {
|
|
157
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (accounts !== undefined) {
|
|
161
|
+
localVarQueryParameter['accounts'] = accounts;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (detailed !== undefined) {
|
|
165
|
+
localVarQueryParameter['detailed'] = detailed;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (frequency !== undefined) {
|
|
169
|
+
localVarQueryParameter['frequency'] = frequency;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (userId !== undefined) {
|
|
173
|
+
localVarQueryParameter['userId'] = userId;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (userSecret !== undefined) {
|
|
177
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
184
|
+
|
|
185
|
+
requestBeforeHook({
|
|
186
|
+
queryParameters: localVarQueryParameter,
|
|
187
|
+
requestConfig: localVarRequestOptions,
|
|
188
|
+
path: localVarPath,
|
|
189
|
+
configuration
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
193
|
+
return {
|
|
194
|
+
url: toPathString(localVarUrlObj),
|
|
195
|
+
options: localVarRequestOptions,
|
|
196
|
+
};
|
|
197
|
+
},
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* TransactionsAndReportingApi - functional programming interface
|
|
203
|
+
* @export
|
|
204
|
+
*/
|
|
205
|
+
export const TransactionsAndReportingApiFp = function(configuration?: Configuration) {
|
|
206
|
+
const localVarAxiosParamCreator = TransactionsAndReportingApiAxiosParamCreator(configuration)
|
|
207
|
+
return {
|
|
208
|
+
/**
|
|
209
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
210
|
+
* @summary Get transaction history for a user
|
|
211
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
*/
|
|
215
|
+
async getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UniversalActivity>>> {
|
|
216
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, options);
|
|
217
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
221
|
+
* @summary Get performance information for a specific timeframe
|
|
222
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
223
|
+
* @param {*} [options] Override http request option.
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
*/
|
|
226
|
+
async getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PerformanceCustom>> {
|
|
227
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getReportingCustomRange(requestParameters.startDate, requestParameters.endDate, requestParameters.userId, requestParameters.userSecret, requestParameters.accounts, requestParameters.detailed, requestParameters.frequency, options);
|
|
228
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
229
|
+
},
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* TransactionsAndReportingApi - factory interface
|
|
235
|
+
* @export
|
|
236
|
+
*/
|
|
237
|
+
export const TransactionsAndReportingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
238
|
+
const localVarFp = TransactionsAndReportingApiFp(configuration)
|
|
239
|
+
return {
|
|
240
|
+
/**
|
|
241
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
242
|
+
* @summary Get transaction history for a user
|
|
243
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
244
|
+
* @param {*} [options] Override http request option.
|
|
245
|
+
* @throws {RequiredError}
|
|
246
|
+
*/
|
|
247
|
+
getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<UniversalActivity>> {
|
|
248
|
+
return localVarFp.getActivities(requestParameters, options).then((request) => request(axios, basePath));
|
|
249
|
+
},
|
|
250
|
+
/**
|
|
251
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
252
|
+
* @summary Get performance information for a specific timeframe
|
|
253
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
254
|
+
* @param {*} [options] Override http request option.
|
|
255
|
+
* @throws {RequiredError}
|
|
256
|
+
*/
|
|
257
|
+
getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): AxiosPromise<PerformanceCustom> {
|
|
258
|
+
return localVarFp.getReportingCustomRange(requestParameters, options).then((request) => request(axios, basePath));
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Request parameters for getActivities operation in TransactionsAndReportingApi.
|
|
265
|
+
* @export
|
|
266
|
+
* @interface TransactionsAndReportingApiGetActivitiesRequest
|
|
267
|
+
*/
|
|
268
|
+
export interface TransactionsAndReportingApiGetActivitiesRequest {
|
|
269
|
+
/**
|
|
270
|
+
*
|
|
271
|
+
* @type {string}
|
|
272
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
273
|
+
*/
|
|
274
|
+
readonly userId: string
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @type {string}
|
|
279
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
280
|
+
*/
|
|
281
|
+
readonly userSecret: string
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* @type {string}
|
|
286
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
287
|
+
*/
|
|
288
|
+
readonly startDate?: string
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
*
|
|
292
|
+
* @type {string}
|
|
293
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
294
|
+
*/
|
|
295
|
+
readonly endDate?: string
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
299
|
+
* @type {string}
|
|
300
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
301
|
+
*/
|
|
302
|
+
readonly accounts?: string
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Request parameters for getReportingCustomRange operation in TransactionsAndReportingApi.
|
|
307
|
+
* @export
|
|
308
|
+
* @interface TransactionsAndReportingApiGetReportingCustomRangeRequest
|
|
309
|
+
*/
|
|
310
|
+
export interface TransactionsAndReportingApiGetReportingCustomRangeRequest {
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
* @type {string}
|
|
314
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
315
|
+
*/
|
|
316
|
+
readonly startDate: string
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
*
|
|
320
|
+
* @type {string}
|
|
321
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
322
|
+
*/
|
|
323
|
+
readonly endDate: string
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
*
|
|
327
|
+
* @type {string}
|
|
328
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
329
|
+
*/
|
|
330
|
+
readonly userId: string
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
*
|
|
334
|
+
* @type {string}
|
|
335
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
336
|
+
*/
|
|
337
|
+
readonly userSecret: string
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
341
|
+
* @type {string}
|
|
342
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
343
|
+
*/
|
|
344
|
+
readonly accounts?: string
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Optional, increases frequency of data points for the total value and contribution charts if set to true
|
|
348
|
+
* @type {boolean}
|
|
349
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
350
|
+
*/
|
|
351
|
+
readonly detailed?: boolean
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
|
|
355
|
+
* @type {string}
|
|
356
|
+
* @memberof TransactionsAndReportingApiGetReportingCustomRange
|
|
357
|
+
*/
|
|
358
|
+
readonly frequency?: string
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* TransactionsAndReportingApi - object-oriented interface
|
|
363
|
+
* @export
|
|
364
|
+
* @class TransactionsAndReportingApi
|
|
365
|
+
* @extends {BaseAPI}
|
|
366
|
+
*/
|
|
367
|
+
export class TransactionsAndReportingApi extends BaseAPI {
|
|
368
|
+
/**
|
|
369
|
+
* Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
|
|
370
|
+
* @summary Get transaction history for a user
|
|
371
|
+
* @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
* @memberof TransactionsAndReportingApi
|
|
375
|
+
*/
|
|
376
|
+
public getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig) {
|
|
377
|
+
return TransactionsAndReportingApiFp(this.configuration).getActivities(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
|
|
382
|
+
* @summary Get performance information for a specific timeframe
|
|
383
|
+
* @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
|
|
384
|
+
* @param {*} [options] Override http request option.
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
* @memberof TransactionsAndReportingApi
|
|
387
|
+
*/
|
|
388
|
+
public getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig) {
|
|
389
|
+
return TransactionsAndReportingApiFp(this.configuration).getReportingCustomRange(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
390
|
+
}
|
|
391
|
+
}
|