snaptrade 3.0.66 → 3.0.68
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 +4 -4
- data/README.md +31 -10
- data/lib/snaptrade/api/account_information_api.rb +42 -34
- data/lib/snaptrade/api/connections_api.rb +10 -2
- data/lib/snaptrade/api/experimental_endpoints_api.rb +18 -6
- data/lib/snaptrade/models/account_universal_activity.rb +11 -1
- data/lib/snaptrade/models/future_option_instrument.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +9 -9
- data/spec/api/connections_api_spec.rb +1 -1
- data/spec/api/experimental_endpoints_api_spec.rb +3 -3
- data/spec/models/account_universal_activity_spec.rb +6 -0
- metadata +289 -289
|
@@ -241,6 +241,8 @@ module SnapTrade
|
|
|
241
241
|
|
|
242
242
|
# Get account order detail (V2)
|
|
243
243
|
#
|
|
244
|
+
# **Deprecated.** Use the [get account order detail](/reference/Account%20Information/AccountInformation_getAccountOrder) endpoint instead.
|
|
245
|
+
#
|
|
244
246
|
# Returns the detail of a single order using the brokerage order ID provided as a path parameter.
|
|
245
247
|
#
|
|
246
248
|
# The V2 order response format includes all legs of the order in the `legs` list field.
|
|
@@ -262,6 +264,8 @@ module SnapTrade
|
|
|
262
264
|
|
|
263
265
|
# Get account order detail (V2)
|
|
264
266
|
#
|
|
267
|
+
# **Deprecated.** Use the [get account order detail](/reference/Account%20Information/AccountInformation_getAccountOrder) endpoint instead.
|
|
268
|
+
#
|
|
265
269
|
# Returns the detail of a single order using the brokerage order ID provided as a path parameter.
|
|
266
270
|
#
|
|
267
271
|
# The V2 order response format includes all legs of the order in the `legs` list field.
|
|
@@ -281,7 +285,7 @@ module SnapTrade
|
|
|
281
285
|
end
|
|
282
286
|
|
|
283
287
|
# Get account order detail (V2)
|
|
284
|
-
# Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
288
|
+
# **Deprecated.** Use the [get account order detail](/reference/Account%20Information/AccountInformation_getAccountOrder) endpoint instead. Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
285
289
|
# @param account_id [String]
|
|
286
290
|
# @param brokerage_order_id [String]
|
|
287
291
|
# @param user_id [String]
|
|
@@ -294,7 +298,7 @@ module SnapTrade
|
|
|
294
298
|
end
|
|
295
299
|
|
|
296
300
|
# Get account order detail (V2)
|
|
297
|
-
# Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
301
|
+
# **Deprecated.** Use the [get account order detail](/reference/Account%20Information/AccountInformation_getAccountOrder) endpoint instead. Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
298
302
|
# @param account_id [String]
|
|
299
303
|
# @param brokerage_order_id [String]
|
|
300
304
|
# @param user_id [String]
|
|
@@ -366,6 +370,8 @@ module SnapTrade
|
|
|
366
370
|
|
|
367
371
|
# List account orders v2
|
|
368
372
|
#
|
|
373
|
+
# **Deprecated.** Use the [list all account orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders) endpoint instead.
|
|
374
|
+
#
|
|
369
375
|
# Returns a list of recent orders in the specified account.
|
|
370
376
|
#
|
|
371
377
|
# The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg.
|
|
@@ -387,6 +393,8 @@ module SnapTrade
|
|
|
387
393
|
|
|
388
394
|
# List account orders v2
|
|
389
395
|
#
|
|
396
|
+
# **Deprecated.** Use the [list all account orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders) endpoint instead.
|
|
397
|
+
#
|
|
390
398
|
# Returns a list of recent orders in the specified account.
|
|
391
399
|
#
|
|
392
400
|
# The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg.
|
|
@@ -406,7 +414,7 @@ module SnapTrade
|
|
|
406
414
|
end
|
|
407
415
|
|
|
408
416
|
# List account orders v2
|
|
409
|
-
# Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
417
|
+
# **Deprecated.** Use the [list all account orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders) endpoint instead. Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
410
418
|
# @param user_id [String]
|
|
411
419
|
# @param user_secret [String]
|
|
412
420
|
# @param account_id [String]
|
|
@@ -420,7 +428,7 @@ module SnapTrade
|
|
|
420
428
|
end
|
|
421
429
|
|
|
422
430
|
# List account orders v2
|
|
423
|
-
# Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
431
|
+
# **Deprecated.** Use the [list all account orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders) endpoint instead. Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
424
432
|
# @param user_id [String]
|
|
425
433
|
# @param user_secret [String]
|
|
426
434
|
# @param account_id [String]
|
|
@@ -503,6 +511,8 @@ module SnapTrade
|
|
|
503
511
|
|
|
504
512
|
# List account recent orders (V2, last 24 hours only)
|
|
505
513
|
#
|
|
514
|
+
# **Deprecated.** Use the [list all account recent orders](/reference/Account%20Information/AccountInformation_getAllAccountRecentOrders) endpoint instead.
|
|
515
|
+
#
|
|
506
516
|
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format.
|
|
507
517
|
# 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.
|
|
508
518
|
# Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days.
|
|
@@ -521,6 +531,8 @@ module SnapTrade
|
|
|
521
531
|
|
|
522
532
|
# List account recent orders (V2, last 24 hours only)
|
|
523
533
|
#
|
|
534
|
+
# **Deprecated.** Use the [list all account recent orders](/reference/Account%20Information/AccountInformation_getAllAccountRecentOrders) endpoint instead.
|
|
535
|
+
#
|
|
524
536
|
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format.
|
|
525
537
|
# 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.
|
|
526
538
|
# Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days.
|
|
@@ -537,7 +549,7 @@ module SnapTrade
|
|
|
537
549
|
end
|
|
538
550
|
|
|
539
551
|
# List account recent orders (V2, last 24 hours only)
|
|
540
|
-
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. 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 /orders in that it is 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.
|
|
552
|
+
# **Deprecated.** Use the [list all account recent orders](/reference/Account%20Information/AccountInformation_getAllAccountRecentOrders) endpoint instead. A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. 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 /orders in that it is 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.
|
|
541
553
|
# @param user_id [String]
|
|
542
554
|
# @param user_secret [String]
|
|
543
555
|
# @param account_id [String]
|
|
@@ -550,7 +562,7 @@ module SnapTrade
|
|
|
550
562
|
end
|
|
551
563
|
|
|
552
564
|
# List account recent orders (V2, last 24 hours only)
|
|
553
|
-
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. 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 /orders in that it is 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.
|
|
565
|
+
# **Deprecated.** Use the [list all account recent orders](/reference/Account%20Information/AccountInformation_getAllAccountRecentOrders) endpoint instead. A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. 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 /orders in that it is 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.
|
|
554
566
|
# @param user_id [String]
|
|
555
567
|
# @param user_secret [String]
|
|
556
568
|
# @param account_id [String]
|
|
@@ -13,6 +13,8 @@ require 'time'
|
|
|
13
13
|
module SnapTrade
|
|
14
14
|
# A transaction or activity from an institution
|
|
15
15
|
class AccountUniversalActivity
|
|
16
|
+
attr_accessor :instrument
|
|
17
|
+
|
|
16
18
|
# Unique identifier for the transaction. This is the ID used to reference the transaction in SnapTrade. Please note that this ID _can_ change if the transaction is deleted and re-added. Under normal circumstances, SnapTrade does not delete transactions. The only time this would happen is if SnapTrade re-fetches and reprocesses the data from the brokerage, which is rare. If you require a stable ID, please let us know and we can work with you to provide one.
|
|
17
19
|
attr_accessor :id
|
|
18
20
|
|
|
@@ -63,6 +65,7 @@ module SnapTrade
|
|
|
63
65
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
64
66
|
def self.attribute_map
|
|
65
67
|
{
|
|
68
|
+
:'instrument' => :'instrument',
|
|
66
69
|
:'id' => :'id',
|
|
67
70
|
:'symbol' => :'symbol',
|
|
68
71
|
:'currency_universal_symbol' => :'currency_universal_symbol',
|
|
@@ -91,6 +94,7 @@ module SnapTrade
|
|
|
91
94
|
# Attribute type mapping.
|
|
92
95
|
def self.openapi_types
|
|
93
96
|
{
|
|
97
|
+
:'instrument' => :'Instrument',
|
|
94
98
|
:'id' => :'String',
|
|
95
99
|
:'symbol' => :'AccountUniversalActivitySymbol',
|
|
96
100
|
:'currency_universal_symbol' => :'AccountUniversalActivityCurrencyUniversalSymbol',
|
|
@@ -114,6 +118,7 @@ module SnapTrade
|
|
|
114
118
|
# List of attributes with nullable: true
|
|
115
119
|
def self.openapi_nullable
|
|
116
120
|
Set.new([
|
|
121
|
+
:'instrument',
|
|
117
122
|
:'symbol',
|
|
118
123
|
:'currency_universal_symbol',
|
|
119
124
|
:'option_symbol',
|
|
@@ -140,6 +145,10 @@ module SnapTrade
|
|
|
140
145
|
h[k.to_sym] = v
|
|
141
146
|
}
|
|
142
147
|
|
|
148
|
+
if attributes.key?(:'instrument')
|
|
149
|
+
self.instrument = attributes[:'instrument']
|
|
150
|
+
end
|
|
151
|
+
|
|
143
152
|
if attributes.key?(:'id')
|
|
144
153
|
self.id = attributes[:'id']
|
|
145
154
|
end
|
|
@@ -227,6 +236,7 @@ module SnapTrade
|
|
|
227
236
|
def ==(o)
|
|
228
237
|
return true if self.equal?(o)
|
|
229
238
|
self.class == o.class &&
|
|
239
|
+
instrument == o.instrument &&
|
|
230
240
|
id == o.id &&
|
|
231
241
|
symbol == o.symbol &&
|
|
232
242
|
currency_universal_symbol == o.currency_universal_symbol &&
|
|
@@ -255,7 +265,7 @@ module SnapTrade
|
|
|
255
265
|
# Calculates hash code according to all attributes.
|
|
256
266
|
# @return [Integer] Hash code
|
|
257
267
|
def hash
|
|
258
|
-
[id, symbol, currency_universal_symbol, option_symbol, price, units, amount, currency, type, option_type, description, trade_date, settlement_date, fee, fx_rate, institution, external_reference_id].hash
|
|
268
|
+
[instrument, id, symbol, currency_universal_symbol, option_symbol, price, units, amount, currency, type, option_type, description, trade_date, settlement_date, fee, fx_rate, institution, external_reference_id].hash
|
|
259
269
|
end
|
|
260
270
|
|
|
261
271
|
# Builds the object from hash
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module SnapTrade
|
|
14
|
-
#
|
|
14
|
+
# Contract details for an option on a future, including its underlying futures contract. **Beta:** futures-option positions are currently returned only for tastytrade and Interactive Brokers connections, and only for partners enabled for those positions. Tastytrade activities can also identify futures-option contracts. This schema may change.
|
|
15
15
|
class FutureOptionInstrument
|
|
16
16
|
# Type of security instrument.
|
|
17
17
|
attr_accessor :kind
|
data/lib/snaptrade/version.rb
CHANGED
|
@@ -90,7 +90,7 @@ describe 'AccountInformationApi' do
|
|
|
90
90
|
|
|
91
91
|
# unit tests for get_account_order
|
|
92
92
|
# Get account order detail
|
|
93
|
-
# 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.
|
|
93
|
+
# 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.
|
|
94
94
|
# @param account_id
|
|
95
95
|
# @param brokerage_order_id
|
|
96
96
|
# @param user_id
|
|
@@ -124,7 +124,7 @@ describe 'AccountInformationApi' do
|
|
|
124
124
|
|
|
125
125
|
# unit tests for get_all_account_orders
|
|
126
126
|
# List all account orders
|
|
127
|
-
# 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`.
|
|
127
|
+
# 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`. 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.
|
|
128
128
|
# @param user_id
|
|
129
129
|
# @param user_secret
|
|
130
130
|
# @param account_id
|
|
@@ -154,7 +154,7 @@ describe 'AccountInformationApi' do
|
|
|
154
154
|
|
|
155
155
|
# unit tests for get_all_account_recent_orders
|
|
156
156
|
# List all account recent orders (last 24 hours only)
|
|
157
|
-
# 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.
|
|
157
|
+
# 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.
|
|
158
158
|
# @param user_id
|
|
159
159
|
# @param user_secret
|
|
160
160
|
# @param account_id
|
|
@@ -183,7 +183,7 @@ describe 'AccountInformationApi' do
|
|
|
183
183
|
|
|
184
184
|
# unit tests for get_user_account_details
|
|
185
185
|
# Get account detail
|
|
186
|
-
# **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.
|
|
186
|
+
# **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. This endpoint will return HTTP 410 Gone for all customers that sign up after December 1, 2026. 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.
|
|
187
187
|
# @param user_id
|
|
188
188
|
# @param user_secret
|
|
189
189
|
# @param account_id
|
|
@@ -197,7 +197,7 @@ describe 'AccountInformationApi' do
|
|
|
197
197
|
|
|
198
198
|
# unit tests for get_user_account_order_detail
|
|
199
199
|
# Get account order detail
|
|
200
|
-
# Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
200
|
+
# **Deprecated.** Use the [get account order detail](/reference/Account%20Information/AccountInformation_getAccountOrder) endpoint instead. Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
201
201
|
# @param account_id
|
|
202
202
|
# @param user_id
|
|
203
203
|
# @param user_secret
|
|
@@ -212,7 +212,7 @@ describe 'AccountInformationApi' do
|
|
|
212
212
|
|
|
213
213
|
# unit tests for get_user_account_orders
|
|
214
214
|
# List account orders
|
|
215
|
-
# Returns a list of recent orders in 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.
|
|
215
|
+
# **Deprecated.** Use the [list all account orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders) endpoint instead. Returns a list of recent orders in 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.
|
|
216
216
|
# @param user_id
|
|
217
217
|
# @param user_secret
|
|
218
218
|
# @param account_id
|
|
@@ -228,7 +228,7 @@ describe 'AccountInformationApi' do
|
|
|
228
228
|
|
|
229
229
|
# unit tests for get_user_account_recent_orders
|
|
230
230
|
# List account recent orders (last 24 hours only)
|
|
231
|
-
# A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. 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 /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
231
|
+
# **Deprecated.** Use the [list all account recent orders](/reference/Account%20Information/AccountInformation_getAllAccountRecentOrders) endpoint instead. A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. 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 /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
232
232
|
# @param user_id
|
|
233
233
|
# @param user_secret
|
|
234
234
|
# @param account_id
|
|
@@ -258,7 +258,7 @@ describe 'AccountInformationApi' do
|
|
|
258
258
|
|
|
259
259
|
# unit tests for get_user_holdings
|
|
260
260
|
# List account holdings
|
|
261
|
-
# **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/
|
|
261
|
+
# **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders). This endpoint will return HTTP 410 Gone for all customers that sign up after May 11, 2026. Returns a list of balances, positions, and recent orders 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. Concurrent live holdings requests for the same account fail immediately with HTTP 409 and error code `1166`. Wait for the in-flight request to complete before retrying.
|
|
262
262
|
# @param account_id
|
|
263
263
|
# @param user_id
|
|
264
264
|
# @param user_secret
|
|
@@ -285,7 +285,7 @@ describe 'AccountInformationApi' do
|
|
|
285
285
|
|
|
286
286
|
# unit tests for list_user_accounts
|
|
287
287
|
# List user accounts
|
|
288
|
-
# **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/
|
|
288
|
+
# **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. This endpoint will return HTTP 410 Gone for all customers that sign up after December 1, 2026. 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_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
|
|
289
289
|
# @param user_id
|
|
290
290
|
# @param user_secret
|
|
291
291
|
# @param [Hash] opts the optional parameters
|
|
@@ -71,7 +71,7 @@ describe 'ConnectionsApi' do
|
|
|
71
71
|
|
|
72
72
|
# unit tests for list_brokerage_authorization_accounts
|
|
73
73
|
# List accounts for a connection
|
|
74
|
-
# Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call. 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 brokerage. 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.
|
|
74
|
+
# **Deprecated.** Use the [list accounts](/reference/Connections/Connections_listConnectionAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, line of credit, annuity, and mortgage accounts. This endpoint will return HTTP 410 Gone for all customers that sign up after December 1, 2026. Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call. 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 brokerage. 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.
|
|
75
75
|
# @param authorization_id
|
|
76
76
|
# @param user_id
|
|
77
77
|
# @param user_secret
|
|
@@ -55,7 +55,7 @@ describe 'ExperimentalEndpointsApi' do
|
|
|
55
55
|
|
|
56
56
|
# unit tests for get_user_account_order_detail_v2
|
|
57
57
|
# Get account order detail (V2)
|
|
58
|
-
# Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
58
|
+
# **Deprecated.** Use the [get account order detail](/reference/Account%20Information/AccountInformation_getAccountOrder) endpoint instead. Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
59
59
|
# @param account_id
|
|
60
60
|
# @param brokerage_order_id
|
|
61
61
|
# @param user_id
|
|
@@ -70,7 +70,7 @@ describe 'ExperimentalEndpointsApi' do
|
|
|
70
70
|
|
|
71
71
|
# unit tests for get_user_account_orders_v2
|
|
72
72
|
# List account orders v2
|
|
73
|
-
# Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
73
|
+
# **Deprecated.** Use the [list all account orders](/reference/Account%20Information/AccountInformation_getAllAccountOrders) endpoint instead. Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
74
74
|
# @param user_id
|
|
75
75
|
# @param user_secret
|
|
76
76
|
# @param account_id
|
|
@@ -86,7 +86,7 @@ describe 'ExperimentalEndpointsApi' do
|
|
|
86
86
|
|
|
87
87
|
# unit tests for get_user_account_recent_orders_v2
|
|
88
88
|
# List account recent orders (V2, last 24 hours only)
|
|
89
|
-
# A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. 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 /orders in that it is 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.
|
|
89
|
+
# **Deprecated.** Use the [list all account recent orders](/reference/Account%20Information/AccountInformation_getAllAccountRecentOrders) endpoint instead. A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. 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 /orders in that it is 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.
|
|
90
90
|
# @param user_id
|
|
91
91
|
# @param user_secret
|
|
92
92
|
# @param account_id
|
|
@@ -20,6 +20,12 @@ describe SnapTrade::AccountUniversalActivity do
|
|
|
20
20
|
expect(instance).to be_instance_of(SnapTrade::AccountUniversalActivity)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
|
+
describe 'test attribute "instrument"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
23
29
|
describe 'test attribute "id"' do
|
|
24
30
|
it 'should work' do
|
|
25
31
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|