snaptrade 3.0.56 → 3.0.58

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.
@@ -415,7 +415,7 @@ module SnapTrade
415
415
 
416
416
  # Get account details
417
417
  #
418
- # 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.
418
+ # 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.
419
419
  #
420
420
  # 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.
421
421
  #
@@ -436,7 +436,7 @@ module SnapTrade
436
436
 
437
437
  # Get account details
438
438
  #
439
- # 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.
439
+ # 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.
440
440
  #
441
441
  # 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.
442
442
  #
@@ -455,7 +455,7 @@ module SnapTrade
455
455
  end
456
456
 
457
457
  # Get account details
458
- # 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.
458
+ # 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.
459
459
  # @param user_id [String]
460
460
  # @param user_secret [String]
461
461
  # @param account_id [String]
@@ -467,7 +467,7 @@ module SnapTrade
467
467
  end
468
468
 
469
469
  # Get account details
470
- # 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.
470
+ # 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.
471
471
  # @param user_id [String]
472
472
  # @param user_secret [String]
473
473
  # @param account_id [String]
@@ -532,6 +532,278 @@ module SnapTrade
532
532
  end
533
533
 
534
534
 
535
+ # Get account order detail
536
+ #
537
+ # 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`.
538
+ #
539
+ # 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.
540
+ #
541
+ # 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.
542
+ #
543
+ # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
544
+ #
545
+ # **Beta:** this endpoint and its response schema may change.
546
+ #
547
+ # @param account_id [String]
548
+ # @param brokerage_order_id [String]
549
+ # @param user_id [String]
550
+ # @param user_secret [String]
551
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
552
+ def get_account_order(account_id:, brokerage_order_id:, user_id:, user_secret:, extra: {})
553
+ data, _status_code, _headers = get_account_order_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, extra)
554
+ data
555
+ end
556
+
557
+ # Get account order detail
558
+ #
559
+ # 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`.
560
+ #
561
+ # 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.
562
+ #
563
+ # 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.
564
+ #
565
+ # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
566
+ #
567
+ # **Beta:** this endpoint and its response schema may change.
568
+ #
569
+ # @param account_id [String]
570
+ # @param brokerage_order_id [String]
571
+ # @param user_id [String]
572
+ # @param user_secret [String]
573
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
574
+ def get_account_order_with_http_info(account_id:, brokerage_order_id:, user_id:, user_secret:, extra: {})
575
+ get_account_order_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, extra)
576
+ end
577
+
578
+ # Get account order detail
579
+ # 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.
580
+ # @param account_id [String]
581
+ # @param brokerage_order_id [String]
582
+ # @param user_id [String]
583
+ # @param user_secret [String]
584
+ # @param [Hash] opts the optional parameters
585
+ # @return [AccountOrder]
586
+ private def get_account_order_impl(account_id, brokerage_order_id, user_id, user_secret, opts = {})
587
+ data, _status_code, _headers = get_account_order_with_http_info(account_id, brokerage_order_id, user_id, user_secret, opts)
588
+ data
589
+ end
590
+
591
+ # Get account order detail
592
+ # 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.
593
+ # @param account_id [String]
594
+ # @param brokerage_order_id [String]
595
+ # @param user_id [String]
596
+ # @param user_secret [String]
597
+ # @param [Hash] opts the optional parameters
598
+ # @return [Array<(AccountOrder, Integer, Hash)>] AccountOrder data, response status code and response headers
599
+ private def get_account_order_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, opts = {})
600
+ if @api_client.config.debugging
601
+ @api_client.config.logger.debug 'Calling API: AccountInformationApi.get_account_order ...'
602
+ end
603
+ # verify the required parameter 'account_id' is set
604
+ if @api_client.config.client_side_validation && account_id.nil?
605
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_account_order"
606
+ end
607
+ # verify the required parameter 'brokerage_order_id' is set
608
+ if @api_client.config.client_side_validation && brokerage_order_id.nil?
609
+ fail ArgumentError, "Missing the required parameter 'brokerage_order_id' when calling AccountInformationApi.get_account_order"
610
+ end
611
+ # verify the required parameter 'user_id' is set
612
+ if @api_client.config.client_side_validation && user_id.nil?
613
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_account_order"
614
+ end
615
+ # verify the required parameter 'user_secret' is set
616
+ if @api_client.config.client_side_validation && user_secret.nil?
617
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_account_order"
618
+ end
619
+ # resource path
620
+ local_var_path = '/accounts/{accountId}/orders/{brokerageOrderId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'brokerageOrderId' + '}', CGI.escape(brokerage_order_id.to_s))
621
+
622
+ # query parameters
623
+ query_params = opts[:query_params] || {}
624
+ query_params[:'userId'] = user_id
625
+ query_params[:'userSecret'] = user_secret
626
+
627
+ # header parameters
628
+ header_params = opts[:header_params] || {}
629
+ # HTTP header 'Accept' (if needed)
630
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
631
+
632
+ # form parameters
633
+ form_params = opts[:form_params] || {}
634
+
635
+ # http body (model)
636
+ post_body = opts[:debug_body]
637
+
638
+ # return_type
639
+ return_type = opts[:debug_return_type] || 'AccountOrder'
640
+
641
+ # auth_names
642
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
643
+
644
+ new_options = opts.merge(
645
+ :operation => :"AccountInformationApi.get_account_order",
646
+ :header_params => header_params,
647
+ :query_params => query_params,
648
+ :form_params => form_params,
649
+ :body => post_body,
650
+ :auth_names => auth_names,
651
+ :return_type => return_type
652
+ )
653
+
654
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
655
+ if @api_client.config.debugging
656
+ @api_client.config.logger.debug "API called: AccountInformationApi#get_account_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
657
+ end
658
+ return data, status_code, headers, response
659
+ end
660
+
661
+
662
+ # List all account orders
663
+ #
664
+ # Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`.
665
+ #
666
+ # 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`.
667
+ #
668
+ # `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`.
669
+ #
670
+ # **Beta:** this endpoint and its response schema may change.
671
+ #
672
+ # 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.
673
+ #
674
+ # @param user_id [String]
675
+ # @param user_secret [String]
676
+ # @param account_id [String]
677
+ # @param state [String] defaults to \"all\"
678
+ # @param days [Integer] 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.
679
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
680
+ def get_all_account_orders(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
681
+ extra[:state] = state if state != SENTINEL
682
+ extra[:days] = days if days != SENTINEL
683
+ data, _status_code, _headers = get_all_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
684
+ data
685
+ end
686
+
687
+ # List all account orders
688
+ #
689
+ # Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`.
690
+ #
691
+ # 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`.
692
+ #
693
+ # `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`.
694
+ #
695
+ # **Beta:** this endpoint and its response schema may change.
696
+ #
697
+ # 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.
698
+ #
699
+ # @param user_id [String]
700
+ # @param user_secret [String]
701
+ # @param account_id [String]
702
+ # @param state [String] defaults to \"all\"
703
+ # @param days [Integer] 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.
704
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
705
+ def get_all_account_orders_with_http_info(user_id:, user_secret:, account_id:, state: SENTINEL, days: SENTINEL, extra: {})
706
+ extra[:state] = state if state != SENTINEL
707
+ extra[:days] = days if days != SENTINEL
708
+ get_all_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
709
+ end
710
+
711
+ # List all account orders
712
+ # 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.
713
+ # @param user_id [String]
714
+ # @param user_secret [String]
715
+ # @param account_id [String]
716
+ # @param [Hash] opts the optional parameters
717
+ # @option opts [String] :state defaults to \"all\"
718
+ # @option opts [Integer] :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.
719
+ # @return [AllAccountOrdersResponse]
720
+ private def get_all_account_orders_impl(user_id, user_secret, account_id, opts = {})
721
+ data, _status_code, _headers = get_all_account_orders_with_http_info(user_id, user_secret, account_id, opts)
722
+ data
723
+ end
724
+
725
+ # List all account orders
726
+ # Returns a list of recent orders in the specified account, in the same &#x60;kind&#x60;-discriminated format as &#x60;/accounts/{accountId}/positions/all&#x60;. Every order carries a &#x60;legs&#x60; list with at least one leg. Each leg&#39;s &#x60;instrument&#x60; uses the same &#x60;Instrument&#x60; union as positions; switch on &#x60;instrument.kind&#x60; 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 &#x60;group.id&#x60;. &#x60;order_type&#x60; is an object discriminated by &#x60;kind&#x60;. Each kind declares the price fields it requires (&#x60;limit_price&#x60; on &#x60;limit&#x60;, &#x60;stop_price&#x60; on &#x60;stop&#x60;, both on &#x60;stop_limit&#x60;, &#x60;trail&#x60; on &#x60;trailing_stop&#x60;), 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, &#x60;kind&#x60; is &#x60;other&#x60; and the brokerage&#39;s own label is in &#x60;raw_type&#x60;. **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.
727
+ # @param user_id [String]
728
+ # @param user_secret [String]
729
+ # @param account_id [String]
730
+ # @param [Hash] opts the optional parameters
731
+ # @option opts [String] :state defaults to \"all\"
732
+ # @option opts [Integer] :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.
733
+ # @return [Array<(AllAccountOrdersResponse, Integer, Hash)>] AllAccountOrdersResponse data, response status code and response headers
734
+ private def get_all_account_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
735
+ if @api_client.config.debugging
736
+ @api_client.config.logger.debug 'Calling API: AccountInformationApi.get_all_account_orders ...'
737
+ end
738
+ # verify the required parameter 'user_id' is set
739
+ if @api_client.config.client_side_validation && user_id.nil?
740
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_all_account_orders"
741
+ end
742
+ # verify the required parameter 'user_secret' is set
743
+ if @api_client.config.client_side_validation && user_secret.nil?
744
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_all_account_orders"
745
+ end
746
+ # verify the required parameter 'account_id' is set
747
+ if @api_client.config.client_side_validation && account_id.nil?
748
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_all_account_orders"
749
+ end
750
+ allowable_values = ["all", "open", "executed"]
751
+ if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
752
+ fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
753
+ end
754
+ if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90
755
+ fail ArgumentError, 'invalid value for "opts[:"days"]" when calling AccountInformationApi.get_all_account_orders, must be smaller than or equal to 90.'
756
+ end
757
+
758
+ if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1
759
+ fail ArgumentError, 'invalid value for "opts[:"days"]" when calling AccountInformationApi.get_all_account_orders, must be greater than or equal to 1.'
760
+ end
761
+
762
+ # resource path
763
+ local_var_path = '/accounts/{accountId}/orders/all'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
764
+
765
+ # query parameters
766
+ query_params = opts[:query_params] || {}
767
+ query_params[:'userId'] = user_id
768
+ query_params[:'userSecret'] = user_secret
769
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
770
+ query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
771
+
772
+ # header parameters
773
+ header_params = opts[:header_params] || {}
774
+ # HTTP header 'Accept' (if needed)
775
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
776
+
777
+ # form parameters
778
+ form_params = opts[:form_params] || {}
779
+
780
+ # http body (model)
781
+ post_body = opts[:debug_body]
782
+
783
+ # return_type
784
+ return_type = opts[:debug_return_type] || 'AllAccountOrdersResponse'
785
+
786
+ # auth_names
787
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
788
+
789
+ new_options = opts.merge(
790
+ :operation => :"AccountInformationApi.get_all_account_orders",
791
+ :header_params => header_params,
792
+ :query_params => query_params,
793
+ :form_params => form_params,
794
+ :body => post_body,
795
+ :auth_names => auth_names,
796
+ :return_type => return_type
797
+ )
798
+
799
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
800
+ if @api_client.config.debugging
801
+ @api_client.config.logger.debug "API called: AccountInformationApi#get_all_account_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
802
+ end
803
+ return data, status_code, headers, response
804
+ end
805
+
806
+
535
807
  # List all account positions
536
808
  #
537
809
  # Returns a list of all positions in the specified account.
@@ -651,6 +923,134 @@ module SnapTrade
651
923
  end
652
924
 
653
925
 
926
+ # List all account recent orders (last 24 hours only)
927
+ #
928
+ # 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.
929
+ # 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.
930
+ # 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.
931
+ # By default only returns executed orders, but that can be changed by setting *only_executed* to false.
932
+ #
933
+ # 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.
934
+ #
935
+ # **Beta:** this endpoint and its response schema may change.
936
+ #
937
+ # **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)**
938
+ #
939
+ # @param user_id [String]
940
+ # @param user_secret [String]
941
+ # @param account_id [String]
942
+ # @param only_executed [Boolean] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
943
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
944
+ def get_all_account_recent_orders(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {})
945
+ extra[:only_executed] = only_executed if only_executed != SENTINEL
946
+ data, _status_code, _headers = get_all_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
947
+ data
948
+ end
949
+
950
+ # List all account recent orders (last 24 hours only)
951
+ #
952
+ # 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.
953
+ # 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.
954
+ # 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.
955
+ # By default only returns executed orders, but that can be changed by setting *only_executed* to false.
956
+ #
957
+ # 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.
958
+ #
959
+ # **Beta:** this endpoint and its response schema may change.
960
+ #
961
+ # **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)**
962
+ #
963
+ # @param user_id [String]
964
+ # @param user_secret [String]
965
+ # @param account_id [String]
966
+ # @param only_executed [Boolean] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
967
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
968
+ def get_all_account_recent_orders_with_http_info(user_id:, user_secret:, account_id:, only_executed: SENTINEL, extra: {})
969
+ extra[:only_executed] = only_executed if only_executed != SENTINEL
970
+ get_all_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
971
+ end
972
+
973
+ # List all account recent orders (last 24 hours only)
974
+ # 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)**
975
+ # @param user_id [String]
976
+ # @param user_secret [String]
977
+ # @param account_id [String]
978
+ # @param [Hash] opts the optional parameters
979
+ # @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
980
+ # @return [AllAccountOrdersResponse]
981
+ private def get_all_account_recent_orders_impl(user_id, user_secret, account_id, opts = {})
982
+ data, _status_code, _headers = get_all_account_recent_orders_with_http_info(user_id, user_secret, account_id, opts)
983
+ data
984
+ end
985
+
986
+ # List all account recent orders (last 24 hours only)
987
+ # A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account, in the same &#x60;kind&#x60;-discriminated format as &#x60;/accounts/{accountId}/orders/all&#x60;. 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 &#x60;/accounts/{accountId}/orders/all&#x60; 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 &#x60;legs&#x60; list with at least one leg; switch on &#x60;legs[].instrument.kind&#x60; and &#x60;order_type.kind&#x60; to know which fields are present. &#x60;data_freshness.as_of&#x60; 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)**
988
+ # @param user_id [String]
989
+ # @param user_secret [String]
990
+ # @param account_id [String]
991
+ # @param [Hash] opts the optional parameters
992
+ # @option opts [Boolean] :only_executed Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
993
+ # @return [Array<(AllAccountOrdersResponse, Integer, Hash)>] AllAccountOrdersResponse data, response status code and response headers
994
+ private def get_all_account_recent_orders_with_http_info_impl(user_id, user_secret, account_id, opts = {})
995
+ if @api_client.config.debugging
996
+ @api_client.config.logger.debug 'Calling API: AccountInformationApi.get_all_account_recent_orders ...'
997
+ end
998
+ # verify the required parameter 'user_id' is set
999
+ if @api_client.config.client_side_validation && user_id.nil?
1000
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountInformationApi.get_all_account_recent_orders"
1001
+ end
1002
+ # verify the required parameter 'user_secret' is set
1003
+ if @api_client.config.client_side_validation && user_secret.nil?
1004
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling AccountInformationApi.get_all_account_recent_orders"
1005
+ end
1006
+ # verify the required parameter 'account_id' is set
1007
+ if @api_client.config.client_side_validation && account_id.nil?
1008
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountInformationApi.get_all_account_recent_orders"
1009
+ end
1010
+ # resource path
1011
+ local_var_path = '/accounts/{accountId}/orders/recent'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
1012
+
1013
+ # query parameters
1014
+ query_params = opts[:query_params] || {}
1015
+ query_params[:'userId'] = user_id
1016
+ query_params[:'userSecret'] = user_secret
1017
+ query_params[:'only_executed'] = opts[:'only_executed'] if !opts[:'only_executed'].nil?
1018
+
1019
+ # header parameters
1020
+ header_params = opts[:header_params] || {}
1021
+ # HTTP header 'Accept' (if needed)
1022
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1023
+
1024
+ # form parameters
1025
+ form_params = opts[:form_params] || {}
1026
+
1027
+ # http body (model)
1028
+ post_body = opts[:debug_body]
1029
+
1030
+ # return_type
1031
+ return_type = opts[:debug_return_type] || 'AllAccountOrdersResponse'
1032
+
1033
+ # auth_names
1034
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
1035
+
1036
+ new_options = opts.merge(
1037
+ :operation => :"AccountInformationApi.get_all_account_recent_orders",
1038
+ :header_params => header_params,
1039
+ :query_params => query_params,
1040
+ :form_params => form_params,
1041
+ :body => post_body,
1042
+ :auth_names => auth_names,
1043
+ :return_type => return_type
1044
+ )
1045
+
1046
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
1047
+ if @api_client.config.debugging
1048
+ @api_client.config.logger.debug "API called: AccountInformationApi#get_all_account_recent_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1049
+ end
1050
+ return data, status_code, headers, response
1051
+ end
1052
+
1053
+
654
1054
  # List account balances
655
1055
  #
656
1056
  # 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).
@@ -768,7 +1168,7 @@ module SnapTrade
768
1168
 
769
1169
  # Get account detail
770
1170
  #
771
- # **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.
1171
+ # **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.
772
1172
  #
773
1173
  # Returns account detail known to SnapTrade for the specified account.
774
1174
  #
@@ -789,7 +1189,7 @@ module SnapTrade
789
1189
 
790
1190
  # Get account detail
791
1191
  #
792
- # **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.
1192
+ # **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.
793
1193
  #
794
1194
  # Returns account detail known to SnapTrade for the specified account.
795
1195
  #
@@ -808,7 +1208,7 @@ module SnapTrade
808
1208
  end
809
1209
 
810
1210
  # Get account detail
811
- # **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.
1211
+ # **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.
812
1212
  # @param user_id [String]
813
1213
  # @param user_secret [String]
814
1214
  # @param account_id [String]
@@ -820,7 +1220,7 @@ module SnapTrade
820
1220
  end
821
1221
 
822
1222
  # Get account detail
823
- # **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&#39;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.
1223
+ # **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&#39;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.
824
1224
  # @param user_id [String]
825
1225
  # @param user_secret [String]
826
1226
  # @param account_id [String]
@@ -1519,7 +1919,7 @@ module SnapTrade
1519
1919
  #
1520
1920
  # Returns all accounts across all connections known to SnapTrade for the authenticated user.
1521
1921
  #
1522
- # 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.
1922
+ # 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.
1523
1923
  #
1524
1924
  # 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).
1525
1925
  #
@@ -1535,7 +1935,7 @@ module SnapTrade
1535
1935
  #
1536
1936
  # Returns all accounts across all connections known to SnapTrade for the authenticated user.
1537
1937
  #
1538
- # 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.
1938
+ # 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.
1539
1939
  #
1540
1940
  # 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).
1541
1941
  #
@@ -1547,7 +1947,7 @@ module SnapTrade
1547
1947
  end
1548
1948
 
1549
1949
  # List all user accounts
1550
- # 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).
1950
+ # 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).
1551
1951
  # @param user_id [String]
1552
1952
  # @param user_secret [String]
1553
1953
  # @param [Hash] opts the optional parameters
@@ -1558,7 +1958,7 @@ module SnapTrade
1558
1958
  end
1559
1959
 
1560
1960
  # List all user accounts
1561
- # Returns all accounts across all connections known to SnapTrade for the authenticated user. The &#x60;results&#x60; list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the &#x60;kind&#x60; discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer&#39;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&#39;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).
1961
+ # Returns all accounts across all connections known to SnapTrade for the authenticated user. The &#x60;results&#x60; list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the &#x60;kind&#x60; discriminator to determine the schema for each account. This endpoint returns Daily data regardless of the customer&#39;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&#39;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).
1562
1962
  # @param user_id [String]
1563
1963
  # @param user_secret [String]
1564
1964
  # @param [Hash] opts the optional parameters
@@ -1620,7 +2020,7 @@ module SnapTrade
1620
2020
 
1621
2021
  # List user accounts
1622
2022
  #
1623
- # **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.
2023
+ # **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.
1624
2024
  #
1625
2025
  # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1626
2026
  #
@@ -1636,7 +2036,7 @@ module SnapTrade
1636
2036
 
1637
2037
  # List user accounts
1638
2038
  #
1639
- # **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.
2039
+ # **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.
1640
2040
  #
1641
2041
  # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1642
2042
  #
@@ -1650,7 +2050,7 @@ module SnapTrade
1650
2050
  end
1651
2051
 
1652
2052
  # List user accounts
1653
- # **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).
2053
+ # **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).
1654
2054
  # @param user_id [String]
1655
2055
  # @param user_secret [String]
1656
2056
  # @param [Hash] opts the optional parameters
@@ -1661,7 +2061,7 @@ module SnapTrade
1661
2061
  end
1662
2062
 
1663
2063
  # List user accounts
1664
- # **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&#39;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&#39;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).
2064
+ # **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&#39;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&#39;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).
1665
2065
  # @param user_id [String]
1666
2066
  # @param user_secret [String]
1667
2067
  # @param [Hash] opts the optional parameters
@@ -554,7 +554,7 @@ module SnapTrade
554
554
  #
555
555
  # Returns all accounts that belong to the specified connection for the authenticated user.
556
556
  #
557
- # 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.
557
+ # 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.
558
558
  #
559
559
  # 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.
560
560
  #
@@ -575,7 +575,7 @@ module SnapTrade
575
575
  #
576
576
  # Returns all accounts that belong to the specified connection for the authenticated user.
577
577
  #
578
- # 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.
578
+ # 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.
579
579
  #
580
580
  # 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.
581
581
  #
@@ -592,7 +592,7 @@ module SnapTrade
592
592
  end
593
593
 
594
594
  # List accounts
595
- # 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.
595
+ # 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.
596
596
  # @param connection_id [String]
597
597
  # @param user_id [String]
598
598
  # @param user_secret [String]
@@ -604,7 +604,7 @@ module SnapTrade
604
604
  end
605
605
 
606
606
  # List accounts
607
- # Returns all accounts that belong to the specified connection for the authenticated user. The &#x60;results&#x60; list can contain multiple account types in the same response, including investment, deposit, line of credit, and annuity accounts. Use the &#x60;kind&#x60; discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account&#39;s opening date and total net value (&#x60;net_value&#x60;) live from the institution on each call, along with funding date for &#x60;investment&#x60; 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.
607
+ # Returns all accounts that belong to the specified connection for the authenticated user. The &#x60;results&#x60; list can contain multiple account types in the same response, including investment, deposit, line of credit, annuity, and mortgage accounts. Use the &#x60;kind&#x60; discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account&#39;s opening date and total net value (&#x60;net_value&#x60;) live from the institution on each call, along with funding date for &#x60;investment&#x60; 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.
608
608
  # @param connection_id [String]
609
609
  # @param user_id [String]
610
610
  # @param user_secret [String]