snaptrade-typescript-sdk 13.2.4 → 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.mjs CHANGED
@@ -557,7 +557,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
557
557
  };
558
558
  },
559
559
  /**
560
- * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, or annuity account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
560
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, annuity, or mortgage account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
561
561
  * @summary Get account details
562
562
  * @param {string} accountId
563
563
  * @param {string} [userId]
@@ -635,6 +635,158 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
635
635
  };
636
636
  },
637
637
  /**
638
+ * 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.
639
+ * @summary Get account order detail
640
+ * @param {string} accountId
641
+ * @param {string} brokerageOrderId
642
+ * @param {string} [userId]
643
+ * @param {string} [userSecret]
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ */
647
+ getAccountOrder: async (accountId, brokerageOrderId, userId, userSecret, options = {}) => {
648
+ assertParamExists("getAccountOrder", "accountId", accountId);
649
+ assertParamExists("getAccountOrder", "brokerageOrderId", brokerageOrderId);
650
+ const localVarPath = `/accounts/{accountId}/orders/{brokerageOrderId}`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`))).replace(`{brokerageOrderId}`, encodeURIComponent(String(brokerageOrderId !== void 0 ? brokerageOrderId : `-brokerageOrderId-`)));
651
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
652
+ let baseOptions;
653
+ if (configuration) baseOptions = configuration.baseOptions;
654
+ const localVarRequestOptions = {
655
+ method: "GET",
656
+ ...baseOptions,
657
+ ...options
658
+ };
659
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
660
+ const localVarQueryParameter = {};
661
+ if (configuration?.authMode === "commercialApiKey") {
662
+ await setApiKeyToObject({
663
+ object: localVarQueryParameter,
664
+ key: "clientId",
665
+ keyParamName: "clientId",
666
+ configuration
667
+ });
668
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
669
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
670
+ }
671
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
672
+ object: localVarQueryParameter,
673
+ key: "clientId",
674
+ keyParamName: "clientId",
675
+ configuration
676
+ });
677
+ const localVarOperationAuth = {
678
+ authModes: ["commercialApiKey", "personalApiKey"],
679
+ requestSigningByAuthMode: {
680
+ "commercialApiKey": {
681
+ secretParameter: "consumerKey",
682
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
683
+ },
684
+ "personalApiKey": {
685
+ secretParameter: "consumerKey",
686
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
687
+ }
688
+ },
689
+ selectedAuthMode: configuration?.authMode
690
+ };
691
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
692
+ localVarRequestOptions.headers = {
693
+ ...localVarHeaderParameter,
694
+ ...headersFromBaseOptions,
695
+ ...options.headers
696
+ };
697
+ requestBeforeHook({
698
+ queryParameters: localVarQueryParameter,
699
+ requestConfig: localVarRequestOptions,
700
+ path: localVarPath,
701
+ configuration,
702
+ pathTemplate: "/accounts/{accountId}/orders/{brokerageOrderId}",
703
+ httpMethod: "GET",
704
+ operationAuth: localVarOperationAuth
705
+ });
706
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
707
+ return {
708
+ url: toPathString(localVarUrlObj),
709
+ options: localVarRequestOptions
710
+ };
711
+ },
712
+ /**
713
+ * 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.
714
+ * @summary List all account orders
715
+ * @param {string} accountId
716
+ * @param {'all' | 'open' | 'executed'} [state] defaults to \"all\"
717
+ * @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.
718
+ * @param {string} [userId]
719
+ * @param {string} [userSecret]
720
+ * @param {*} [options] Override http request option.
721
+ * @throws {RequiredError}
722
+ */
723
+ getAllAccountOrders: async (accountId, state, days, userId, userSecret, options = {}) => {
724
+ assertParamExists("getAllAccountOrders", "accountId", accountId);
725
+ const localVarPath = `/accounts/{accountId}/orders/all`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
726
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
727
+ let baseOptions;
728
+ if (configuration) baseOptions = configuration.baseOptions;
729
+ const localVarRequestOptions = {
730
+ method: "GET",
731
+ ...baseOptions,
732
+ ...options
733
+ };
734
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
735
+ const localVarQueryParameter = {};
736
+ if (configuration?.authMode === "commercialApiKey") {
737
+ await setApiKeyToObject({
738
+ object: localVarQueryParameter,
739
+ key: "clientId",
740
+ keyParamName: "clientId",
741
+ configuration
742
+ });
743
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
744
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
745
+ }
746
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
747
+ object: localVarQueryParameter,
748
+ key: "clientId",
749
+ keyParamName: "clientId",
750
+ configuration
751
+ });
752
+ if (state !== void 0) localVarQueryParameter["state"] = state;
753
+ if (days !== void 0) localVarQueryParameter["days"] = days;
754
+ const localVarOperationAuth = {
755
+ authModes: ["commercialApiKey", "personalApiKey"],
756
+ requestSigningByAuthMode: {
757
+ "commercialApiKey": {
758
+ secretParameter: "consumerKey",
759
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
760
+ },
761
+ "personalApiKey": {
762
+ secretParameter: "consumerKey",
763
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
764
+ }
765
+ },
766
+ selectedAuthMode: configuration?.authMode
767
+ };
768
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
769
+ localVarRequestOptions.headers = {
770
+ ...localVarHeaderParameter,
771
+ ...headersFromBaseOptions,
772
+ ...options.headers
773
+ };
774
+ requestBeforeHook({
775
+ queryParameters: localVarQueryParameter,
776
+ requestConfig: localVarRequestOptions,
777
+ path: localVarPath,
778
+ configuration,
779
+ pathTemplate: "/accounts/{accountId}/orders/all",
780
+ httpMethod: "GET",
781
+ operationAuth: localVarOperationAuth
782
+ });
783
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
784
+ return {
785
+ url: toPathString(localVarUrlObj),
786
+ options: localVarRequestOptions
787
+ };
788
+ },
789
+ /**
638
790
  * 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.
639
791
  * @summary List all account positions
640
792
  * @param {string} accountId
@@ -713,6 +865,81 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
713
865
  };
714
866
  },
715
867
  /**
868
+ * 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)**
869
+ * @summary List all account recent orders (last 24 hours only)
870
+ * @param {string} accountId
871
+ * @param {boolean} [onlyExecuted] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
872
+ * @param {string} [userId]
873
+ * @param {string} [userSecret]
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ */
877
+ getAllAccountRecentOrders: async (accountId, onlyExecuted, userId, userSecret, options = {}) => {
878
+ assertParamExists("getAllAccountRecentOrders", "accountId", accountId);
879
+ const localVarPath = `/accounts/{accountId}/orders/recent`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
880
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
881
+ let baseOptions;
882
+ if (configuration) baseOptions = configuration.baseOptions;
883
+ const localVarRequestOptions = {
884
+ method: "GET",
885
+ ...baseOptions,
886
+ ...options
887
+ };
888
+ const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
889
+ const localVarQueryParameter = {};
890
+ if (configuration?.authMode === "commercialApiKey") {
891
+ await setApiKeyToObject({
892
+ object: localVarQueryParameter,
893
+ key: "clientId",
894
+ keyParamName: "clientId",
895
+ configuration
896
+ });
897
+ if (userId !== void 0) localVarQueryParameter["userId"] = userId;
898
+ if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
899
+ }
900
+ if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
901
+ object: localVarQueryParameter,
902
+ key: "clientId",
903
+ keyParamName: "clientId",
904
+ configuration
905
+ });
906
+ if (onlyExecuted !== void 0) localVarQueryParameter["only_executed"] = onlyExecuted;
907
+ const localVarOperationAuth = {
908
+ authModes: ["commercialApiKey", "personalApiKey"],
909
+ requestSigningByAuthMode: {
910
+ "commercialApiKey": {
911
+ secretParameter: "consumerKey",
912
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
913
+ },
914
+ "personalApiKey": {
915
+ secretParameter: "consumerKey",
916
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
917
+ }
918
+ },
919
+ selectedAuthMode: configuration?.authMode
920
+ };
921
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
922
+ localVarRequestOptions.headers = {
923
+ ...localVarHeaderParameter,
924
+ ...headersFromBaseOptions,
925
+ ...options.headers
926
+ };
927
+ requestBeforeHook({
928
+ queryParameters: localVarQueryParameter,
929
+ requestConfig: localVarRequestOptions,
930
+ path: localVarPath,
931
+ configuration,
932
+ pathTemplate: "/accounts/{accountId}/orders/recent",
933
+ httpMethod: "GET",
934
+ operationAuth: localVarOperationAuth
935
+ });
936
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
937
+ return {
938
+ url: toPathString(localVarUrlObj),
939
+ options: localVarRequestOptions
940
+ };
941
+ },
942
+ /**
716
943
  * 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.
717
944
  * @summary List account balances
718
945
  * @param {string} accountId
@@ -791,7 +1018,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
791
1018
  };
792
1019
  },
793
1020
  /**
794
- * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, line of credit, and annuity 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.
1021
+ * **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.
795
1022
  * @summary Get account detail
796
1023
  * @param {string} accountId
797
1024
  * @param {string} [userId]
@@ -1269,7 +1496,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
1269
1496
  };
1270
1497
  },
1271
1498
  /**
1272
- * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1499
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1273
1500
  * @summary List all user accounts
1274
1501
  * @param {string} [userId]
1275
1502
  * @param {string} [userSecret]
@@ -1345,7 +1572,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
1345
1572
  };
1346
1573
  },
1347
1574
  /**
1348
- * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, and annuity accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1575
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, annuity, and mortgage accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1349
1576
  * @summary List user accounts
1350
1577
  * @param {string} [userId]
1351
1578
  * @param {string} [userSecret]
@@ -1586,7 +1813,7 @@ const AccountInformationApiFp = function(configuration) {
1586
1813
  });
1587
1814
  },
1588
1815
  /**
1589
- * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, or annuity account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
1816
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, annuity, or mortgage account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
1590
1817
  * @summary Get account details
1591
1818
  * @param {AccountInformationApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1592
1819
  * @param {*} [options] Override http request option.
@@ -1613,20 +1840,16 @@ const AccountInformationApiFp = function(configuration) {
1613
1840
  });
1614
1841
  },
1615
1842
  /**
1616
- * 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.
1617
- * @summary List all account positions
1618
- * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1843
+ * 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.
1844
+ * @summary Get account order detail
1845
+ * @param {AccountInformationApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
1619
1846
  * @param {*} [options] Override http request option.
1620
1847
  * @throws {RequiredError}
1621
1848
  */
1622
- async getAllAccountPositions(...args) {
1849
+ async getAccountOrder(...args) {
1623
1850
  const [requestParameters = {}, options] = args;
1624
- return createRequestFunction(await localVarAxiosParamCreator.getAllAccountPositions(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1625
- authModes: [
1626
- "commercialApiKey",
1627
- "personalApiKey",
1628
- "oauth"
1629
- ],
1851
+ return createRequestFunction(await localVarAxiosParamCreator.getAccountOrder(requestParameters.accountId, requestParameters.brokerageOrderId, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1852
+ authModes: ["commercialApiKey", "personalApiKey"],
1630
1853
  requestSigningByAuthMode: {
1631
1854
  "commercialApiKey": {
1632
1855
  secretParameter: "consumerKey",
@@ -1640,20 +1863,16 @@ const AccountInformationApiFp = function(configuration) {
1640
1863
  });
1641
1864
  },
1642
1865
  /**
1643
- * 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.
1644
- * @summary List account balances
1645
- * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
1866
+ * 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.
1867
+ * @summary List all account orders
1868
+ * @param {AccountInformationApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
1646
1869
  * @param {*} [options] Override http request option.
1647
1870
  * @throws {RequiredError}
1648
1871
  */
1649
- async getUserAccountBalance(...args) {
1872
+ async getAllAccountOrders(...args) {
1650
1873
  const [requestParameters = {}, options] = args;
1651
- return createRequestFunction(await localVarAxiosParamCreator.getUserAccountBalance(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1652
- authModes: [
1653
- "commercialApiKey",
1654
- "personalApiKey",
1655
- "oauth"
1656
- ],
1874
+ return createRequestFunction(await localVarAxiosParamCreator.getAllAccountOrders(requestParameters.accountId, requestParameters.state, requestParameters.days, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1875
+ authModes: ["commercialApiKey", "personalApiKey"],
1657
1876
  requestSigningByAuthMode: {
1658
1877
  "commercialApiKey": {
1659
1878
  secretParameter: "consumerKey",
@@ -1667,11 +1886,88 @@ const AccountInformationApiFp = function(configuration) {
1667
1886
  });
1668
1887
  },
1669
1888
  /**
1670
- * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, line of credit, and annuity 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.
1671
- * @summary Get account detail
1672
- * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1673
- * @param {*} [options] Override http request option.
1674
- * @deprecated
1889
+ * 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.
1890
+ * @summary List all account positions
1891
+ * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
1892
+ * @param {*} [options] Override http request option.
1893
+ * @throws {RequiredError}
1894
+ */
1895
+ async getAllAccountPositions(...args) {
1896
+ const [requestParameters = {}, options] = args;
1897
+ return createRequestFunction(await localVarAxiosParamCreator.getAllAccountPositions(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1898
+ authModes: [
1899
+ "commercialApiKey",
1900
+ "personalApiKey",
1901
+ "oauth"
1902
+ ],
1903
+ requestSigningByAuthMode: {
1904
+ "commercialApiKey": {
1905
+ secretParameter: "consumerKey",
1906
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1907
+ },
1908
+ "personalApiKey": {
1909
+ secretParameter: "consumerKey",
1910
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1911
+ }
1912
+ }
1913
+ });
1914
+ },
1915
+ /**
1916
+ * 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)**
1917
+ * @summary List all account recent orders (last 24 hours only)
1918
+ * @param {AccountInformationApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
1919
+ * @param {*} [options] Override http request option.
1920
+ * @throws {RequiredError}
1921
+ */
1922
+ async getAllAccountRecentOrders(...args) {
1923
+ const [requestParameters = {}, options] = args;
1924
+ return createRequestFunction(await localVarAxiosParamCreator.getAllAccountRecentOrders(requestParameters.accountId, requestParameters.onlyExecuted, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1925
+ authModes: ["commercialApiKey", "personalApiKey"],
1926
+ requestSigningByAuthMode: {
1927
+ "commercialApiKey": {
1928
+ secretParameter: "consumerKey",
1929
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1930
+ },
1931
+ "personalApiKey": {
1932
+ secretParameter: "consumerKey",
1933
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1934
+ }
1935
+ }
1936
+ });
1937
+ },
1938
+ /**
1939
+ * 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.
1940
+ * @summary List account balances
1941
+ * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
1942
+ * @param {*} [options] Override http request option.
1943
+ * @throws {RequiredError}
1944
+ */
1945
+ async getUserAccountBalance(...args) {
1946
+ const [requestParameters = {}, options] = args;
1947
+ return createRequestFunction(await localVarAxiosParamCreator.getUserAccountBalance(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
1948
+ authModes: [
1949
+ "commercialApiKey",
1950
+ "personalApiKey",
1951
+ "oauth"
1952
+ ],
1953
+ requestSigningByAuthMode: {
1954
+ "commercialApiKey": {
1955
+ secretParameter: "consumerKey",
1956
+ signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
1957
+ },
1958
+ "personalApiKey": {
1959
+ secretParameter: "consumerKey",
1960
+ signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
1961
+ }
1962
+ }
1963
+ });
1964
+ },
1965
+ /**
1966
+ * **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.
1967
+ * @summary Get account detail
1968
+ * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1969
+ * @param {*} [options] Override http request option.
1970
+ * @deprecated
1675
1971
  * @throws {RequiredError}
1676
1972
  */
1677
1973
  async getUserAccountDetails(...args) {
@@ -1828,7 +2124,7 @@ const AccountInformationApiFp = function(configuration) {
1828
2124
  });
1829
2125
  },
1830
2126
  /**
1831
- * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2127
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1832
2128
  * @summary List all user accounts
1833
2129
  * @param {AccountInformationApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
1834
2130
  * @param {*} [options] Override http request option.
@@ -1855,7 +2151,7 @@ const AccountInformationApiFp = function(configuration) {
1855
2151
  });
1856
2152
  },
1857
2153
  /**
1858
- * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, and annuity accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2154
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, annuity, and mortgage accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1859
2155
  * @summary List user accounts
1860
2156
  * @param {AccountInformationApiListUserAccountsRequest<TAuth>} requestParameters Request parameters.
1861
2157
  * @param {*} [options] Override http request option.
@@ -1949,7 +2245,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1949
2245
  return localVarFp.getAccountBalancesV2(...args).then((request) => request(axios, basePath));
1950
2246
  },
1951
2247
  /**
1952
- * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, or annuity account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
2248
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, annuity, or mortgage account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
1953
2249
  * @summary Get account details
1954
2250
  * @param {AccountInformationApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1955
2251
  * @param {*} [options] Override http request option.
@@ -1959,6 +2255,26 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1959
2255
  return localVarFp.getAccountDetails(...args).then((request) => request(axios, basePath));
1960
2256
  },
1961
2257
  /**
2258
+ * 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.
2259
+ * @summary Get account order detail
2260
+ * @param {AccountInformationApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
2261
+ * @param {*} [options] Override http request option.
2262
+ * @throws {RequiredError}
2263
+ */
2264
+ getAccountOrder(...args) {
2265
+ return localVarFp.getAccountOrder(...args).then((request) => request(axios, basePath));
2266
+ },
2267
+ /**
2268
+ * 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.
2269
+ * @summary List all account orders
2270
+ * @param {AccountInformationApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
2271
+ * @param {*} [options] Override http request option.
2272
+ * @throws {RequiredError}
2273
+ */
2274
+ getAllAccountOrders(...args) {
2275
+ return localVarFp.getAllAccountOrders(...args).then((request) => request(axios, basePath));
2276
+ },
2277
+ /**
1962
2278
  * 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.
1963
2279
  * @summary List all account positions
1964
2280
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -1969,6 +2285,16 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1969
2285
  return localVarFp.getAllAccountPositions(...args).then((request) => request(axios, basePath));
1970
2286
  },
1971
2287
  /**
2288
+ * 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)**
2289
+ * @summary List all account recent orders (last 24 hours only)
2290
+ * @param {AccountInformationApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
2291
+ * @param {*} [options] Override http request option.
2292
+ * @throws {RequiredError}
2293
+ */
2294
+ getAllAccountRecentOrders(...args) {
2295
+ return localVarFp.getAllAccountRecentOrders(...args).then((request) => request(axios, basePath));
2296
+ },
2297
+ /**
1972
2298
  * 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.
1973
2299
  * @summary List account balances
1974
2300
  * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
@@ -1979,7 +2305,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1979
2305
  return localVarFp.getUserAccountBalance(...args).then((request) => request(axios, basePath));
1980
2306
  },
1981
2307
  /**
1982
- * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, line of credit, and annuity 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.
2308
+ * **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.
1983
2309
  * @summary Get account detail
1984
2310
  * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
1985
2311
  * @param {*} [options] Override http request option.
@@ -2041,7 +2367,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
2041
2367
  return localVarFp.getUserHoldings(...args).then((request) => request(axios, basePath));
2042
2368
  },
2043
2369
  /**
2044
- * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2370
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2045
2371
  * @summary List all user accounts
2046
2372
  * @param {AccountInformationApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
2047
2373
  * @param {*} [options] Override http request option.
@@ -2051,7 +2377,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
2051
2377
  return localVarFp.listAllUserAccounts(...args).then((request) => request(axios, basePath));
2052
2378
  },
2053
2379
  /**
2054
- * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, and annuity accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2380
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, annuity, and mortgage accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2055
2381
  * @summary List user accounts
2056
2382
  * @param {AccountInformationApiListUserAccountsRequest<TAuth>} requestParameters Request parameters.
2057
2383
  * @param {*} [options] Override http request option.
@@ -2114,7 +2440,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2114
2440
  return AccountInformationApiFp(this.configuration).getAccountBalancesV2(...args).then((request) => request(this.axios, this.basePath));
2115
2441
  }
2116
2442
  /**
2117
- * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, or annuity account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
2443
+ * Returns the specified account for the authenticated user. The account can be an investment, deposit, line of credit, annuity, or mortgage account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. If the connection has become disabled, it can no longer access the latest data from the institution, 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.
2118
2444
  * @summary Get account details
2119
2445
  * @param {AccountInformationApiGetAccountDetailsRequest<TAuth>} requestParameters Request parameters.
2120
2446
  * @param {*} [options] Override http request option.
@@ -2125,6 +2451,28 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2125
2451
  return AccountInformationApiFp(this.configuration).getAccountDetails(...args).then((request) => request(this.axios, this.basePath));
2126
2452
  }
2127
2453
  /**
2454
+ * 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.
2455
+ * @summary Get account order detail
2456
+ * @param {AccountInformationApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
2457
+ * @param {*} [options] Override http request option.
2458
+ * @throws {RequiredError}
2459
+ * @memberof AccountInformationApiGenerated
2460
+ */
2461
+ getAccountOrder(...args) {
2462
+ return AccountInformationApiFp(this.configuration).getAccountOrder(...args).then((request) => request(this.axios, this.basePath));
2463
+ }
2464
+ /**
2465
+ * 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.
2466
+ * @summary List all account orders
2467
+ * @param {AccountInformationApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
2468
+ * @param {*} [options] Override http request option.
2469
+ * @throws {RequiredError}
2470
+ * @memberof AccountInformationApiGenerated
2471
+ */
2472
+ getAllAccountOrders(...args) {
2473
+ return AccountInformationApiFp(this.configuration).getAllAccountOrders(...args).then((request) => request(this.axios, this.basePath));
2474
+ }
2475
+ /**
2128
2476
  * 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.
2129
2477
  * @summary List all account positions
2130
2478
  * @param {AccountInformationApiGetAllAccountPositionsRequest<TAuth>} requestParameters Request parameters.
@@ -2136,6 +2484,17 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2136
2484
  return AccountInformationApiFp(this.configuration).getAllAccountPositions(...args).then((request) => request(this.axios, this.basePath));
2137
2485
  }
2138
2486
  /**
2487
+ * 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)**
2488
+ * @summary List all account recent orders (last 24 hours only)
2489
+ * @param {AccountInformationApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
2490
+ * @param {*} [options] Override http request option.
2491
+ * @throws {RequiredError}
2492
+ * @memberof AccountInformationApiGenerated
2493
+ */
2494
+ getAllAccountRecentOrders(...args) {
2495
+ return AccountInformationApiFp(this.configuration).getAllAccountRecentOrders(...args).then((request) => request(this.axios, this.basePath));
2496
+ }
2497
+ /**
2139
2498
  * 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.
2140
2499
  * @summary List account balances
2141
2500
  * @param {AccountInformationApiGetUserAccountBalanceRequest<TAuth>} requestParameters Request parameters.
@@ -2147,7 +2506,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2147
2506
  return AccountInformationApiFp(this.configuration).getUserAccountBalance(...args).then((request) => request(this.axios, this.basePath));
2148
2507
  }
2149
2508
  /**
2150
- * **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, line of credit, and annuity 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.
2509
+ * **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.
2151
2510
  * @summary Get account detail
2152
2511
  * @param {AccountInformationApiGetUserAccountDetailsRequest<TAuth>} requestParameters Request parameters.
2153
2512
  * @param {*} [options] Override http request option.
@@ -2215,7 +2574,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2215
2574
  return AccountInformationApiFp(this.configuration).getUserHoldings(...args).then((request) => request(this.axios, this.basePath));
2216
2575
  }
2217
2576
  /**
2218
- * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2577
+ * Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2219
2578
  * @summary List all user accounts
2220
2579
  * @param {AccountInformationApiListAllUserAccountsRequest<TAuth>} requestParameters Request parameters.
2221
2580
  * @param {*} [options] Override http request option.
@@ -2226,7 +2585,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
2226
2585
  return AccountInformationApiFp(this.configuration).listAllUserAccounts(...args).then((request) => request(this.axios, this.basePath));
2227
2586
  }
2228
2587
  /**
2229
- * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, and annuity accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2588
+ * **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, annuity, and mortgage accounts. Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user\'s connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
2230
2589
  * @summary List user accounts
2231
2590
  * @param {AccountInformationApiListUserAccountsRequest<TAuth>} requestParameters Request parameters.
2232
2591
  * @param {*} [options] Override http request option.
@@ -3309,7 +3668,7 @@ const ConnectionsApiAxiosParamCreator = function(configuration) {
3309
3668
  };
3310
3669
  },
3311
3670
  /**
3312
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3671
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3313
3672
  * @summary List accounts
3314
3673
  * @param {string} connectionId
3315
3674
  * @param {string} [userId]
@@ -3758,7 +4117,7 @@ const ConnectionsApiFp = function(configuration) {
3758
4117
  });
3759
4118
  },
3760
4119
  /**
3761
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4120
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3762
4121
  * @summary List accounts
3763
4122
  * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3764
4123
  * @param {*} [options] Override http request option.
@@ -3921,7 +4280,7 @@ const ConnectionsApiFactory = function(configuration, basePath, axios) {
3921
4280
  return localVarFp.listBrokerageAuthorizations(...args).then((request) => request(axios, basePath));
3922
4281
  },
3923
4282
  /**
3924
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4283
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
3925
4284
  * @summary List accounts
3926
4285
  * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
3927
4286
  * @param {*} [options] Override http request option.
@@ -4025,7 +4384,7 @@ var ConnectionsApiGenerated = class extends BaseAPI {
4025
4384
  return ConnectionsApiFp(this.configuration).listBrokerageAuthorizations(...args).then((request) => request(this.axios, this.basePath));
4026
4385
  }
4027
4386
  /**
4028
- * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4387
+ * Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by institution. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
4029
4388
  * @summary List accounts
4030
4389
  * @param {ConnectionsApiListConnectionAccountsRequest<TAuth>} requestParameters Request parameters.
4031
4390
  * @param {*} [options] Override http request option.
@@ -4227,233 +4586,6 @@ const ExperimentalEndpointsApiAxiosParamCreator = function(configuration) {
4227
4586
  };
4228
4587
  },
4229
4588
  /**
4230
- * 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.
4231
- * @summary Get account order detail
4232
- * @param {string} accountId
4233
- * @param {string} brokerageOrderId
4234
- * @param {string} [userId]
4235
- * @param {string} [userSecret]
4236
- * @param {*} [options] Override http request option.
4237
- * @throws {RequiredError}
4238
- */
4239
- getAccountOrder: async (accountId, brokerageOrderId, userId, userSecret, options = {}) => {
4240
- assertParamExists("getAccountOrder", "accountId", accountId);
4241
- assertParamExists("getAccountOrder", "brokerageOrderId", brokerageOrderId);
4242
- const localVarPath = `/accounts/{accountId}/orders/{brokerageOrderId}`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`))).replace(`{brokerageOrderId}`, encodeURIComponent(String(brokerageOrderId !== void 0 ? brokerageOrderId : `-brokerageOrderId-`)));
4243
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4244
- let baseOptions;
4245
- if (configuration) baseOptions = configuration.baseOptions;
4246
- const localVarRequestOptions = {
4247
- method: "GET",
4248
- ...baseOptions,
4249
- ...options
4250
- };
4251
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4252
- const localVarQueryParameter = {};
4253
- if (configuration?.authMode === "commercialApiKey") {
4254
- await setApiKeyToObject({
4255
- object: localVarQueryParameter,
4256
- key: "clientId",
4257
- keyParamName: "clientId",
4258
- configuration
4259
- });
4260
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4261
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4262
- }
4263
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4264
- object: localVarQueryParameter,
4265
- key: "clientId",
4266
- keyParamName: "clientId",
4267
- configuration
4268
- });
4269
- const localVarOperationAuth = {
4270
- authModes: ["commercialApiKey", "personalApiKey"],
4271
- requestSigningByAuthMode: {
4272
- "commercialApiKey": {
4273
- secretParameter: "consumerKey",
4274
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4275
- },
4276
- "personalApiKey": {
4277
- secretParameter: "consumerKey",
4278
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4279
- }
4280
- },
4281
- selectedAuthMode: configuration?.authMode
4282
- };
4283
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4284
- localVarRequestOptions.headers = {
4285
- ...localVarHeaderParameter,
4286
- ...headersFromBaseOptions,
4287
- ...options.headers
4288
- };
4289
- requestBeforeHook({
4290
- queryParameters: localVarQueryParameter,
4291
- requestConfig: localVarRequestOptions,
4292
- path: localVarPath,
4293
- configuration,
4294
- pathTemplate: "/accounts/{accountId}/orders/{brokerageOrderId}",
4295
- httpMethod: "GET",
4296
- operationAuth: localVarOperationAuth
4297
- });
4298
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4299
- return {
4300
- url: toPathString(localVarUrlObj),
4301
- options: localVarRequestOptions
4302
- };
4303
- },
4304
- /**
4305
- * 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.
4306
- * @summary List all account orders
4307
- * @param {string} accountId
4308
- * @param {'all' | 'open' | 'executed'} [state] defaults to \&quot;all\&quot;
4309
- * @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.
4310
- * @param {string} [userId]
4311
- * @param {string} [userSecret]
4312
- * @param {*} [options] Override http request option.
4313
- * @throws {RequiredError}
4314
- */
4315
- getAllAccountOrders: async (accountId, state, days, userId, userSecret, options = {}) => {
4316
- assertParamExists("getAllAccountOrders", "accountId", accountId);
4317
- const localVarPath = `/accounts/{accountId}/orders/all`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
4318
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4319
- let baseOptions;
4320
- if (configuration) baseOptions = configuration.baseOptions;
4321
- const localVarRequestOptions = {
4322
- method: "GET",
4323
- ...baseOptions,
4324
- ...options
4325
- };
4326
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4327
- const localVarQueryParameter = {};
4328
- if (configuration?.authMode === "commercialApiKey") {
4329
- await setApiKeyToObject({
4330
- object: localVarQueryParameter,
4331
- key: "clientId",
4332
- keyParamName: "clientId",
4333
- configuration
4334
- });
4335
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4336
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4337
- }
4338
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4339
- object: localVarQueryParameter,
4340
- key: "clientId",
4341
- keyParamName: "clientId",
4342
- configuration
4343
- });
4344
- if (state !== void 0) localVarQueryParameter["state"] = state;
4345
- if (days !== void 0) localVarQueryParameter["days"] = days;
4346
- const localVarOperationAuth = {
4347
- authModes: ["commercialApiKey", "personalApiKey"],
4348
- requestSigningByAuthMode: {
4349
- "commercialApiKey": {
4350
- secretParameter: "consumerKey",
4351
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4352
- },
4353
- "personalApiKey": {
4354
- secretParameter: "consumerKey",
4355
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4356
- }
4357
- },
4358
- selectedAuthMode: configuration?.authMode
4359
- };
4360
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4361
- localVarRequestOptions.headers = {
4362
- ...localVarHeaderParameter,
4363
- ...headersFromBaseOptions,
4364
- ...options.headers
4365
- };
4366
- requestBeforeHook({
4367
- queryParameters: localVarQueryParameter,
4368
- requestConfig: localVarRequestOptions,
4369
- path: localVarPath,
4370
- configuration,
4371
- pathTemplate: "/accounts/{accountId}/orders/all",
4372
- httpMethod: "GET",
4373
- operationAuth: localVarOperationAuth
4374
- });
4375
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4376
- return {
4377
- url: toPathString(localVarUrlObj),
4378
- options: localVarRequestOptions
4379
- };
4380
- },
4381
- /**
4382
- * 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)**
4383
- * @summary List all account recent orders (last 24 hours only)
4384
- * @param {string} accountId
4385
- * @param {boolean} [onlyExecuted] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
4386
- * @param {string} [userId]
4387
- * @param {string} [userSecret]
4388
- * @param {*} [options] Override http request option.
4389
- * @throws {RequiredError}
4390
- */
4391
- getAllAccountRecentOrders: async (accountId, onlyExecuted, userId, userSecret, options = {}) => {
4392
- assertParamExists("getAllAccountRecentOrders", "accountId", accountId);
4393
- const localVarPath = `/accounts/{accountId}/orders/recent`.replace(`{accountId}`, encodeURIComponent(String(accountId !== void 0 ? accountId : `-accountId-`)));
4394
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4395
- let baseOptions;
4396
- if (configuration) baseOptions = configuration.baseOptions;
4397
- const localVarRequestOptions = {
4398
- method: "GET",
4399
- ...baseOptions,
4400
- ...options
4401
- };
4402
- const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {};
4403
- const localVarQueryParameter = {};
4404
- if (configuration?.authMode === "commercialApiKey") {
4405
- await setApiKeyToObject({
4406
- object: localVarQueryParameter,
4407
- key: "clientId",
4408
- keyParamName: "clientId",
4409
- configuration
4410
- });
4411
- if (userId !== void 0) localVarQueryParameter["userId"] = userId;
4412
- if (userSecret !== void 0) localVarQueryParameter["userSecret"] = userSecret;
4413
- }
4414
- if (configuration?.authMode === "personalApiKey") await setApiKeyToObject({
4415
- object: localVarQueryParameter,
4416
- key: "clientId",
4417
- keyParamName: "clientId",
4418
- configuration
4419
- });
4420
- if (onlyExecuted !== void 0) localVarQueryParameter["only_executed"] = onlyExecuted;
4421
- const localVarOperationAuth = {
4422
- authModes: ["commercialApiKey", "personalApiKey"],
4423
- requestSigningByAuthMode: {
4424
- "commercialApiKey": {
4425
- secretParameter: "consumerKey",
4426
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4427
- },
4428
- "personalApiKey": {
4429
- secretParameter: "consumerKey",
4430
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4431
- }
4432
- },
4433
- selectedAuthMode: configuration?.authMode
4434
- };
4435
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4436
- localVarRequestOptions.headers = {
4437
- ...localVarHeaderParameter,
4438
- ...headersFromBaseOptions,
4439
- ...options.headers
4440
- };
4441
- requestBeforeHook({
4442
- queryParameters: localVarQueryParameter,
4443
- requestConfig: localVarRequestOptions,
4444
- path: localVarPath,
4445
- configuration,
4446
- pathTemplate: "/accounts/{accountId}/orders/recent",
4447
- httpMethod: "GET",
4448
- operationAuth: localVarOperationAuth
4449
- });
4450
- setSearchParams(localVarUrlObj, localVarQueryParameter);
4451
- return {
4452
- url: toPathString(localVarUrlObj),
4453
- options: localVarRequestOptions
4454
- };
4455
- },
4456
- /**
4457
4589
  * 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.
4458
4590
  * @summary Get account order detail (V2)
4459
4591
  * @param {string} accountId
@@ -4904,75 +5036,6 @@ const ExperimentalEndpointsApiFp = function(configuration) {
4904
5036
  });
4905
5037
  },
4906
5038
  /**
4907
- * 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.
4908
- * @summary Get account order detail
4909
- * @param {ExperimentalEndpointsApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
4910
- * @param {*} [options] Override http request option.
4911
- * @throws {RequiredError}
4912
- */
4913
- async getAccountOrder(...args) {
4914
- const [requestParameters = {}, options] = args;
4915
- return createRequestFunction(await localVarAxiosParamCreator.getAccountOrder(requestParameters.accountId, requestParameters.brokerageOrderId, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
4916
- authModes: ["commercialApiKey", "personalApiKey"],
4917
- requestSigningByAuthMode: {
4918
- "commercialApiKey": {
4919
- secretParameter: "consumerKey",
4920
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4921
- },
4922
- "personalApiKey": {
4923
- secretParameter: "consumerKey",
4924
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4925
- }
4926
- }
4927
- });
4928
- },
4929
- /**
4930
- * 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.
4931
- * @summary List all account orders
4932
- * @param {ExperimentalEndpointsApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
4933
- * @param {*} [options] Override http request option.
4934
- * @throws {RequiredError}
4935
- */
4936
- async getAllAccountOrders(...args) {
4937
- const [requestParameters = {}, options] = args;
4938
- return createRequestFunction(await localVarAxiosParamCreator.getAllAccountOrders(requestParameters.accountId, requestParameters.state, requestParameters.days, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
4939
- authModes: ["commercialApiKey", "personalApiKey"],
4940
- requestSigningByAuthMode: {
4941
- "commercialApiKey": {
4942
- secretParameter: "consumerKey",
4943
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4944
- },
4945
- "personalApiKey": {
4946
- secretParameter: "consumerKey",
4947
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4948
- }
4949
- }
4950
- });
4951
- },
4952
- /**
4953
- * 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)**
4954
- * @summary List all account recent orders (last 24 hours only)
4955
- * @param {ExperimentalEndpointsApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
4956
- * @param {*} [options] Override http request option.
4957
- * @throws {RequiredError}
4958
- */
4959
- async getAllAccountRecentOrders(...args) {
4960
- const [requestParameters = {}, options] = args;
4961
- return createRequestFunction(await localVarAxiosParamCreator.getAllAccountRecentOrders(requestParameters.accountId, requestParameters.onlyExecuted, requestParameters.userId, requestParameters.userSecret, options), axios, BASE_PATH, configuration, {
4962
- authModes: ["commercialApiKey", "personalApiKey"],
4963
- requestSigningByAuthMode: {
4964
- "commercialApiKey": {
4965
- secretParameter: "consumerKey",
4966
- signedSecuritySchemes: ["PartnerSignature", "PartnerTimestamp"]
4967
- },
4968
- "personalApiKey": {
4969
- secretParameter: "consumerKey",
4970
- signedSecuritySchemes: ["PersonalSignature", "PersonalTimestamp"]
4971
- }
4972
- }
4973
- });
4974
- },
4975
- /**
4976
5039
  * 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.
4977
5040
  * @summary Get account order detail (V2)
4978
5041
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -5144,36 +5207,6 @@ const ExperimentalEndpointsApiFactory = function(configuration, basePath, axios)
5144
5207
  return localVarFp.cancelSubscription(...args).then((request) => request(axios, basePath));
5145
5208
  },
5146
5209
  /**
5147
- * 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.
5148
- * @summary Get account order detail
5149
- * @param {ExperimentalEndpointsApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
5150
- * @param {*} [options] Override http request option.
5151
- * @throws {RequiredError}
5152
- */
5153
- getAccountOrder(...args) {
5154
- return localVarFp.getAccountOrder(...args).then((request) => request(axios, basePath));
5155
- },
5156
- /**
5157
- * 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.
5158
- * @summary List all account orders
5159
- * @param {ExperimentalEndpointsApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
5160
- * @param {*} [options] Override http request option.
5161
- * @throws {RequiredError}
5162
- */
5163
- getAllAccountOrders(...args) {
5164
- return localVarFp.getAllAccountOrders(...args).then((request) => request(axios, basePath));
5165
- },
5166
- /**
5167
- * 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)**
5168
- * @summary List all account recent orders (last 24 hours only)
5169
- * @param {ExperimentalEndpointsApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
5170
- * @param {*} [options] Override http request option.
5171
- * @throws {RequiredError}
5172
- */
5173
- getAllAccountRecentOrders(...args) {
5174
- return localVarFp.getAllAccountRecentOrders(...args).then((request) => request(axios, basePath));
5175
- },
5176
- /**
5177
5210
  * 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.
5178
5211
  * @summary Get account order detail (V2)
5179
5212
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -5254,39 +5287,6 @@ var ExperimentalEndpointsApiGenerated = class extends BaseAPI {
5254
5287
  return ExperimentalEndpointsApiFp(this.configuration).cancelSubscription(...args).then((request) => request(this.axios, this.basePath));
5255
5288
  }
5256
5289
  /**
5257
- * 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.
5258
- * @summary Get account order detail
5259
- * @param {ExperimentalEndpointsApiGetAccountOrderRequest<TAuth>} requestParameters Request parameters.
5260
- * @param {*} [options] Override http request option.
5261
- * @throws {RequiredError}
5262
- * @memberof ExperimentalEndpointsApiGenerated
5263
- */
5264
- getAccountOrder(...args) {
5265
- return ExperimentalEndpointsApiFp(this.configuration).getAccountOrder(...args).then((request) => request(this.axios, this.basePath));
5266
- }
5267
- /**
5268
- * 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.
5269
- * @summary List all account orders
5270
- * @param {ExperimentalEndpointsApiGetAllAccountOrdersRequest<TAuth>} requestParameters Request parameters.
5271
- * @param {*} [options] Override http request option.
5272
- * @throws {RequiredError}
5273
- * @memberof ExperimentalEndpointsApiGenerated
5274
- */
5275
- getAllAccountOrders(...args) {
5276
- return ExperimentalEndpointsApiFp(this.configuration).getAllAccountOrders(...args).then((request) => request(this.axios, this.basePath));
5277
- }
5278
- /**
5279
- * 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)**
5280
- * @summary List all account recent orders (last 24 hours only)
5281
- * @param {ExperimentalEndpointsApiGetAllAccountRecentOrdersRequest<TAuth>} requestParameters Request parameters.
5282
- * @param {*} [options] Override http request option.
5283
- * @throws {RequiredError}
5284
- * @memberof ExperimentalEndpointsApiGenerated
5285
- */
5286
- getAllAccountRecentOrders(...args) {
5287
- return ExperimentalEndpointsApiFp(this.configuration).getAllAccountRecentOrders(...args).then((request) => request(this.axios, this.basePath));
5288
- }
5289
- /**
5290
5290
  * 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.
5291
5291
  * @summary Get account order detail (V2)
5292
5292
  * @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request<TAuth>} requestParameters Request parameters.
@@ -8667,7 +8667,7 @@ var Configuration = class {
8667
8667
  if (param.auth.mode === "oauth") this.accessToken = param.auth.accessToken;
8668
8668
  this.basePath = param.basePath;
8669
8669
  this.baseOptions = param.baseOptions ?? {};
8670
- this.userAgent = param.userAgent === void 0 ? "Konfig/13.2.4/typescript" : param.userAgent;
8670
+ this.userAgent = param.userAgent === void 0 ? "Konfig/13.2.6/typescript" : param.userAgent;
8671
8671
  this.formDataCtor = param.formDataCtor;
8672
8672
  }
8673
8673
  /**