snaptrade 3.0.55 → 3.0.57

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d287578bf468373387af4dc41a0667d7ffab76dc2d179253d20befd8fd7d340
4
- data.tar.gz: a4f26360a33be173e0aff43f782ed8756dbbc2fd4a98e7a99db47d9c99e2308a
3
+ metadata.gz: 6209e647c586658dbbb6545fafd560c0a611ad8156d6d27b1eb4795abb3300c6
4
+ data.tar.gz: 25f5c17b087184330fcee6528a21269e32b95b126216b74b1fe691f35fe369a8
5
5
  SHA512:
6
- metadata.gz: ed65b82c974ae5d04736fb8151e910b9d947f4c5ad6d83019c431196712fcb67990930c82123a0bbeec7f344508b39276323293af5d57a76f094ed9df4b0aae6
7
- data.tar.gz: c81aedddc8755207ec7fb37709e86939f63d1ab14074a5d6876f5d266ec6836a1a93d95254cea07c34d0ebe57e7bfa700221bdff90e709f7f0f30f815f43253d
6
+ metadata.gz: 292bfc9397a82c5191583849e35206d7bfa9e4c69b86c7ecccbcf0423e2909fe71d5d5dfed0e347f32b73dab8e7c8aa7d4e3c398b5856d134f4345e2ab3000c8
7
+ data.tar.gz: 92040801dc21f003952a4a05b04843af7abe57bd6a369a5dade9c22b2311f12a5d0ff3cc2c9a81498554fc2aa952936a8381f64a4ca27cc7853e26d7daad78d5
data/README.md CHANGED
@@ -63,7 +63,7 @@ backoff with jitter rather than from the headers.
63
63
  See https://docs.snaptrade.com/docs/ratelimiting.
64
64
 
65
65
 
66
- [![npm](https://img.shields.io/badge/gem-v3.0.55-blue)](https://rubygems.org/gems/snaptrade/versions/3.0.55)
66
+ [![npm](https://img.shields.io/badge/gem-v3.0.57-blue)](https://rubygems.org/gems/snaptrade/versions/3.0.57)
67
67
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
68
68
 
69
69
  </div>
@@ -108,6 +108,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
108
108
  * [`snaptrade.connections.sync_brokerage_authorization_transactions`](#snaptradeconnectionssync_brokerage_authorization_transactions)
109
109
  * [`snaptrade.experimental_endpoints.add_subscription`](#snaptradeexperimental_endpointsadd_subscription)
110
110
  * [`snaptrade.experimental_endpoints.cancel_subscription`](#snaptradeexperimental_endpointscancel_subscription)
111
+ * [`snaptrade.experimental_endpoints.get_account_order`](#snaptradeexperimental_endpointsget_account_order)
111
112
  * [`snaptrade.experimental_endpoints.get_all_account_orders`](#snaptradeexperimental_endpointsget_all_account_orders)
112
113
  * [`snaptrade.experimental_endpoints.get_all_account_recent_orders`](#snaptradeexperimental_endpointsget_all_account_recent_orders)
113
114
  * [`snaptrade.experimental_endpoints.get_user_account_order_detail_v2`](#snaptradeexperimental_endpointsget_user_account_order_detail_v2)
@@ -148,7 +149,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
148
149
  Add to Gemfile:
149
150
 
150
151
  ```ruby
151
- gem 'snaptrade', '~> 3.0.55'
152
+ gem 'snaptrade', '~> 3.0.57'
152
153
  ```
153
154
 
154
155
  ## Getting Started<a id="getting-started"></a>
@@ -360,7 +361,7 @@ p result
360
361
 
361
362
  ### `snaptrade.account_information.get_account_details`<a id="snaptradeaccount_informationget_account_details"></a>
362
363
 
363
- 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.
364
+ 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.
364
365
 
365
366
  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.
366
367
 
@@ -485,7 +486,7 @@ p result
485
486
  ### `snaptrade.account_information.get_user_account_details`<a id="snaptradeaccount_informationget_user_account_details"></a>
486
487
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
487
488
 
488
- **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.
489
+ **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.
489
490
 
490
491
  Returns account detail known to SnapTrade for the specified account.
491
492
 
@@ -752,7 +753,7 @@ p result
752
753
 
753
754
  Returns all accounts across all connections known to SnapTrade for the authenticated user.
754
755
 
755
- 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.
756
+ 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.
756
757
 
757
758
  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).
758
759
 
@@ -787,7 +788,7 @@ p result
787
788
  ### `snaptrade.account_information.list_user_accounts`<a id="snaptradeaccount_informationlist_user_accounts"></a>
788
789
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
789
790
 
790
- **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.
791
+ **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.
791
792
 
792
793
  Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
793
794
 
@@ -1282,7 +1283,7 @@ p result
1282
1283
 
1283
1284
  Returns all accounts that belong to the specified connection for the authenticated user.
1284
1285
 
1285
- 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.
1286
+ 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.
1286
1287
 
1287
1288
  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.
1288
1289
 
@@ -1509,6 +1510,50 @@ reference the account in SnapTrade.
1509
1510
  ---
1510
1511
 
1511
1512
 
1513
+ ### `snaptrade.experimental_endpoints.get_account_order`<a id="snaptradeexperimental_endpointsget_account_order"></a>
1514
+
1515
+ 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`.
1516
+
1517
+ 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.
1518
+
1519
+ 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.
1520
+
1521
+ This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
1522
+
1523
+ **Experimental:** this endpoint may change without notice.
1524
+
1525
+
1526
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1527
+
1528
+ ```ruby
1529
+ result = snaptrade.experimental_endpoints.get_account_order(
1530
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1531
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1532
+ user_id: "snaptrade-user-123",
1533
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1534
+ )
1535
+ p result
1536
+ ```
1537
+
1538
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1539
+
1540
+ ##### account_id: `String`<a id="account_id-string"></a>
1541
+ ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1542
+ ##### user_id: `String`<a id="user_id-string"></a>
1543
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1544
+ #### 🔄 Return<a id="🔄-return"></a>
1545
+
1546
+ [AccountOrder](./lib/snaptrade/models/account_order.rb)
1547
+
1548
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1549
+
1550
+ `/accounts/{accountId}/orders/{brokerageOrderId}` `GET`
1551
+
1552
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1553
+
1554
+ ---
1555
+
1556
+
1512
1557
  ### `snaptrade.experimental_endpoints.get_all_account_orders`<a id="snaptradeexperimental_endpointsget_all_account_orders"></a>
1513
1558
 
1514
1559
  Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`.
@@ -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 &#x60;kind&#x60; discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the 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. 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 &#x60;kind&#x60; discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the 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. 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]
@@ -768,7 +768,7 @@ module SnapTrade
768
768
 
769
769
  # Get account detail
770
770
  #
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.
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, annuity, and mortgage accounts.
772
772
  #
773
773
  # Returns account detail known to SnapTrade for the specified account.
774
774
  #
@@ -789,7 +789,7 @@ module SnapTrade
789
789
 
790
790
  # Get account detail
791
791
  #
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.
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, annuity, and mortgage accounts.
793
793
  #
794
794
  # Returns account detail known to SnapTrade for the specified account.
795
795
  #
@@ -808,7 +808,7 @@ module SnapTrade
808
808
  end
809
809
 
810
810
  # 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.
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, 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
812
  # @param user_id [String]
813
813
  # @param user_secret [String]
814
814
  # @param account_id [String]
@@ -820,7 +820,7 @@ module SnapTrade
820
820
  end
821
821
 
822
822
  # 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.
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, 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
824
  # @param user_id [String]
825
825
  # @param user_secret [String]
826
826
  # @param account_id [String]
@@ -1519,7 +1519,7 @@ module SnapTrade
1519
1519
  #
1520
1520
  # Returns all accounts across all connections known to SnapTrade for the authenticated user.
1521
1521
  #
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.
1522
+ # 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
1523
  #
1524
1524
  # 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
1525
  #
@@ -1535,7 +1535,7 @@ module SnapTrade
1535
1535
  #
1536
1536
  # Returns all accounts across all connections known to SnapTrade for the authenticated user.
1537
1537
  #
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.
1538
+ # 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
1539
  #
1540
1540
  # 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
1541
  #
@@ -1547,7 +1547,7 @@ module SnapTrade
1547
1547
  end
1548
1548
 
1549
1549
  # 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).
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, 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
1551
  # @param user_id [String]
1552
1552
  # @param user_secret [String]
1553
1553
  # @param [Hash] opts the optional parameters
@@ -1558,7 +1558,7 @@ module SnapTrade
1558
1558
  end
1559
1559
 
1560
1560
  # 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).
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, 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
1562
  # @param user_id [String]
1563
1563
  # @param user_secret [String]
1564
1564
  # @param [Hash] opts the optional parameters
@@ -1620,7 +1620,7 @@ module SnapTrade
1620
1620
 
1621
1621
  # List user accounts
1622
1622
  #
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.
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, annuity, and mortgage accounts.
1624
1624
  #
1625
1625
  # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1626
1626
  #
@@ -1636,7 +1636,7 @@ module SnapTrade
1636
1636
 
1637
1637
  # List user accounts
1638
1638
  #
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.
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, annuity, and mortgage accounts.
1640
1640
  #
1641
1641
  # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
1642
1642
  #
@@ -1650,7 +1650,7 @@ module SnapTrade
1650
1650
  end
1651
1651
 
1652
1652
  # 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).
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, 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
1654
  # @param user_id [String]
1655
1655
  # @param user_secret [String]
1656
1656
  # @param [Hash] opts the optional parameters
@@ -1661,7 +1661,7 @@ module SnapTrade
1661
1661
  end
1662
1662
 
1663
1663
  # 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).
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, 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
1665
  # @param user_id [String]
1666
1666
  # @param user_secret [String]
1667
1667
  # @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]
@@ -239,6 +239,133 @@ module SnapTrade
239
239
  end
240
240
 
241
241
 
242
+ # Get account order detail
243
+ #
244
+ # 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`.
245
+ #
246
+ # 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.
247
+ #
248
+ # 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.
249
+ #
250
+ # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
251
+ #
252
+ # **Experimental:** this endpoint may change without notice.
253
+ #
254
+ # @param account_id [String]
255
+ # @param brokerage_order_id [String]
256
+ # @param user_id [String]
257
+ # @param user_secret [String]
258
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
259
+ def get_account_order(account_id:, brokerage_order_id:, user_id:, user_secret:, extra: {})
260
+ data, _status_code, _headers = get_account_order_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, extra)
261
+ data
262
+ end
263
+
264
+ # Get account order detail
265
+ #
266
+ # 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`.
267
+ #
268
+ # 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.
269
+ #
270
+ # 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.
271
+ #
272
+ # This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
273
+ #
274
+ # **Experimental:** this endpoint may change without notice.
275
+ #
276
+ # @param account_id [String]
277
+ # @param brokerage_order_id [String]
278
+ # @param user_id [String]
279
+ # @param user_secret [String]
280
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
281
+ def get_account_order_with_http_info(account_id:, brokerage_order_id:, user_id:, user_secret:, extra: {})
282
+ get_account_order_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, extra)
283
+ end
284
+
285
+ # Get account order detail
286
+ # 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.
287
+ # @param account_id [String]
288
+ # @param brokerage_order_id [String]
289
+ # @param user_id [String]
290
+ # @param user_secret [String]
291
+ # @param [Hash] opts the optional parameters
292
+ # @return [AccountOrder]
293
+ private def get_account_order_impl(account_id, brokerage_order_id, user_id, user_secret, opts = {})
294
+ data, _status_code, _headers = get_account_order_with_http_info(account_id, brokerage_order_id, user_id, user_secret, opts)
295
+ data
296
+ end
297
+
298
+ # Get account order detail
299
+ # Returns the detail of a single order, identified by the brokerage order ID in the path, in the same &#x60;kind&#x60;-discriminated format as &#x60;/accounts/{accountId}/orders/all&#x60;. The 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. 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.
300
+ # @param account_id [String]
301
+ # @param brokerage_order_id [String]
302
+ # @param user_id [String]
303
+ # @param user_secret [String]
304
+ # @param [Hash] opts the optional parameters
305
+ # @return [Array<(AccountOrder, Integer, Hash)>] AccountOrder data, response status code and response headers
306
+ private def get_account_order_with_http_info_impl(account_id, brokerage_order_id, user_id, user_secret, opts = {})
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug 'Calling API: ExperimentalEndpointsApi.get_account_order ...'
309
+ end
310
+ # verify the required parameter 'account_id' is set
311
+ if @api_client.config.client_side_validation && account_id.nil?
312
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling ExperimentalEndpointsApi.get_account_order"
313
+ end
314
+ # verify the required parameter 'brokerage_order_id' is set
315
+ if @api_client.config.client_side_validation && brokerage_order_id.nil?
316
+ fail ArgumentError, "Missing the required parameter 'brokerage_order_id' when calling ExperimentalEndpointsApi.get_account_order"
317
+ end
318
+ # verify the required parameter 'user_id' is set
319
+ if @api_client.config.client_side_validation && user_id.nil?
320
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling ExperimentalEndpointsApi.get_account_order"
321
+ end
322
+ # verify the required parameter 'user_secret' is set
323
+ if @api_client.config.client_side_validation && user_secret.nil?
324
+ fail ArgumentError, "Missing the required parameter 'user_secret' when calling ExperimentalEndpointsApi.get_account_order"
325
+ end
326
+ # resource path
327
+ local_var_path = '/accounts/{accountId}/orders/{brokerageOrderId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'brokerageOrderId' + '}', CGI.escape(brokerage_order_id.to_s))
328
+
329
+ # query parameters
330
+ query_params = opts[:query_params] || {}
331
+ query_params[:'userId'] = user_id
332
+ query_params[:'userSecret'] = user_secret
333
+
334
+ # header parameters
335
+ header_params = opts[:header_params] || {}
336
+ # HTTP header 'Accept' (if needed)
337
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
338
+
339
+ # form parameters
340
+ form_params = opts[:form_params] || {}
341
+
342
+ # http body (model)
343
+ post_body = opts[:debug_body]
344
+
345
+ # return_type
346
+ return_type = opts[:debug_return_type] || 'AccountOrder'
347
+
348
+ # auth_names
349
+ auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
350
+
351
+ new_options = opts.merge(
352
+ :operation => :"ExperimentalEndpointsApi.get_account_order",
353
+ :header_params => header_params,
354
+ :query_params => query_params,
355
+ :form_params => form_params,
356
+ :body => post_body,
357
+ :auth_names => auth_names,
358
+ :return_type => return_type
359
+ )
360
+
361
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug "API called: ExperimentalEndpointsApi#get_account_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
364
+ end
365
+ return data, status_code, headers, response
366
+ end
367
+
368
+
242
369
  # List all account orders
243
370
  #
244
371
  # Returns a list of recent orders in the specified account, in the same `kind`-discriminated format as `/accounts/{accountId}/positions/all`.
@@ -50,7 +50,7 @@ module SnapTrade
50
50
  # The account type as provided by the brokerage
51
51
  attr_accessor :raw_type
52
52
 
53
- # The category of the account, normalized across institutions. Returns `null` if the category could not be determined. Use this field to filter out non-investment accounts if your integration only supports trading / holdings flows. See [Filtering Accounts by Category](https://docs.snaptrade.com/docs/filtering-accounts-by-category) for more information. - `INVESTMENT`: A brokerage / investment account (equities, options, crypto, etc.). - `DEPOSIT`: A bank deposit account (checking, savings). - `LOC`: A line of credit account. - `ANNUITY`: An annuity contract account.
53
+ # The category of the account, normalized across institutions. Returns `null` if the category could not be determined. Use this field to filter out non-investment accounts if your integration only supports trading / holdings flows. See [Filtering Accounts by Category](https://docs.snaptrade.com/docs/filtering-accounts-by-category) for more information. - `INVESTMENT`: A brokerage / investment account (equities, options, crypto, etc.). - `DEPOSIT`: A bank deposit account (checking, savings). - `LOC`: A line of credit account. - `ANNUITY`: An annuity contract account. - `MORTGAGE`: A mortgage account.
54
54
  attr_accessor :account_category
55
55
 
56
56
  # Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version.
@@ -16,9 +16,10 @@ module SnapTrade
16
16
  DEPOSIT = "DEPOSIT".freeze
17
17
  LOC = "LOC".freeze
18
18
  ANNUITY = "ANNUITY".freeze
19
+ MORTGAGE = "MORTGAGE".freeze
19
20
 
20
21
  def self.all_vars
21
- @all_vars ||= [INVESTMENT, DEPOSIT, LOC, ANNUITY].freeze
22
+ @all_vars ||= [INVESTMENT, DEPOSIT, LOC, ANNUITY, MORTGAGE].freeze
22
23
  end
23
24
 
24
25
  # Builds the enum from string
@@ -29,7 +29,7 @@ module SnapTrade
29
29
 
30
30
  attr_accessor :priced_in
31
31
 
32
- # Direction of the net order price. CREDIT means cash is received, DEBIT means cash is paid, EVEN means the net price is zero, and UNKNOWN means the direction could not be determined.
32
+ # Direction of the net order price. CREDIT means cash is received, DEBIT means cash is paid, EVEN means the net price is zero, and UNKNOWN means the direction could not be determined. Null when not applicable, for example for orders containing an outright futures leg (`instrument.kind` of `future`). A futures price is a contract quote, not an upfront cash flow. Futures options retain their price effect.
33
33
  attr_accessor :price_effect
34
34
 
35
35
  # Total quantity requested. For multi-leg orders this is the number of spreads, not the sum of leg quantities.
@@ -98,7 +98,7 @@ module SnapTrade
98
98
  :'time_in_force' => :'AccountOrderTimeInForce',
99
99
  :'expiry_date' => :'Time',
100
100
  :'priced_in' => :'PricedInInstrument',
101
- :'price_effect' => :'PriceEffect',
101
+ :'price_effect' => :'AccountOrderPriceEffect',
102
102
  :'total_quantity' => :'Float',
103
103
  :'filled_quantity' => :'Float',
104
104
  :'canceled_quantity' => :'Float',
@@ -117,6 +117,7 @@ module SnapTrade
117
117
  Set.new([
118
118
  :'expiry_date',
119
119
  :'priced_in',
120
+ :'price_effect',
120
121
  :'total_quantity',
121
122
  :'filled_quantity',
122
123
  :'canceled_quantity',
@@ -235,10 +236,6 @@ module SnapTrade
235
236
  invalid_properties.push('invalid value for "time_in_force", time_in_force cannot be nil.')
236
237
  end
237
238
 
238
- if @price_effect.nil?
239
- invalid_properties.push('invalid value for "price_effect", price_effect cannot be nil.')
240
- end
241
-
242
239
  if @legs.nil?
243
240
  invalid_properties.push('invalid value for "legs", legs cannot be nil.')
244
241
  end
@@ -257,7 +254,6 @@ module SnapTrade
257
254
  return false if @status.nil?
258
255
  return false if @order_type.nil?
259
256
  return false if @time_in_force.nil?
260
- return false if @price_effect.nil?
261
257
  return false if @legs.nil?
262
258
  return false if @legs.length < 1
263
259
  true
@@ -0,0 +1,39 @@
1
+ =begin
2
+ #SnapTrade
3
+
4
+ #Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: api@snaptrade.com
8
+ =end
9
+
10
+ require 'date'
11
+ require 'time'
12
+
13
+ module SnapTrade
14
+ class AccountOrderPriceEffect
15
+ CREDIT = "CREDIT".freeze
16
+ DEBIT = "DEBIT".freeze
17
+ EVEN = "EVEN".freeze
18
+ UNKNOWN = "UNKNOWN".freeze
19
+
20
+ def self.all_vars
21
+ @all_vars ||= [CREDIT, DEBIT, EVEN, UNKNOWN].freeze
22
+ end
23
+
24
+ # Builds the enum from string
25
+ # @param [String] The enum value in the form of the string
26
+ # @return [String] The enum value
27
+ def self.build_from_hash(value)
28
+ new.build_from_hash(value)
29
+ end
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ return value if AccountOrderPriceEffect.all_vars.include?(value)
36
+ raise "Invalid ENUM value #{value} for class #AccountOrderPriceEffect"
37
+ end
38
+ end
39
+ end