snaptrade-typescript-sdk 13.2.5 → 13.2.6

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/dist/index.cjs CHANGED
@@ -659,6 +659,158 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
659
659
  };
660
660
  },
661
661
  /**
662
+ * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Beta:** this endpoint and its response schema may change.
663
+ * @summary Get account order detail
664
+ * @param {string} accountId
665
+ * @param {string} brokerageOrderId
666
+ * @param {string} [userId]
667
+ * @param {string} [userSecret]
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ */
671
+ getAccountOrder: async (accountId, brokerageOrderId, userId, userSecret, options = {}) => {
672
+ assertParamExists("getAccountOrder", "accountId", accountId);
673
+ assertParamExists("getAccountOrder", "brokerageOrderId", brokerageOrderId);
674
+ const localVarPath = `/accounts/{accountId}/orders/{brokerageOrderId}`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`))).replace(`{brokerageOrderId}`, encodeURIComponent(String(brokerageOrderId !== void 0 ? brokerageOrderId : `-brokerageOrderId-`)));
675
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
676
+ let baseOptions;
677
+ if (configuration) baseOptions = configuration.baseOptions;
678
+ const localVarRequestOptions = {
679
+ method: "GET",
680
+ ...baseOptions,
681
+ ...options
682
+ };
683
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
684
+ const localVarQueryParameter = {};
685
+ if (configuration?.authMode === "commercialApiKey") {
686
+ await setApiKeyToObject({
687
+ object: localVarQueryParameter,
688
+ key: "clientId",
689
+ keyParamName: "clientId",
690
+ configuration
691
+ });
692
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
693
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
694
+ }
695
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
696
+ object: localVarQueryParameter,
697
+ key: "clientId",
698
+ keyParamName: "clientId",
699
+ configuration
700
+ });
701
+ const localVarOperationAuth = {
702
+ authModes: ["commercialApiKey", "personalApiKey"],
703
+ requestSigningByAuthMode: {
704
+ "commercialApiKey": {
705
+ secretParameter: "consumerKey",
706
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
707
+ },
708
+ "personalApiKey": {
709
+ secretParameter: "consumerKey",
710
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
711
+ }
712
+ },
713
+ selectedAuthMode: configuration?.authMode
714
+ };
715
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
716
+ localVarRequestOptions.headers = {
717
+ ...localVarHeaderParameter,
718
+ ...headersFromBaseOptions,
719
+ ...options.headers
720
+ };
721
+ requestBeforeHook({
722
+ queryParameters: localVarQueryParameter,
723
+ requestConfig: localVarRequestOptions,
724
+ path: localVarPath,
725
+ configuration,
726
+ pathTemplate: "/accounts/{accountId}/orders/{brokerageOrderId}",
727
+ httpMethod: "GET",
728
+ operationAuth: localVarOperationAuth
729
+ });
730
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
731
+ return {
732
+ url: toPathString(localVarUrlObj),
733
+ options: localVarRequestOptions
734
+ };
735
+ },
736
+ /**
737
+ * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Beta:** this endpoint and its response schema may change. 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.
738
+ * @summary List all account orders
739
+ * @param {string} accountId
740
+ * @param {'all' | 'open' | 'executed'} [state] defaults to \"all\"
741
+ * @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
742
+ * @param {string} [userId]
743
+ * @param {string} [userSecret]
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ */
747
+ getAllAccountOrders: async (accountId, state, days, userId, userSecret, options = {}) => {
748
+ assertParamExists("getAllAccountOrders", "accountId", accountId);
749
+ const localVarPath = `/accounts/{accountId}/orders/all`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
750
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
751
+ let baseOptions;
752
+ if (configuration) baseOptions = configuration.baseOptions;
753
+ const localVarRequestOptions = {
754
+ method: "GET",
755
+ ...baseOptions,
756
+ ...options
757
+ };
758
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
759
+ const localVarQueryParameter = {};
760
+ if (configuration?.authMode === "commercialApiKey") {
761
+ await setApiKeyToObject({
762
+ object: localVarQueryParameter,
763
+ key: "clientId",
764
+ keyParamName: "clientId",
765
+ configuration
766
+ });
767
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
768
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
769
+ }
770
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
771
+ object: localVarQueryParameter,
772
+ key: "clientId",
773
+ keyParamName: "clientId",
774
+ configuration
775
+ });
776
+ if (state !== void 0) localVarQueryParameter["state"] = state;
777
+ if (days !== void 0) localVarQueryParameter["days"] = days;
778
+ const localVarOperationAuth = {
779
+ authModes: ["commercialApiKey", "personalApiKey"],
780
+ requestSigningByAuthMode: {
781
+ "commercialApiKey": {
782
+ secretParameter: "consumerKey",
783
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
784
+ },
785
+ "personalApiKey": {
786
+ secretParameter: "consumerKey",
787
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
788
+ }
789
+ },
790
+ selectedAuthMode: configuration?.authMode
791
+ };
792
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
793
+ localVarRequestOptions.headers = {
794
+ ...localVarHeaderParameter,
795
+ ...headersFromBaseOptions,
796
+ ...options.headers
797
+ };
798
+ requestBeforeHook({
799
+ queryParameters: localVarQueryParameter,
800
+ requestConfig: localVarRequestOptions,
801
+ path: localVarPath,
802
+ configuration,
803
+ pathTemplate: "/accounts/{accountId}/orders/all",
804
+ httpMethod: "GET",
805
+ operationAuth: localVarOperationAuth
806
+ });
807
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
808
+ return {
809
+ url: toPathString(localVarUrlObj),
810
+ options: localVarRequestOptions
811
+ };
812
+ },
813
+ /**
662
814
  * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, preferred stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
663
815
  * @summary List all account positions
664
816
  * @param {string} accountId
@@ -737,6 +889,81 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
737
889
  };
738
890
  },
739
891
  /**
892
+ * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Beta:** this endpoint and its response schema may change. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
893
+ * @summary List all account recent orders (last 24 hours only)
894
+ * @param {string} accountId
895
+ * @param {boolean} [onlyExecuted] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
896
+ * @param {string} [userId]
897
+ * @param {string} [userSecret]
898
+ * @param {*} [options] Override http request option.
899
+ * @throws {RequiredError}
900
+ */
901
+ getAllAccountRecentOrders: async (accountId, onlyExecuted, userId, userSecret, options = {}) => {
902
+ assertParamExists("getAllAccountRecentOrders", "accountId", accountId);
903
+ const localVarPath = `/accounts/{accountId}/orders/recent`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
904
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
905
+ let baseOptions;
906
+ if (configuration) baseOptions = configuration.baseOptions;
907
+ const localVarRequestOptions = {
908
+ method: "GET",
909
+ ...baseOptions,
910
+ ...options
911
+ };
912
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
913
+ const localVarQueryParameter = {};
914
+ if (configuration?.authMode === "commercialApiKey") {
915
+ await setApiKeyToObject({
916
+ object: localVarQueryParameter,
917
+ key: "clientId",
918
+ keyParamName: "clientId",
919
+ configuration
920
+ });
921
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
922
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
923
+ }
924
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
925
+ object: localVarQueryParameter,
926
+ key: "clientId",
927
+ keyParamName: "clientId",
928
+ configuration
929
+ });
930
+ if (onlyExecuted !== void 0) localVarQueryParameter["only_executed"] = onlyExecuted;
931
+ const localVarOperationAuth = {
932
+ authModes: ["commercialApiKey", "personalApiKey"],
933
+ requestSigningByAuthMode: {
934
+ "commercialApiKey": {
935
+ secretParameter: "consumerKey",
936
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
937
+ },
938
+ "personalApiKey": {
939
+ secretParameter: "consumerKey",
940
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
941
+ }
942
+ },
943
+ selectedAuthMode: configuration?.authMode
944
+ };
945
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
946
+ localVarRequestOptions.headers = {
947
+ ...localVarHeaderParameter,
948
+ ...headersFromBaseOptions,
949
+ ...options.headers
950
+ };
951
+ requestBeforeHook({
952
+ queryParameters: localVarQueryParameter,
953
+ requestConfig: localVarRequestOptions,
954
+ path: localVarPath,
955
+ configuration,
956
+ pathTemplate: "/accounts/{accountId}/orders/recent",
957
+ httpMethod: "GET",
958
+ operationAuth: localVarOperationAuth
959
+ });
960
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
961
+ return {
962
+ url: toPathString(localVarUrlObj),
963
+ options: localVarRequestOptions
964
+ };
965
+ },
966
+ /**
740
967
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
741
968
  * @summary List account balances
742
969
  * @param {string} accountId
@@ -1637,20 +1864,16 @@ const AccountInformationApiFp = function(configuration) {
1637
1864
  });
1638
1865
  },
1639
1866
  /**
1640
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, preferred stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
1641
- * @summary List all account positions
1642
- * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1867
+ * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Beta:** this endpoint and its response schema may change.
1868
+ * @summary Get account order detail
1869
+ * @param {AccountInformationApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
1643
1870
  * @param {*} [options] Override http request option.
1644
1871
  * @throws {RequiredError}
1645
1872
  */
1646
- async getAllAccountPositions(...args) {
1873
+ async getAccountOrder(...args) {
1647
1874
  const [requestParameters = {}, options] = args;
1648
- return createRequestFunction(await localVarAxiosParamCreator.getAllAccountPositions(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1649
- authModes: [
1650
- "commercialApiKey",
1651
- "personalApiKey",
1652
- "oauth"
1653
- ],
1875
+ return createRequestFunction(await localVarAxiosParamCreator.getAccountOrder(requestParameters.accountId, requestParameters.brokerageOrderId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1876
+ authModes: ["commercialApiKey", "personalApiKey"],
1654
1877
  requestSigningByAuthMode: {
1655
1878
  "commercialApiKey": {
1656
1879
  secretParameter: "consumerKey",
@@ -1664,20 +1887,16 @@ const AccountInformationApiFp = function(configuration) {
1664
1887
  });
1665
1888
  },
1666
1889
  /**
1667
- * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
1668
- * @summary List account balances
1669
- * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
1890
+ * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Beta:** this endpoint and its response schema may change. 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.
1891
+ * @summary List all account orders
1892
+ * @param {AccountInformationApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
1670
1893
  * @param {*} [options] Override http request option.
1671
1894
  * @throws {RequiredError}
1672
1895
  */
1673
- async getUserAccountBalance(...args) {
1896
+ async getAllAccountOrders(...args) {
1674
1897
  const [requestParameters = {}, options] = args;
1675
- return createRequestFunction(await localVarAxiosParamCreator.getUserAccountBalance(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1676
- authModes: [
1677
- "commercialApiKey",
1678
- "personalApiKey",
1679
- "oauth"
1680
- ],
1898
+ return createRequestFunction(await localVarAxiosParamCreator.getAllAccountOrders(requestParameters.accountId, requestParameters.state, requestParameters.days, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1899
+ authModes: ["commercialApiKey", "personalApiKey"],
1681
1900
  requestSigningByAuthMode: {
1682
1901
  "commercialApiKey": {
1683
1902
  secretParameter: "consumerKey",
@@ -1691,10 +1910,87 @@ const AccountInformationApiFp = function(configuration) {
1691
1910
  });
1692
1911
  },
1693
1912
  /**
1694
- * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, line of credit, annuity, and mortgage accounts. Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
1695
- * @summary Get account detail
1696
- * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1697
- * @param {*} [options] Override http request option.
1913
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, preferred stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
1914
+ * @summary List all account positions
1915
+ * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1916
+ * @param {*} [options] Override http request option.
1917
+ * @throws {RequiredError}
1918
+ */
1919
+ async getAllAccountPositions(...args) {
1920
+ const [requestParameters = {}, options] = args;
1921
+ return createRequestFunction(await localVarAxiosParamCreator.getAllAccountPositions(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1922
+ authModes: [
1923
+ "commercialApiKey",
1924
+ "personalApiKey",
1925
+ "oauth"
1926
+ ],
1927
+ requestSigningByAuthMode: {
1928
+ "commercialApiKey": {
1929
+ secretParameter: "consumerKey",
1930
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1931
+ },
1932
+ "personalApiKey": {
1933
+ secretParameter: "consumerKey",
1934
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1935
+ }
1936
+ }
1937
+ });
1938
+ },
1939
+ /**
1940
+ * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Beta:** this endpoint and its response schema may change. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
1941
+ * @summary List all account recent orders (last 24 hours only)
1942
+ * @param {AccountInformationApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ */
1946
+ async getAllAccountRecentOrders(...args) {
1947
+ const [requestParameters = {}, options] = args;
1948
+ return createRequestFunction(await localVarAxiosParamCreator.getAllAccountRecentOrders(requestParameters.accountId, requestParameters.onlyExecuted, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1949
+ authModes: ["commercialApiKey", "personalApiKey"],
1950
+ requestSigningByAuthMode: {
1951
+ "commercialApiKey": {
1952
+ secretParameter: "consumerKey",
1953
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1954
+ },
1955
+ "personalApiKey": {
1956
+ secretParameter: "consumerKey",
1957
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1958
+ }
1959
+ }
1960
+ });
1961
+ },
1962
+ /**
1963
+ * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
1964
+ * @summary List account balances
1965
+ * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
1966
+ * @param {*} [options] Override http request option.
1967
+ * @throws {RequiredError}
1968
+ */
1969
+ async getUserAccountBalance(...args) {
1970
+ const [requestParameters = {}, options] = args;
1971
+ return createRequestFunction(await localVarAxiosParamCreator.getUserAccountBalance(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
1972
+ authModes: [
1973
+ "commercialApiKey",
1974
+ "personalApiKey",
1975
+ "oauth"
1976
+ ],
1977
+ requestSigningByAuthMode: {
1978
+ "commercialApiKey": {
1979
+ secretParameter: "consumerKey",
1980
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1981
+ },
1982
+ "personalApiKey": {
1983
+ secretParameter: "consumerKey",
1984
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1985
+ }
1986
+ }
1987
+ });
1988
+ },
1989
+ /**
1990
+ * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, line of credit, annuity, and mortgage accounts. Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
1991
+ * @summary Get account detail
1992
+ * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1993
+ * @param {*} [options] Override http request option.
1698
1994
  * @deprecated
1699
1995
  * @throws {RequiredError}
1700
1996
  */
@@ -1983,6 +2279,26 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$10)
1983
2279
  return localVarFp.getAccountDetails(...args).then((request) => request(axios$10, basePath));
1984
2280
  },
1985
2281
  /**
2282
+ * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Beta:** this endpoint and its response schema may change.
2283
+ * @summary Get account order detail
2284
+ * @param {AccountInformationApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
2285
+ * @param {*} [options] Override http request option.
2286
+ * @throws {RequiredError}
2287
+ */
2288
+ getAccountOrder(...args) {
2289
+ return localVarFp.getAccountOrder(...args).then((request) => request(axios$10, basePath));
2290
+ },
2291
+ /**
2292
+ * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Beta:** this endpoint and its response schema may change. 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.
2293
+ * @summary List all account orders
2294
+ * @param {AccountInformationApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
2295
+ * @param {*} [options] Override http request option.
2296
+ * @throws {RequiredError}
2297
+ */
2298
+ getAllAccountOrders(...args) {
2299
+ return localVarFp.getAllAccountOrders(...args).then((request) => request(axios$10, basePath));
2300
+ },
2301
+ /**
1986
2302
  * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, preferred stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
1987
2303
  * @summary List all account positions
1988
2304
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -1993,6 +2309,16 @@ const AccountInformationApiFactory = function(configuration, basePath, axios$10)
1993
2309
  return localVarFp.getAllAccountPositions(...args).then((request) => request(axios$10, basePath));
1994
2310
  },
1995
2311
  /**
2312
+ * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Beta:** this endpoint and its response schema may change. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
2313
+ * @summary List all account recent orders (last 24 hours only)
2314
+ * @param {AccountInformationApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
2315
+ * @param {*} [options] Override http request option.
2316
+ * @throws {RequiredError}
2317
+ */
2318
+ getAllAccountRecentOrders(...args) {
2319
+ return localVarFp.getAllAccountRecentOrders(...args).then((request) => request(axios$10, basePath));
2320
+ },
2321
+ /**
1996
2322
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
1997
2323
  * @summary List account balances
1998
2324
  * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
@@ -2149,6 +2475,28 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2149
2475
  return AccountInformationApiFp(this.configuration).getAccountDetails(...args).then((request) => request(this.axios, this.basePath));
2150
2476
  }
2151
2477
  /**
2478
+ * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Beta:** this endpoint and its response schema may change.
2479
+ * @summary Get account order detail
2480
+ * @param {AccountInformationApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
2481
+ * @param {*} [options] Override http request option.
2482
+ * @throws {RequiredError}
2483
+ * @memberof AccountInformationApiGenerated
2484
+ */
2485
+ getAccountOrder(...args) {
2486
+ return AccountInformationApiFp(this.configuration).getAccountOrder(...args).then((request) => request(this.axios, this.basePath));
2487
+ }
2488
+ /**
2489
+ * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Beta:** this endpoint and its response schema may change. 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.
2490
+ * @summary List all account orders
2491
+ * @param {AccountInformationApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
2492
+ * @param {*} [options] Override http request option.
2493
+ * @throws {RequiredError}
2494
+ * @memberof AccountInformationApiGenerated
2495
+ */
2496
+ getAllAccountOrders(...args) {
2497
+ return AccountInformationApiFp(this.configuration).getAllAccountOrders(...args).then((request) => request(this.axios, this.basePath));
2498
+ }
2499
+ /**
2152
2500
  * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, preferred stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. Security positions (`stock`, `preferred_stock`, `adr`, `etf`, `mutualfund`, `cef`, `crypto`, `bond`, and `other`) may include `tax_lots` when tax lot data is enabled for the account; derivative, CFD, tokenized asset, and cash positions never do. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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.
2153
2501
  * @summary List all account positions
2154
2502
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -2160,6 +2508,17 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2160
2508
  return AccountInformationApiFp(this.configuration).getAllAccountPositions(...args).then((request) => request(this.axios, this.basePath));
2161
2509
  }
2162
2510
  /**
2511
+ * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Beta:** this endpoint and its response schema may change. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
2512
+ * @summary List all account recent orders (last 24 hours only)
2513
+ * @param {AccountInformationApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
2514
+ * @param {*} [options] Override http request option.
2515
+ * @throws {RequiredError}
2516
+ * @memberof AccountInformationApiGenerated
2517
+ */
2518
+ getAllAccountRecentOrders(...args) {
2519
+ return AccountInformationApiFp(this.configuration).getAllAccountRecentOrders(...args).then((request) => request(this.axios, this.basePath));
2520
+ }
2521
+ /**
2163
2522
  * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. 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.
2164
2523
  * @summary List account balances
2165
2524
  * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
@@ -4251,233 +4610,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
4251
4610
  };
4252
4611
  },
4253
4612
  /**
4254
- * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Experimental:** this endpoint may change without notice.
4255
- * @summary Get account order detail
4256
- * @param {string} accountId
4257
- * @param {string} brokerageOrderId
4258
- * @param {string} [userId]
4259
- * @param {string} [userSecret]
4260
- * @param {*} [options] Override http request option.
4261
- * @throws {RequiredError}
4262
- */
4263
- getAccountOrder: async (accountId, brokerageOrderId, userId, userSecret, options = {}) => {
4264
- assertParamExists("getAccountOrder", "accountId", accountId);
4265
- assertParamExists("getAccountOrder", "brokerageOrderId", brokerageOrderId);
4266
- const localVarPath = `/accounts/{accountId}/orders/{brokerageOrderId}`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`))).replace(`{brokerageOrderId}`, encodeURIComponent(String(brokerageOrderId !== void 0 ? brokerageOrderId : `-brokerageOrderId-`)));
4267
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4268
- let baseOptions;
4269
- if (configuration) baseOptions = configuration.baseOptions;
4270
- const localVarRequestOptions = {
4271
- method: "GET",
4272
- ...baseOptions,
4273
- ...options
4274
- };
4275
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4276
- const localVarQueryParameter = {};
4277
- if (configuration?.authMode === "commercialApiKey") {
4278
- await setApiKeyToObject({
4279
- object: localVarQueryParameter,
4280
- key: "clientId",
4281
- keyParamName: "clientId",
4282
- configuration
4283
- });
4284
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4285
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4286
- }
4287
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4288
- object: localVarQueryParameter,
4289
- key: "clientId",
4290
- keyParamName: "clientId",
4291
- configuration
4292
- });
4293
- const localVarOperationAuth = {
4294
- authModes: ["commercialApiKey", "personalApiKey"],
4295
- requestSigningByAuthMode: {
4296
- "commercialApiKey": {
4297
- secretParameter: "consumerKey",
4298
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4299
- },
4300
- "personalApiKey": {
4301
- secretParameter: "consumerKey",
4302
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4303
- }
4304
- },
4305
- selectedAuthMode: configuration?.authMode
4306
- };
4307
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4308
- localVarRequestOptions.headers = {
4309
- ...localVarHeaderParameter,
4310
- ...headersFromBaseOptions,
4311
- ...options.headers
4312
- };
4313
- requestBeforeHook({
4314
- queryParameters: localVarQueryParameter,
4315
- requestConfig: localVarRequestOptions,
4316
- path: localVarPath,
4317
- configuration,
4318
- pathTemplate: "/accounts/{accountId}/orders/{brokerageOrderId}",
4319
- httpMethod: "GET",
4320
- operationAuth: localVarOperationAuth
4321
- });
4322
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4323
- return {
4324
- url: toPathString(localVarUrlObj),
4325
- options: localVarRequestOptions
4326
- };
4327
- },
4328
- /**
4329
- * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Experimental:** this endpoint may change without notice. 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.
4330
- * @summary List all account orders
4331
- * @param {string} accountId
4332
- * @param {'all' | 'open' | 'executed'} [state] defaults to \&quot;all\&quot;
4333
- * @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
4334
- * @param {string} [userId]
4335
- * @param {string} [userSecret]
4336
- * @param {*} [options] Override http request option.
4337
- * @throws {RequiredError}
4338
- */
4339
- getAllAccountOrders: async (accountId, state, days, userId, userSecret, options = {}) => {
4340
- assertParamExists("getAllAccountOrders", "accountId", accountId);
4341
- const localVarPath = `/accounts/{accountId}/orders/all`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
4342
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4343
- let baseOptions;
4344
- if (configuration) baseOptions = configuration.baseOptions;
4345
- const localVarRequestOptions = {
4346
- method: "GET",
4347
- ...baseOptions,
4348
- ...options
4349
- };
4350
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4351
- const localVarQueryParameter = {};
4352
- if (configuration?.authMode === "commercialApiKey") {
4353
- await setApiKeyToObject({
4354
- object: localVarQueryParameter,
4355
- key: "clientId",
4356
- keyParamName: "clientId",
4357
- configuration
4358
- });
4359
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4360
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4361
- }
4362
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4363
- object: localVarQueryParameter,
4364
- key: "clientId",
4365
- keyParamName: "clientId",
4366
- configuration
4367
- });
4368
- if (state !== void 0) localVarQueryParameter["state"] = state;
4369
- if (days !== void 0) localVarQueryParameter["days"] = days;
4370
- const localVarOperationAuth = {
4371
- authModes: ["commercialApiKey", "personalApiKey"],
4372
- requestSigningByAuthMode: {
4373
- "commercialApiKey": {
4374
- secretParameter: "consumerKey",
4375
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4376
- },
4377
- "personalApiKey": {
4378
- secretParameter: "consumerKey",
4379
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4380
- }
4381
- },
4382
- selectedAuthMode: configuration?.authMode
4383
- };
4384
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4385
- localVarRequestOptions.headers = {
4386
- ...localVarHeaderParameter,
4387
- ...headersFromBaseOptions,
4388
- ...options.headers
4389
- };
4390
- requestBeforeHook({
4391
- queryParameters: localVarQueryParameter,
4392
- requestConfig: localVarRequestOptions,
4393
- path: localVarPath,
4394
- configuration,
4395
- pathTemplate: "/accounts/{accountId}/orders/all",
4396
- httpMethod: "GET",
4397
- operationAuth: localVarOperationAuth
4398
- });
4399
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4400
- return {
4401
- url: toPathString(localVarUrlObj),
4402
- options: localVarRequestOptions
4403
- };
4404
- },
4405
- /**
4406
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Experimental:** this endpoint may change without notice. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
4407
- * @summary List all account recent orders (last 24 hours only)
4408
- * @param {string} accountId
4409
- * @param {boolean} [onlyExecuted] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
4410
- * @param {string} [userId]
4411
- * @param {string} [userSecret]
4412
- * @param {*} [options] Override http request option.
4413
- * @throws {RequiredError}
4414
- */
4415
- getAllAccountRecentOrders: async (accountId, onlyExecuted, userId, userSecret, options = {}) => {
4416
- assertParamExists("getAllAccountRecentOrders", "accountId", accountId);
4417
- const localVarPath = `/accounts/{accountId}/orders/recent`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
4418
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4419
- let baseOptions;
4420
- if (configuration) baseOptions = configuration.baseOptions;
4421
- const localVarRequestOptions = {
4422
- method: "GET",
4423
- ...baseOptions,
4424
- ...options
4425
- };
4426
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4427
- const localVarQueryParameter = {};
4428
- if (configuration?.authMode === "commercialApiKey") {
4429
- await setApiKeyToObject({
4430
- object: localVarQueryParameter,
4431
- key: "clientId",
4432
- keyParamName: "clientId",
4433
- configuration
4434
- });
4435
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4436
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4437
- }
4438
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4439
- object: localVarQueryParameter,
4440
- key: "clientId",
4441
- keyParamName: "clientId",
4442
- configuration
4443
- });
4444
- if (onlyExecuted !== void 0) localVarQueryParameter["only_executed"] = onlyExecuted;
4445
- const localVarOperationAuth = {
4446
- authModes: ["commercialApiKey", "personalApiKey"],
4447
- requestSigningByAuthMode: {
4448
- "commercialApiKey": {
4449
- secretParameter: "consumerKey",
4450
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4451
- },
4452
- "personalApiKey": {
4453
- secretParameter: "consumerKey",
4454
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4455
- }
4456
- },
4457
- selectedAuthMode: configuration?.authMode
4458
- };
4459
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4460
- localVarRequestOptions.headers = {
4461
- ...localVarHeaderParameter,
4462
- ...headersFromBaseOptions,
4463
- ...options.headers
4464
- };
4465
- requestBeforeHook({
4466
- queryParameters: localVarQueryParameter,
4467
- requestConfig: localVarRequestOptions,
4468
- path: localVarPath,
4469
- configuration,
4470
- pathTemplate: "/accounts/{accountId}/orders/recent",
4471
- httpMethod: "GET",
4472
- operationAuth: localVarOperationAuth
4473
- });
4474
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4475
- return {
4476
- url: toPathString(localVarUrlObj),
4477
- options: localVarRequestOptions
4478
- };
4479
- },
4480
- /**
4481
4613
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
4482
4614
  * @summary Get account order detail (V2)
4483
4615
  * @param {string} accountId
@@ -4928,75 +5060,6 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4928
5060
  });
4929
5061
  },
4930
5062
  /**
4931
- * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Experimental:** this endpoint may change without notice.
4932
- * @summary Get account order detail
4933
- * @param {ExperimentalEndpointsApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
4934
- * @param {*} [options] Override http request option.
4935
- * @throws {RequiredError}
4936
- */
4937
- async getAccountOrder(...args) {
4938
- const [requestParameters = {}, options] = args;
4939
- return createRequestFunction(await localVarAxiosParamCreator.getAccountOrder(requestParameters.accountId, requestParameters.brokerageOrderId, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4940
- authModes: ["commercialApiKey", "personalApiKey"],
4941
- requestSigningByAuthMode: {
4942
- "commercialApiKey": {
4943
- secretParameter: "consumerKey",
4944
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4945
- },
4946
- "personalApiKey": {
4947
- secretParameter: "consumerKey",
4948
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4949
- }
4950
- }
4951
- });
4952
- },
4953
- /**
4954
- * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Experimental:** this endpoint may change without notice. 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.
4955
- * @summary List all account orders
4956
- * @param {ExperimentalEndpointsApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
4957
- * @param {*} [options] Override http request option.
4958
- * @throws {RequiredError}
4959
- */
4960
- async getAllAccountOrders(...args) {
4961
- const [requestParameters = {}, options] = args;
4962
- return createRequestFunction(await localVarAxiosParamCreator.getAllAccountOrders(requestParameters.accountId, requestParameters.state, requestParameters.days, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4963
- authModes: ["commercialApiKey", "personalApiKey"],
4964
- requestSigningByAuthMode: {
4965
- "commercialApiKey": {
4966
- secretParameter: "consumerKey",
4967
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4968
- },
4969
- "personalApiKey": {
4970
- secretParameter: "consumerKey",
4971
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4972
- }
4973
- }
4974
- });
4975
- },
4976
- /**
4977
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Experimental:** this endpoint may change without notice. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
4978
- * @summary List all account recent orders (last 24 hours only)
4979
- * @param {ExperimentalEndpointsApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
4980
- * @param {*} [options] Override http request option.
4981
- * @throws {RequiredError}
4982
- */
4983
- async getAllAccountRecentOrders(...args) {
4984
- const [requestParameters = {}, options] = args;
4985
- return createRequestFunction(await localVarAxiosParamCreator.getAllAccountRecentOrders(requestParameters.accountId, requestParameters.onlyExecuted, requestParameters.userId, requestParameters.userSecret, options), axios.default, BASE_PATH, configuration, {
4986
- authModes: ["commercialApiKey", "personalApiKey"],
4987
- requestSigningByAuthMode: {
4988
- "commercialApiKey": {
4989
- secretParameter: "consumerKey",
4990
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4991
- },
4992
- "personalApiKey": {
4993
- secretParameter: "consumerKey",
4994
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4995
- }
4996
- }
4997
- });
4998
- },
4999
- /**
5000
5063
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
5001
5064
  * @summary Get account order detail (V2)
5002
5065
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -5168,36 +5231,6 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios$
5168
5231
  return localVarFp.cancelSubscription(...args).then((request) => request(axios$6, basePath));
5169
5232
  },
5170
5233
  /**
5171
- * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Experimental:** this endpoint may change without notice.
5172
- * @summary Get account order detail
5173
- * @param {ExperimentalEndpointsApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
5174
- * @param {*} [options] Override http request option.
5175
- * @throws {RequiredError}
5176
- */
5177
- getAccountOrder(...args) {
5178
- return localVarFp.getAccountOrder(...args).then((request) => request(axios$6, basePath));
5179
- },
5180
- /**
5181
- * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Experimental:** this endpoint may change without notice. 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.
5182
- * @summary List all account orders
5183
- * @param {ExperimentalEndpointsApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
5184
- * @param {*} [options] Override http request option.
5185
- * @throws {RequiredError}
5186
- */
5187
- getAllAccountOrders(...args) {
5188
- return localVarFp.getAllAccountOrders(...args).then((request) => request(axios$6, basePath));
5189
- },
5190
- /**
5191
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Experimental:** this endpoint may change without notice. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
5192
- * @summary List all account recent orders (last 24 hours only)
5193
- * @param {ExperimentalEndpointsApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
5194
- * @param {*} [options] Override http request option.
5195
- * @throws {RequiredError}
5196
- */
5197
- getAllAccountRecentOrders(...args) {
5198
- return localVarFp.getAllAccountRecentOrders(...args).then((request) => request(axios$6, basePath));
5199
- },
5200
- /**
5201
5234
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
5202
5235
  * @summary Get account order detail (V2)
5203
5236
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -5278,39 +5311,6 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
5278
5311
  return ExperimentalEndpointsApiFp(this.configuration).cancelSubscription(...args).then((request) => request(this.axios, this.basePath));
5279
5312
  }
5280
5313
  /**
5281
- * Returns the detail of a single order, identified by the brokerage order ID in the path, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. The order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. Multi-leg orders are a single order with multiple legs. This endpoint is always realtime and does not rely on cached data, except that an order in a terminal state (executed, canceled, rejected, failed, expired, replaced) may be served from a short-lived cache since it can no longer change. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. **Experimental:** this endpoint may change without notice.
5282
- * @summary Get account order detail
5283
- * @param {ExperimentalEndpointsApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
5284
- * @param {*} [options] Override http request option.
5285
- * @throws {RequiredError}
5286
- * @memberof ExperimentalEndpointsApiGenerated
5287
- */
5288
- getAccountOrder(...args) {
5289
- return ExperimentalEndpointsApiFp(this.configuration).getAccountOrder(...args).then((request) => request(this.axios, this.basePath));
5290
- }
5291
- /**
5292
- * Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`. Every order carries a `legs` list with at least one leg. Each leg\'s `instrument` uses the same `Instrument` union as positions; switch on `instrument.kind` to know which fields are present. Multi-leg orders (spreads, strangles, covered calls) are a single order with multiple legs. Orders that belong to a complex order group (OCO, OTO, OTOCO) share a `group.id`. `order_type` is an object discriminated by `kind`. Each kind declares the price fields it requires (`limit_price` on `limit`, `stop_price` on `stop`, both on `stop_limit`, `trail` on `trailing_stop`), so a consumer never has to null-check a price that cannot exist for that kind. When the brokerage reports an order type we cannot normalize, `kind` is `other` and the brokerage\'s own label is in `raw_type`. **Experimental:** this endpoint may change without notice. 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.
5293
- * @summary List all account orders
5294
- * @param {ExperimentalEndpointsApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
5295
- * @param {*} [options] Override http request option.
5296
- * @throws {RequiredError}
5297
- * @memberof ExperimentalEndpointsApiGenerated
5298
- */
5299
- getAllAccountOrders(...args) {
5300
- return ExperimentalEndpointsApiFp(this.configuration).getAllAccountOrders(...args).then((request) => request(this.axios, this.basePath));
5301
- }
5302
- /**
5303
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/orders/all`. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from `/accounts/{accountId}/orders/all` in that it is always realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. Every order carries a `legs` list with at least one leg; switch on `legs[].instrument.kind` and `order_type.kind` to know which fields are present. `data_freshness.as_of` is the time of this live request. **Experimental:** this endpoint may change without notice. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
5304
- * @summary List all account recent orders (last 24 hours only)
5305
- * @param {ExperimentalEndpointsApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
5306
- * @param {*} [options] Override http request option.
5307
- * @throws {RequiredError}
5308
- * @memberof ExperimentalEndpointsApiGenerated
5309
- */
5310
- getAllAccountRecentOrders(...args) {
5311
- return ExperimentalEndpointsApiFp(this.configuration).getAllAccountRecentOrders(...args).then((request) => request(this.axios, this.basePath));
5312
- }
5313
- /**
5314
5314
  * Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
5315
5315
  * @summary Get account order detail (V2)
5316
5316
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -8691,7 +8691,7 @@ var Configuration = class {
8691
8691
  if (param.auth.mode === "oauth") this.accessToken = param.auth.accessToken;
8692
8692
  this.basePath = param.basePath;
8693
8693
  this.baseOptions = param.baseOptions ?? {};
8694
- this.userAgent = param.userAgent === void 0 ? "Konfig/13.2.5/typescript" : param.userAgent;
8694
+ this.userAgent = param.userAgent === void 0 ? "Konfig/13.2.6/typescript" : param.userAgent;
8695
8695
  this.formDataCtor = param.formDataCtor;
8696
8696
  }
8697
8697
  /**