snaptrade 3.0.22 → 3.0.23
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 +3 -3
- data/lib/snaptrade/api/account_information_api.rb +4 -4
- data/lib/snaptrade/models/instrument.rb +4 -2
- data/lib/snaptrade/models/tokenized_asset_instrument.rb +277 -0
- data/lib/snaptrade/models/tokenized_asset_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/underlying_tokenized_asset_instrument.rb +53 -0
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +3 -0
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/models/tokenized_asset_instrument_kind_spec.rb +23 -0
- data/spec/models/tokenized_asset_instrument_spec.rb +53 -0
- data/spec/models/underlying_tokenized_asset_instrument_spec.rb +38 -0
- metadata +227 -218
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0ba98013a5351632b478c96ed633ec926f4ca738ecb191f5ce3a2a2c3bfaa54
|
|
4
|
+
data.tar.gz: 787d5050adf19743e034be9b687ee12357f754a8bd5737191b3686675c6ae38a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee21b7a8e48a8e07a7e47b74eb80b14d51c4276744c5726f6f034201ab70a3c45bd0c40d3099c2b83836477f98e77b0f99e1b96d04a8506e9a8d7086f0c09f95
|
|
7
|
+
data.tar.gz: ab0b852cd31d2fd09c7752f041605f03bf0b03fe3a5a6079cd751e89e9e29e585e212365aae5ee960dda021edd6ad372968b2a8c4a7d9b839c00aed9dd25200e
|
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
|
-
[](https://rubygems.org/gems/snaptrade/versions/3.0.23)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -139,7 +139,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
139
139
|
Add to Gemfile:
|
|
140
140
|
|
|
141
141
|
```ruby
|
|
142
|
-
gem 'snaptrade', '~> 3.0.
|
|
142
|
+
gem 'snaptrade', '~> 3.0.23'
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -307,7 +307,7 @@ p result
|
|
|
307
307
|
|
|
308
308
|
Returns a list of all positions in the specified account.
|
|
309
309
|
|
|
310
|
-
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and
|
|
310
|
+
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
311
311
|
|
|
312
312
|
**Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
313
313
|
|
|
@@ -290,7 +290,7 @@ module SnapTrade
|
|
|
290
290
|
#
|
|
291
291
|
# Returns a list of all positions in the specified account.
|
|
292
292
|
#
|
|
293
|
-
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and
|
|
293
|
+
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
294
294
|
#
|
|
295
295
|
# **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
296
296
|
#
|
|
@@ -311,7 +311,7 @@ module SnapTrade
|
|
|
311
311
|
#
|
|
312
312
|
# Returns a list of all positions in the specified account.
|
|
313
313
|
#
|
|
314
|
-
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and
|
|
314
|
+
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
315
315
|
#
|
|
316
316
|
# **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change.
|
|
317
317
|
#
|
|
@@ -328,7 +328,7 @@ module SnapTrade
|
|
|
328
328
|
end
|
|
329
329
|
|
|
330
330
|
# List all account positions
|
|
331
|
-
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and
|
|
331
|
+
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
332
332
|
# @param user_id [String]
|
|
333
333
|
# @param user_secret [String]
|
|
334
334
|
# @param account_id [String]
|
|
@@ -340,7 +340,7 @@ module SnapTrade
|
|
|
340
340
|
end
|
|
341
341
|
|
|
342
342
|
# List all account positions
|
|
343
|
-
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and
|
|
343
|
+
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
344
344
|
# @param user_id [String]
|
|
345
345
|
# @param user_secret [String]
|
|
346
346
|
# @param account_id [String]
|
|
@@ -27,7 +27,8 @@ module SnapTrade
|
|
|
27
27
|
:'MutualFundInstrument',
|
|
28
28
|
:'OptionInstrument',
|
|
29
29
|
:'OtherInstrument',
|
|
30
|
-
:'StockInstrument'
|
|
30
|
+
:'StockInstrument',
|
|
31
|
+
:'TokenizedAssetInstrument'
|
|
31
32
|
]
|
|
32
33
|
end
|
|
33
34
|
|
|
@@ -50,7 +51,8 @@ module SnapTrade
|
|
|
50
51
|
:'mutualfund' => :'MutualFundInstrument',
|
|
51
52
|
:'option' => :'OptionInstrument',
|
|
52
53
|
:'other' => :'OtherInstrument',
|
|
53
|
-
:'stock' => :'StockInstrument'
|
|
54
|
+
:'stock' => :'StockInstrument',
|
|
55
|
+
:'tokenized_asset' => :'TokenizedAssetInstrument'
|
|
54
56
|
}
|
|
55
57
|
end
|
|
56
58
|
|
|
@@ -0,0 +1,277 @@
|
|
|
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
|
+
# Canonical tokenized asset wrapper for a V2 position. Symbol and description duplicate the listed underlying's display metadata for convenience; they are not token-specific identifiers or labels. Currency and exchange metadata are provided only in underlying_instrument.
|
|
15
|
+
class TokenizedAssetInstrument
|
|
16
|
+
# Type of security instrument.
|
|
17
|
+
attr_accessor :kind
|
|
18
|
+
|
|
19
|
+
# Unique identifier for the canonical tokenized asset wrapper.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# Display symbol of the underlying stock or ETF, not a token-specific ticker.
|
|
23
|
+
attr_accessor :symbol
|
|
24
|
+
|
|
25
|
+
# Display name of the underlying stock or ETF, when available.
|
|
26
|
+
attr_accessor :description
|
|
27
|
+
|
|
28
|
+
attr_accessor :underlying_instrument
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'kind' => :'kind',
|
|
34
|
+
:'id' => :'id',
|
|
35
|
+
:'symbol' => :'symbol',
|
|
36
|
+
:'description' => :'description',
|
|
37
|
+
:'underlying_instrument' => :'underlying_instrument'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'kind' => :'TokenizedAssetInstrumentKind',
|
|
50
|
+
:'id' => :'String',
|
|
51
|
+
:'symbol' => :'String',
|
|
52
|
+
:'description' => :'String',
|
|
53
|
+
:'underlying_instrument' => :'UnderlyingTokenizedAssetInstrument'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::TokenizedAssetInstrument` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::TokenizedAssetInstrument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'kind')
|
|
79
|
+
self.kind = attributes[:'kind']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'symbol')
|
|
87
|
+
self.symbol = attributes[:'symbol']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'description')
|
|
91
|
+
self.description = attributes[:'description']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'underlying_instrument')
|
|
95
|
+
self.underlying_instrument = attributes[:'underlying_instrument']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
if @kind.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "kind", kind cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @id.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @symbol.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @underlying_instrument.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "underlying_instrument", underlying_instrument cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
invalid_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check to see if the all the properties in the model are valid
|
|
123
|
+
# @return true if the model is valid
|
|
124
|
+
def valid?
|
|
125
|
+
return false if @kind.nil?
|
|
126
|
+
return false if @id.nil?
|
|
127
|
+
return false if @symbol.nil?
|
|
128
|
+
return false if @underlying_instrument.nil?
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Checks equality by comparing each attribute.
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def ==(o)
|
|
135
|
+
return true if self.equal?(o)
|
|
136
|
+
self.class == o.class &&
|
|
137
|
+
kind == o.kind &&
|
|
138
|
+
id == o.id &&
|
|
139
|
+
symbol == o.symbol &&
|
|
140
|
+
description == o.description &&
|
|
141
|
+
underlying_instrument == o.underlying_instrument
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# @see the `==` method
|
|
145
|
+
# @param [Object] Object to be compared
|
|
146
|
+
def eql?(o)
|
|
147
|
+
self == o
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Calculates hash code according to all attributes.
|
|
151
|
+
# @return [Integer] Hash code
|
|
152
|
+
def hash
|
|
153
|
+
[kind, id, symbol, description, underlying_instrument].hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Builds the object from hash
|
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
|
+
# @return [Object] Returns the model itself
|
|
159
|
+
def self.build_from_hash(attributes)
|
|
160
|
+
new.build_from_hash(attributes)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Builds the object from hash
|
|
164
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
165
|
+
# @return [Object] Returns the model itself
|
|
166
|
+
def build_from_hash(attributes)
|
|
167
|
+
return nil unless attributes.is_a?(Hash)
|
|
168
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
169
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
170
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
171
|
+
self.send("#{key}=", nil)
|
|
172
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
173
|
+
# check to ensure the input is an array given that the attribute
|
|
174
|
+
# is documented as an array but the input is not
|
|
175
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
176
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
177
|
+
end
|
|
178
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
179
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
self
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Deserializes the data based on type
|
|
187
|
+
# @param string type Data type
|
|
188
|
+
# @param string value Value to be deserialized
|
|
189
|
+
# @return [Object] Deserialized data
|
|
190
|
+
def _deserialize(type, value)
|
|
191
|
+
case type.to_sym
|
|
192
|
+
when :Time
|
|
193
|
+
Time.parse(value)
|
|
194
|
+
when :Date
|
|
195
|
+
Date.parse(value)
|
|
196
|
+
when :String
|
|
197
|
+
value.to_s
|
|
198
|
+
when :Integer
|
|
199
|
+
value.to_i
|
|
200
|
+
when :Float
|
|
201
|
+
value.to_f
|
|
202
|
+
when :Boolean
|
|
203
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
204
|
+
true
|
|
205
|
+
else
|
|
206
|
+
false
|
|
207
|
+
end
|
|
208
|
+
when :Object
|
|
209
|
+
# generic object (usually a Hash), return directly
|
|
210
|
+
value
|
|
211
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
212
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
213
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
214
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
215
|
+
k_type = Regexp.last_match[:k_type]
|
|
216
|
+
v_type = Regexp.last_match[:v_type]
|
|
217
|
+
{}.tap do |hash|
|
|
218
|
+
value.each do |k, v|
|
|
219
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
else # model
|
|
223
|
+
# models (e.g. Pet) or oneOf
|
|
224
|
+
klass = SnapTrade.const_get(type)
|
|
225
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Returns the string representation of the object
|
|
230
|
+
# @return [String] String presentation of the object
|
|
231
|
+
def to_s
|
|
232
|
+
to_hash.to_s
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
|
237
|
+
def to_body
|
|
238
|
+
to_hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Returns the object in the form of hash
|
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
|
243
|
+
def to_hash
|
|
244
|
+
hash = {}
|
|
245
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
246
|
+
value = self.send(attr)
|
|
247
|
+
if value.nil?
|
|
248
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
249
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
hash[param] = _to_hash(value)
|
|
253
|
+
end
|
|
254
|
+
hash
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Outputs non-array value in the form of hash
|
|
258
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
259
|
+
# @param [Object] value Any valid value
|
|
260
|
+
# @return [Hash] Returns the value in the form of hash
|
|
261
|
+
def _to_hash(value)
|
|
262
|
+
if value.is_a?(Array)
|
|
263
|
+
value.compact.map { |v| _to_hash(v) }
|
|
264
|
+
elsif value.is_a?(Hash)
|
|
265
|
+
{}.tap do |hash|
|
|
266
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
267
|
+
end
|
|
268
|
+
elsif value.respond_to? :to_hash
|
|
269
|
+
value.to_hash
|
|
270
|
+
else
|
|
271
|
+
value
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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 TokenizedAssetInstrumentKind
|
|
15
|
+
TOKENIZED_ASSET = "tokenized_asset".freeze
|
|
16
|
+
|
|
17
|
+
def self.all_vars
|
|
18
|
+
@all_vars ||= [TOKENIZED_ASSET].freeze
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Builds the enum from string
|
|
22
|
+
# @param [String] The enum value in the form of the string
|
|
23
|
+
# @return [String] The enum value
|
|
24
|
+
def self.build_from_hash(value)
|
|
25
|
+
new.build_from_hash(value)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Builds the enum from string
|
|
29
|
+
# @param [String] The enum value in the form of the string
|
|
30
|
+
# @return [String] The enum value
|
|
31
|
+
def build_from_hash(value)
|
|
32
|
+
return value if TokenizedAssetInstrumentKind.all_vars.include?(value)
|
|
33
|
+
raise "Invalid ENUM value #{value} for class #TokenizedAssetInstrumentKind"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
# The listed stock or ETF underlying a tokenized asset.
|
|
15
|
+
module UnderlyingTokenizedAssetInstrument
|
|
16
|
+
class << self
|
|
17
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
18
|
+
def openapi_one_of
|
|
19
|
+
[
|
|
20
|
+
:'EtfInstrument',
|
|
21
|
+
:'StockInstrument'
|
|
22
|
+
]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Discriminator's property name (OpenAPI v3)
|
|
26
|
+
def openapi_discriminator_name
|
|
27
|
+
:'kind'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Discriminator's mapping (OpenAPI v3)
|
|
31
|
+
def openapi_discriminator_mapping
|
|
32
|
+
{
|
|
33
|
+
:'etf' => :'EtfInstrument',
|
|
34
|
+
:'stock' => :'StockInstrument'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Builds the object
|
|
39
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
40
|
+
# @return [Object] Returns the model or the data itself
|
|
41
|
+
def build(data)
|
|
42
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
43
|
+
return nil if discriminator_value.nil?
|
|
44
|
+
|
|
45
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
|
46
|
+
return nil unless klass
|
|
47
|
+
|
|
48
|
+
SnapTrade.const_get(klass).build_from_hash(data)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
end
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
|
@@ -238,6 +238,8 @@ require 'snaptrade/models/take_profit'
|
|
|
238
238
|
require 'snaptrade/models/tax_lot'
|
|
239
239
|
require 'snaptrade/models/time_in_force_strict'
|
|
240
240
|
require 'snaptrade/models/timeframe'
|
|
241
|
+
require 'snaptrade/models/tokenized_asset_instrument'
|
|
242
|
+
require 'snaptrade/models/tokenized_asset_instrument_kind'
|
|
241
243
|
require 'snaptrade/models/trade_detection_add_subscription_request'
|
|
242
244
|
require 'snaptrade/models/trade_detection_cancel_subscription_request'
|
|
243
245
|
require 'snaptrade/models/trade_detection_cancel_subscription_response'
|
|
@@ -255,6 +257,7 @@ require 'snaptrade/models/underlying_option_instrument'
|
|
|
255
257
|
require 'snaptrade/models/underlying_symbol'
|
|
256
258
|
require 'snaptrade/models/underlying_symbol_exchange'
|
|
257
259
|
require 'snaptrade/models/underlying_symbol_type'
|
|
260
|
+
require 'snaptrade/models/underlying_tokenized_asset_instrument'
|
|
258
261
|
require 'snaptrade/models/universal_activity'
|
|
259
262
|
require 'snaptrade/models/universal_symbol'
|
|
260
263
|
require 'snaptrade/models/user_i_dand_secret'
|
|
@@ -62,7 +62,7 @@ describe 'AccountInformationApi' do
|
|
|
62
62
|
|
|
63
63
|
# unit tests for get_all_account_positions
|
|
64
64
|
# List all account positions
|
|
65
|
-
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, and
|
|
65
|
+
# Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
66
66
|
# @param user_id
|
|
67
67
|
# @param user_secret
|
|
68
68
|
# @param account_id
|
|
@@ -0,0 +1,23 @@
|
|
|
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 'spec_helper'
|
|
11
|
+
require 'json'
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
# Unit tests for SnapTrade::TokenizedAssetInstrumentKind
|
|
15
|
+
describe SnapTrade::TokenizedAssetInstrumentKind do
|
|
16
|
+
let(:instance) { SnapTrade::TokenizedAssetInstrumentKind.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of TokenizedAssetInstrumentKind' do
|
|
19
|
+
it 'should create an instance of TokenizedAssetInstrumentKind' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::TokenizedAssetInstrumentKind)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
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 'spec_helper'
|
|
11
|
+
require 'json'
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
# Unit tests for SnapTrade::TokenizedAssetInstrument
|
|
15
|
+
describe SnapTrade::TokenizedAssetInstrument do
|
|
16
|
+
let(:instance) { SnapTrade::TokenizedAssetInstrument.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of TokenizedAssetInstrument' do
|
|
19
|
+
it 'should create an instance of TokenizedAssetInstrument' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::TokenizedAssetInstrument)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "kind"' 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
|
+
|
|
29
|
+
describe 'test attribute "id"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe 'test attribute "symbol"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe 'test attribute "description"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe 'test attribute "underlying_instrument"' do
|
|
48
|
+
it 'should work' do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
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 'spec_helper'
|
|
11
|
+
require 'json'
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
# Unit tests for SnapTrade::UnderlyingTokenizedAssetInstrument
|
|
15
|
+
describe SnapTrade::UnderlyingTokenizedAssetInstrument do
|
|
16
|
+
describe '.openapi_one_of' do
|
|
17
|
+
it 'lists the items referenced in the oneOf array' do
|
|
18
|
+
expect(described_class.openapi_one_of).to_not be_empty
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
describe '.openapi_discriminator_name' do
|
|
23
|
+
it 'returns the value of the "discriminator" property' do
|
|
24
|
+
expect(described_class.openapi_discriminator_name).to_not be_empty
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe '.openapi_discriminator_mapping' do
|
|
29
|
+
it 'returns the key/values of the "mapping" property' do
|
|
30
|
+
expect(described_class.openapi_discriminator_mapping.values.uniq.sort).to eq(described_class.openapi_one_of.sort)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe '.build' do
|
|
35
|
+
it 'returns the correct model' do
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snaptrade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -352,6 +352,8 @@ files:
|
|
|
352
352
|
- lib/snaptrade/models/tax_lot.rb
|
|
353
353
|
- lib/snaptrade/models/time_in_force_strict.rb
|
|
354
354
|
- lib/snaptrade/models/timeframe.rb
|
|
355
|
+
- lib/snaptrade/models/tokenized_asset_instrument.rb
|
|
356
|
+
- lib/snaptrade/models/tokenized_asset_instrument_kind.rb
|
|
355
357
|
- lib/snaptrade/models/trade_detection_add_subscription_request.rb
|
|
356
358
|
- lib/snaptrade/models/trade_detection_cancel_subscription_request.rb
|
|
357
359
|
- lib/snaptrade/models/trade_detection_cancel_subscription_response.rb
|
|
@@ -368,6 +370,7 @@ files:
|
|
|
368
370
|
- lib/snaptrade/models/underlying_symbol.rb
|
|
369
371
|
- lib/snaptrade/models/underlying_symbol_exchange.rb
|
|
370
372
|
- lib/snaptrade/models/underlying_symbol_type.rb
|
|
373
|
+
- lib/snaptrade/models/underlying_tokenized_asset_instrument.rb
|
|
371
374
|
- lib/snaptrade/models/universal_activity.rb
|
|
372
375
|
- lib/snaptrade/models/universal_symbol.rb
|
|
373
376
|
- lib/snaptrade/models/us_exchange.rb
|
|
@@ -607,6 +610,8 @@ files:
|
|
|
607
610
|
- spec/models/tax_lot_spec.rb
|
|
608
611
|
- spec/models/time_in_force_strict_spec.rb
|
|
609
612
|
- spec/models/timeframe_spec.rb
|
|
613
|
+
- spec/models/tokenized_asset_instrument_kind_spec.rb
|
|
614
|
+
- spec/models/tokenized_asset_instrument_spec.rb
|
|
610
615
|
- spec/models/trade_detection_add_subscription_request_spec.rb
|
|
611
616
|
- spec/models/trade_detection_cancel_subscription_request_spec.rb
|
|
612
617
|
- spec/models/trade_detection_cancel_subscription_response_spec.rb
|
|
@@ -623,6 +628,7 @@ files:
|
|
|
623
628
|
- spec/models/underlying_symbol_exchange_spec.rb
|
|
624
629
|
- spec/models/underlying_symbol_spec.rb
|
|
625
630
|
- spec/models/underlying_symbol_type_spec.rb
|
|
631
|
+
- spec/models/underlying_tokenized_asset_instrument_spec.rb
|
|
626
632
|
- spec/models/universal_activity_spec.rb
|
|
627
633
|
- spec/models/universal_symbol_spec.rb
|
|
628
634
|
- spec/models/us_exchange_spec.rb
|
|
@@ -658,260 +664,263 @@ signing_key:
|
|
|
658
664
|
specification_version: 4
|
|
659
665
|
summary: SnapTrade Ruby Gem
|
|
660
666
|
test_files:
|
|
661
|
-
- spec/api/experimental_endpoints_api_spec.rb
|
|
662
|
-
- spec/api/reference_data_api_spec.rb
|
|
663
667
|
- spec/api/api_status_api_spec.rb
|
|
664
668
|
- spec/api/connections_api_spec.rb
|
|
665
669
|
- spec/api/account_information_api_spec.rb
|
|
666
670
|
- spec/api/authentication_api_spec.rb
|
|
671
|
+
- spec/api/experimental_endpoints_api_spec.rb
|
|
667
672
|
- spec/api/trading_api_spec.rb
|
|
673
|
+
- spec/api/reference_data_api_spec.rb
|
|
668
674
|
- spec/api_client_spec.rb
|
|
669
675
|
- spec/configuration_spec.rb
|
|
670
676
|
- spec/getting_started_spec.rb
|
|
671
|
-
- spec/models/
|
|
672
|
-
- spec/models/
|
|
673
|
-
- spec/models/
|
|
674
|
-
- spec/models/
|
|
675
|
-
- spec/models/
|
|
676
|
-
- spec/models/
|
|
677
|
-
- spec/models/
|
|
678
|
-
- spec/models/take_profit_spec.rb
|
|
679
|
-
- spec/models/underlying_symbol_spec.rb
|
|
677
|
+
- spec/models/account_order_record_option_symbol_spec.rb
|
|
678
|
+
- spec/models/option_impact_spec.rb
|
|
679
|
+
- spec/models/manual_trade_form_with_options_spec.rb
|
|
680
|
+
- spec/models/line_of_credit_account_spec.rb
|
|
681
|
+
- spec/models/line_of_credit_account_available_credit_spec.rb
|
|
682
|
+
- spec/models/trade_detection_cancel_subscription_response_spec.rb
|
|
683
|
+
- spec/models/o_auth_webhook_base_spec.rb
|
|
680
684
|
- spec/models/cef_instrument_spec.rb
|
|
685
|
+
- spec/models/us_exchange_spec.rb
|
|
686
|
+
- spec/models/crypto_order_form_spec.rb
|
|
687
|
+
- spec/models/strategy_order_record_status_spec.rb
|
|
688
|
+
- spec/models/connection_account_sync_status_spec.rb
|
|
689
|
+
- spec/models/tokenized_asset_instrument_spec.rb
|
|
690
|
+
- spec/models/investment_account_spec.rb
|
|
691
|
+
- spec/models/account_sync_status_spec.rb
|
|
692
|
+
- spec/models/underlying_symbol_type_spec.rb
|
|
693
|
+
- spec/models/trading_instrument_spec.rb
|
|
694
|
+
- spec/models/option_quote_greeks_spec.rb
|
|
695
|
+
- spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb
|
|
696
|
+
- spec/models/future_option_instrument_kind_spec.rb
|
|
697
|
+
- spec/models/child_brokerage_order_ids_spec.rb
|
|
698
|
+
- spec/models/option_instrument_kind_spec.rb
|
|
699
|
+
- spec/models/options_position_currency_spec.rb
|
|
700
|
+
- spec/models/account_simple_spec.rb
|
|
701
|
+
- spec/models/line_of_credit_account_net_value_spec.rb
|
|
702
|
+
- spec/models/stop_loss_spec.rb
|
|
703
|
+
- spec/models/balance_spec.rb
|
|
704
|
+
- spec/models/crypto_order_preview_spec.rb
|
|
705
|
+
- spec/models/brokerage_authorization_type_read_only_spec.rb
|
|
706
|
+
- spec/models/complex_order_leg_order_role_spec.rb
|
|
681
707
|
- spec/models/type_spec.rb
|
|
682
|
-
- spec/models/
|
|
683
|
-
- spec/models/
|
|
708
|
+
- spec/models/order_type_strict_spec.rb
|
|
709
|
+
- spec/models/account_order_record_quote_currency_spec.rb
|
|
710
|
+
- spec/models/options_symbol_option_type_spec.rb
|
|
711
|
+
- spec/models/account_order_record_status_spec.rb
|
|
712
|
+
- spec/models/strategy_type_spec.rb
|
|
713
|
+
- spec/models/cfd_instrument_spec.rb
|
|
714
|
+
- spec/models/account_balance_total_spec.rb
|
|
715
|
+
- spec/models/cancel_order_response_spec.rb
|
|
716
|
+
- spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
|
|
717
|
+
- spec/models/underlying_cfd_instrument_spec.rb
|
|
718
|
+
- spec/models/tax_lot_spec.rb
|
|
719
|
+
- spec/models/crypto_order_preview_estimated_fee_spec.rb
|
|
720
|
+
- spec/models/option_leg_action_spec.rb
|
|
721
|
+
- spec/models/account_balance_spec.rb
|
|
722
|
+
- spec/models/line_of_credit_account_kind_spec.rb
|
|
723
|
+
- spec/models/line_of_credit_account_sync_status_spec.rb
|
|
724
|
+
- spec/models/notional_value_spec.rb
|
|
725
|
+
- spec/models/all_account_positions_response_data_freshness_spec.rb
|
|
726
|
+
- spec/models/balance_currency_spec.rb
|
|
727
|
+
- spec/models/price_effect_spec.rb
|
|
728
|
+
- spec/models/symbol_currency_spec.rb
|
|
729
|
+
- spec/models/order_updated_response_order_spec.rb
|
|
730
|
+
- spec/models/account_category_spec.rb
|
|
731
|
+
- spec/models/paginated_universal_activity_spec.rb
|
|
684
732
|
- spec/models/all_account_positions_response_spec.rb
|
|
685
|
-
- spec/models/
|
|
686
|
-
- spec/models/
|
|
687
|
-
- spec/models/
|
|
688
|
-
- spec/models/
|
|
689
|
-
- spec/models/
|
|
690
|
-
- spec/models/
|
|
733
|
+
- spec/models/trading_session_spec.rb
|
|
734
|
+
- spec/models/future_option_instrument_spec.rb
|
|
735
|
+
- spec/models/user_i_dand_secret_spec.rb
|
|
736
|
+
- spec/models/crypto_trading_instrument_spec.rb
|
|
737
|
+
- spec/models/recent_orders_response_spec.rb
|
|
738
|
+
- spec/models/deposit_account_spec.rb
|
|
739
|
+
- spec/models/status_spec.rb
|
|
691
740
|
- spec/models/manual_trade_form_bracket_spec.rb
|
|
692
|
-
- spec/models/
|
|
693
|
-
- spec/models/
|
|
694
|
-
- spec/models/session_event_spec.rb
|
|
695
|
-
- spec/models/universal_activity_spec.rb
|
|
696
|
-
- spec/models/option_quote_spec.rb
|
|
697
|
-
- spec/models/position_spec.rb
|
|
698
|
-
- spec/models/order_role_spec.rb
|
|
699
|
-
- spec/models/trade_detection_add_subscription_request_spec.rb
|
|
700
|
-
- spec/models/model403_failed_request_response_spec.rb
|
|
741
|
+
- spec/models/connection_accounts_response_spec.rb
|
|
742
|
+
- spec/models/mleg_price_effect_strict_spec.rb
|
|
701
743
|
- spec/models/mleg_instrument_type_spec.rb
|
|
702
|
-
- spec/models/
|
|
703
|
-
- spec/models/model500_unexpected_exception_response_spec.rb
|
|
704
|
-
- spec/models/instrument_spec.rb
|
|
705
|
-
- spec/models/trading_instrument_type_spec.rb
|
|
706
|
-
- spec/models/crypto_trading_instrument_type_spec.rb
|
|
707
|
-
- spec/models/account_holdings_account_spec.rb
|
|
708
|
-
- spec/models/connection_portal_version_spec.rb
|
|
709
|
-
- spec/models/o_auth_webhook_base_spec.rb
|
|
710
|
-
- spec/models/brokerage_authorization_type_read_only_spec.rb
|
|
711
|
-
- spec/models/brokerage_authorization_disabled_confirmation_spec.rb
|
|
712
|
-
- spec/models/cancel_order_response_spec.rb
|
|
744
|
+
- spec/models/simple_order_form_spec.rb
|
|
713
745
|
- spec/models/deposit_account_sync_status_spec.rb
|
|
714
|
-
- spec/models/
|
|
715
|
-
- spec/models/
|
|
716
|
-
- spec/models/
|
|
717
|
-
- spec/models/
|
|
718
|
-
- spec/models/position_currency_spec.rb
|
|
719
|
-
- spec/models/complex_order_leg_spec.rb
|
|
720
|
-
- spec/models/currency_spec.rb
|
|
721
|
-
- spec/models/brokerage_type_spec.rb
|
|
722
|
-
- spec/models/trade_detection_cancel_subscription_response_spec.rb
|
|
723
|
-
- spec/models/manual_trade_symbol_spec.rb
|
|
724
|
-
- spec/models/account_order_record_status_spec.rb
|
|
725
|
-
- spec/models/strategy_quotes_greek_spec.rb
|
|
726
|
-
- spec/models/connection_account_sync_status_spec.rb
|
|
746
|
+
- spec/models/brokerage_authorization_data_freshness_mode_spec.rb
|
|
747
|
+
- spec/models/holdings_status_spec.rb
|
|
748
|
+
- spec/models/simple_order_form_type_spec.rb
|
|
749
|
+
- spec/models/model402_brokerage_auth_already_disabled_exception_spec.rb
|
|
727
750
|
- spec/models/deposit_account_net_value_spec.rb
|
|
728
|
-
- spec/models/
|
|
729
|
-
- spec/models/
|
|
730
|
-
- spec/models/
|
|
731
|
-
- spec/models/
|
|
732
|
-
- spec/models/authentication_login_snap_trade_user200_response_spec.rb
|
|
733
|
-
- spec/models/account_spec.rb
|
|
734
|
-
- spec/models/line_of_credit_account_net_value_spec.rb
|
|
735
|
-
- spec/models/cash_change_direction_spec.rb
|
|
736
|
-
- spec/models/trade_detection_cancel_subscription_request_spec.rb
|
|
737
|
-
- spec/models/institution_spec.rb
|
|
738
|
-
- spec/models/account_order_record_trailing_stop_spec.rb
|
|
739
|
-
- spec/models/etf_instrument_spec.rb
|
|
740
|
-
- spec/models/connection_account_spec.rb
|
|
751
|
+
- spec/models/mutual_fund_instrument_spec.rb
|
|
752
|
+
- spec/models/account_order_record_quote_universal_symbol_spec.rb
|
|
753
|
+
- spec/models/snaptrade_spec.rb
|
|
754
|
+
- spec/models/performance_custom_spec.rb
|
|
741
755
|
- spec/models/security_type_spec.rb
|
|
742
|
-
- spec/models/encrypted_response_spec.rb
|
|
743
|
-
- spec/models/symbol_spec.rb
|
|
744
|
-
- spec/models/manual_trade_place_time_in_force_strict_spec.rb
|
|
745
|
-
- spec/models/option_instrument_kind_spec.rb
|
|
746
|
-
- spec/models/underlying_option_instrument_spec.rb
|
|
747
|
-
- spec/models/trading_instrument_spec.rb
|
|
748
|
-
- spec/models/account_order_record_v2_spec.rb
|
|
749
|
-
- spec/models/deposit_account_spec.rb
|
|
750
|
-
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
|
751
|
-
- spec/models/us_exchange_spec.rb
|
|
752
|
-
- spec/models/mutual_fund_instrument_kind_spec.rb
|
|
753
|
-
- spec/models/exchange_spec.rb
|
|
754
|
-
- spec/models/mleg_order_response_spec.rb
|
|
755
|
-
- spec/models/stop_loss_spec.rb
|
|
756
|
-
- spec/models/notional_value_spec.rb
|
|
757
|
-
- spec/models/delete_connection_confirmation_spec.rb
|
|
758
|
-
- spec/models/adr_instrument_kind_spec.rb
|
|
759
|
-
- spec/models/figi_instrument_spec.rb
|
|
760
756
|
- spec/models/manual_trade_form_complex_type_spec.rb
|
|
761
|
-
- spec/models/
|
|
762
|
-
- spec/models/
|
|
763
|
-
- spec/models/
|
|
764
|
-
- spec/models/delete_user_response_spec.rb
|
|
765
|
-
- spec/models/rate_of_return_response_spec.rb
|
|
766
|
-
- spec/models/account_position_spec.rb
|
|
767
|
-
- spec/models/model400_failed_request_response_spec.rb
|
|
768
|
-
- spec/models/model503_brokerage_request_response_spec.rb
|
|
769
|
-
- spec/models/account_order_record_status_v2_spec.rb
|
|
770
|
-
- spec/models/crypto_order_preview_estimated_fee_spec.rb
|
|
771
|
-
- spec/models/tax_lot_spec.rb
|
|
757
|
+
- spec/models/model429_too_many_requests_response_spec.rb
|
|
758
|
+
- spec/models/snap_trade_holdings_total_value_spec.rb
|
|
759
|
+
- spec/models/option_leg_spec.rb
|
|
772
760
|
- spec/models/complex_order_response_spec.rb
|
|
773
|
-
- spec/models/
|
|
774
|
-
- spec/models/
|
|
775
|
-
- spec/models/
|
|
776
|
-
- spec/models/
|
|
761
|
+
- spec/models/universal_activity_spec.rb
|
|
762
|
+
- spec/models/trade_detection_subscription_spec.rb
|
|
763
|
+
- spec/models/brokerage_spec.rb
|
|
764
|
+
- spec/models/option_strategy_spec.rb
|
|
765
|
+
- spec/models/model403_failed_request_response_spec.rb
|
|
777
766
|
- spec/models/sub_period_return_rate_spec.rb
|
|
778
|
-
- spec/models/
|
|
779
|
-
- spec/models/
|
|
780
|
-
- spec/models/
|
|
781
|
-
- spec/models/
|
|
767
|
+
- spec/models/other_instrument_kind_spec.rb
|
|
768
|
+
- spec/models/option_strategy_legs_inner_spec.rb
|
|
769
|
+
- spec/models/cef_instrument_kind_spec.rb
|
|
770
|
+
- spec/models/delete_user_response_spec.rb
|
|
771
|
+
- spec/models/trading_instrument_type_spec.rb
|
|
782
772
|
- spec/models/model403_feature_not_enabled_response_spec.rb
|
|
783
|
-
- spec/models/
|
|
784
|
-
- spec/models/
|
|
785
|
-
- spec/models/
|
|
786
|
-
- spec/models/
|
|
787
|
-
- spec/models/
|
|
788
|
-
- spec/models/
|
|
789
|
-
- spec/models/
|
|
773
|
+
- spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb
|
|
774
|
+
- spec/models/institution_spec.rb
|
|
775
|
+
- spec/models/cash_change_direction_spec.rb
|
|
776
|
+
- spec/models/brokerage_authorization_disabled_confirmation_spec.rb
|
|
777
|
+
- spec/models/mutual_fund_instrument_kind_spec.rb
|
|
778
|
+
- spec/models/model500_unexpected_exception_response_spec.rb
|
|
779
|
+
- spec/models/trailing_stop_spec.rb
|
|
780
|
+
- spec/models/universal_symbol_spec.rb
|
|
781
|
+
- spec/models/account_spec.rb
|
|
782
|
+
- spec/models/complex_order_leg_spec.rb
|
|
783
|
+
- spec/models/account_holdings_spec.rb
|
|
784
|
+
- spec/models/model404_failed_request_response_spec.rb
|
|
785
|
+
- spec/models/snap_trade_register_user_request_body_spec.rb
|
|
786
|
+
- spec/models/time_in_force_strict_spec.rb
|
|
787
|
+
- spec/models/manual_trade_impact_spec.rb
|
|
788
|
+
- spec/models/past_value_spec.rb
|
|
790
789
|
- spec/models/options_position_spec.rb
|
|
791
|
-
- spec/models/
|
|
792
|
-
- spec/models/option_type_spec.rb
|
|
793
|
-
- spec/models/balance_spec.rb
|
|
794
|
-
- spec/models/future_option_instrument_kind_spec.rb
|
|
795
|
-
- spec/models/rate_of_return_object_spec.rb
|
|
796
|
-
- spec/models/model429_too_many_requests_response_spec.rb
|
|
797
|
-
- spec/models/symbols_quotes_inner_spec.rb
|
|
798
|
-
- spec/models/child_brokerage_order_ids_spec.rb
|
|
799
|
-
- spec/models/strategy_quotes_spec.rb
|
|
800
|
-
- spec/models/option_strategy_spec.rb
|
|
801
|
-
- spec/models/model401_failed_request_response_spec.rb
|
|
802
|
-
- spec/models/account_sync_status_spec.rb
|
|
803
|
-
- spec/models/account_universal_activity_currency_universal_symbol_spec.rb
|
|
790
|
+
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
|
804
791
|
- spec/models/schema_version_spec.rb
|
|
805
|
-
- spec/models/
|
|
806
|
-
- spec/models/
|
|
807
|
-
- spec/models/
|
|
792
|
+
- spec/models/model501_not_implemented_response_spec.rb
|
|
793
|
+
- spec/models/deposit_account_kind_spec.rb
|
|
794
|
+
- spec/models/underlying_tokenized_asset_instrument_spec.rb
|
|
795
|
+
- spec/models/action_strict_with_options_spec.rb
|
|
796
|
+
- spec/models/adr_instrument_spec.rb
|
|
808
797
|
- spec/models/account_status_spec.rb
|
|
809
|
-
- spec/models/
|
|
810
|
-
- spec/models/
|
|
811
|
-
- spec/models/
|
|
798
|
+
- spec/models/manual_trade_spec.rb
|
|
799
|
+
- spec/models/stock_instrument_figi_instrument_spec.rb
|
|
800
|
+
- spec/models/adr_instrument_kind_spec.rb
|
|
801
|
+
- spec/models/account_holdings_account_spec.rb
|
|
802
|
+
- spec/models/position_spec.rb
|
|
803
|
+
- spec/models/option_instrument_option_type_spec.rb
|
|
804
|
+
- spec/models/trade_detection_cancel_subscription_request_spec.rb
|
|
812
805
|
- spec/models/exchange_rate_pairs_spec.rb
|
|
813
|
-
- spec/models/universal_symbol_spec.rb
|
|
814
|
-
- spec/models/adr_instrument_spec.rb
|
|
815
|
-
- spec/models/cef_instrument_kind_spec.rb
|
|
816
|
-
- spec/models/line_of_credit_account_minimum_payment_amount_spec.rb
|
|
817
|
-
- spec/models/account_orders_v2_response_spec.rb
|
|
818
|
-
- spec/models/etf_instrument_kind_spec.rb
|
|
819
806
|
- spec/models/symbol_query_spec.rb
|
|
820
|
-
- spec/models/
|
|
821
|
-
- spec/models/
|
|
822
|
-
- spec/models/
|
|
823
|
-
- spec/models/
|
|
824
|
-
- spec/models/brokerage_instrument_spec.rb
|
|
825
|
-
- spec/models/options_position_currency_spec.rb
|
|
826
|
-
- spec/models/manual_trade_form_complex_spec.rb
|
|
827
|
-
- spec/models/account_order_record_leg_spec.rb
|
|
828
|
-
- spec/models/validated_trade_body_spec.rb
|
|
829
|
-
- spec/models/mleg_leg_spec.rb
|
|
830
|
-
- spec/models/order_type_strict_spec.rb
|
|
831
|
-
- spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb
|
|
832
|
-
- spec/models/deposit_account_kind_spec.rb
|
|
833
|
-
- spec/models/balance_currency_spec.rb
|
|
834
|
-
- spec/models/encrypted_response_encrypted_message_data_spec.rb
|
|
835
|
-
- spec/models/brokerage_authorization_data_freshness_mode_spec.rb
|
|
836
|
-
- spec/models/line_of_credit_account_kind_spec.rb
|
|
837
|
-
- spec/models/account_balance_total_spec.rb
|
|
838
|
-
- spec/models/manual_trade_replace_form_spec.rb
|
|
839
|
-
- spec/models/account_order_record_v2_order_role_spec.rb
|
|
807
|
+
- spec/models/order_role_spec.rb
|
|
808
|
+
- spec/models/mleg_trade_form_spec.rb
|
|
809
|
+
- spec/models/future_instrument_kind_spec.rb
|
|
810
|
+
- spec/models/complex_order_response_type_spec.rb
|
|
840
811
|
- spec/models/auth_type_spec.rb
|
|
841
|
-
- spec/models/other_instrument_spec.rb
|
|
842
|
-
- spec/models/account_value_history_item_spec.rb
|
|
843
|
-
- spec/models/trailing_stop_spec.rb
|
|
844
812
|
- spec/models/strategy_order_record_spec.rb
|
|
845
|
-
- spec/models/option_chain_inner_spec.rb
|
|
846
|
-
- spec/models/crypto_order_form_time_in_force_spec.rb
|
|
847
|
-
- spec/models/snap_trade_login_user_request_body_spec.rb
|
|
848
|
-
- spec/models/option_impact_spec.rb
|
|
849
|
-
- spec/models/simple_order_form_time_in_force_spec.rb
|
|
850
|
-
- spec/models/manual_trade_impact_spec.rb
|
|
851
|
-
- spec/models/net_dividend_spec.rb
|
|
852
813
|
- spec/models/underlying_symbol_exchange_spec.rb
|
|
814
|
+
- spec/models/account_value_history_item_spec.rb
|
|
815
|
+
- spec/models/dividend_at_date_spec.rb
|
|
816
|
+
- spec/models/account_information_get_user_account_order_detail_request_spec.rb
|
|
817
|
+
- spec/models/etf_instrument_spec.rb
|
|
818
|
+
- spec/models/manual_trade_replace_form_spec.rb
|
|
819
|
+
- spec/models/snap_trade_login_user_request_body_spec.rb
|
|
853
820
|
- spec/models/brokerage_authorization_transactions_sync_confirmation_spec.rb
|
|
854
|
-
- spec/models/
|
|
855
|
-
- spec/models/
|
|
821
|
+
- spec/models/connection_portal_version_spec.rb
|
|
822
|
+
- spec/models/crypto_trading_instrument_type_spec.rb
|
|
856
823
|
- spec/models/position_symbol_spec.rb
|
|
857
|
-
- spec/models/
|
|
858
|
-
- spec/models/
|
|
859
|
-
- spec/models/account_balance_spec.rb
|
|
860
|
-
- spec/models/account_holdings_spec.rb
|
|
861
|
-
- spec/models/cryptocurrency_pair_spec.rb
|
|
862
|
-
- spec/models/order_updated_response_spec.rb
|
|
863
|
-
- spec/models/underlying_symbol_type_spec.rb
|
|
864
|
-
- spec/models/brokerage_authorization_refresh_confirmation_spec.rb
|
|
865
|
-
- spec/models/mleg_order_type_strict_spec.rb
|
|
866
|
-
- spec/models/manual_trade_spec.rb
|
|
824
|
+
- spec/models/model401_failed_request_response_spec.rb
|
|
825
|
+
- spec/models/account_value_history_response_spec.rb
|
|
867
826
|
- spec/models/account_universal_activity_symbol_spec.rb
|
|
868
|
-
- spec/models/snap_trade_register_user_request_body_spec.rb
|
|
869
|
-
- spec/models/action_strict_spec.rb
|
|
870
|
-
- spec/models/trading_session_spec.rb
|
|
871
|
-
- spec/models/strategy_type_spec.rb
|
|
872
|
-
- spec/models/stock_instrument_spec.rb
|
|
873
827
|
- spec/models/model425_failed_request_response_spec.rb
|
|
874
|
-
- spec/models/
|
|
875
|
-
- spec/models/
|
|
876
|
-
- spec/models/
|
|
828
|
+
- spec/models/mleg_order_response_spec.rb
|
|
829
|
+
- spec/models/account_position_spec.rb
|
|
830
|
+
- spec/models/partner_data_spec.rb
|
|
831
|
+
- spec/models/account_universal_activity_currency_spec.rb
|
|
832
|
+
- spec/models/authentication_login_snap_trade_user200_response_spec.rb
|
|
833
|
+
- spec/models/encrypted_response_spec.rb
|
|
834
|
+
- spec/models/instrument_spec.rb
|
|
877
835
|
- spec/models/manual_trade_balance_spec.rb
|
|
878
|
-
- spec/models/
|
|
879
|
-
- spec/models/
|
|
880
|
-
- spec/models/
|
|
881
|
-
- spec/models/
|
|
882
|
-
- spec/models/
|
|
883
|
-
- spec/models/
|
|
884
|
-
- spec/models/
|
|
885
|
-
- spec/models/
|
|
886
|
-
- spec/models/
|
|
836
|
+
- spec/models/brokerage_authorization_spec.rb
|
|
837
|
+
- spec/models/mleg_trading_instrument_spec.rb
|
|
838
|
+
- spec/models/mleg_leg_spec.rb
|
|
839
|
+
- spec/models/stock_instrument_spec.rb
|
|
840
|
+
- spec/models/monthly_dividends_spec.rb
|
|
841
|
+
- spec/models/account_order_record_leg_spec.rb
|
|
842
|
+
- spec/models/option_type_spec.rb
|
|
843
|
+
- spec/models/symbol_spec.rb
|
|
844
|
+
- spec/models/rate_of_return_response_spec.rb
|
|
845
|
+
- spec/models/connection_account_spec.rb
|
|
846
|
+
- spec/models/cryptocurrency_pair_spec.rb
|
|
847
|
+
- spec/models/future_instrument_spec.rb
|
|
848
|
+
- spec/models/account_universal_activity_spec.rb
|
|
849
|
+
- spec/models/brokerage_instrument_spec.rb
|
|
850
|
+
- spec/models/snap_trade_holdings_account_spec.rb
|
|
851
|
+
- spec/models/position_currency_spec.rb
|
|
852
|
+
- spec/models/model400_failed_request_response_spec.rb
|
|
853
|
+
- spec/models/account_universal_activity_currency_universal_symbol_spec.rb
|
|
854
|
+
- spec/models/session_event_type_spec.rb
|
|
855
|
+
- spec/models/brokerage_authorization_refresh_confirmation_spec.rb
|
|
856
|
+
- spec/models/manual_trade_form_notional_value_spec.rb
|
|
857
|
+
- spec/models/trade_detection_add_subscription_request_spec.rb
|
|
887
858
|
- spec/models/investment_account_net_value_spec.rb
|
|
859
|
+
- spec/models/cryptocurrency_pair_quote_spec.rb
|
|
860
|
+
- spec/models/account_orders_v2_response_spec.rb
|
|
861
|
+
- spec/models/account_order_record_trailing_stop_spec.rb
|
|
862
|
+
- spec/models/brokerage_authorization_type_read_only_type_spec.rb
|
|
863
|
+
- spec/models/account_universal_activity_option_symbol_spec.rb
|
|
864
|
+
- spec/models/delete_connection_confirmation_spec.rb
|
|
865
|
+
- spec/models/option_brokerage_symbol_spec.rb
|
|
888
866
|
- spec/models/manual_trade_and_impact_spec.rb
|
|
867
|
+
- spec/models/login_redirect_uri_spec.rb
|
|
868
|
+
- spec/models/account_order_record_v2_order_role_spec.rb
|
|
889
869
|
- spec/models/timeframe_spec.rb
|
|
890
|
-
- spec/models/
|
|
891
|
-
- spec/models/
|
|
892
|
-
- spec/models/
|
|
893
|
-
- spec/models/
|
|
894
|
-
- spec/models/
|
|
895
|
-
- spec/models/
|
|
896
|
-
- spec/models/
|
|
897
|
-
- spec/models/
|
|
898
|
-
- spec/models/
|
|
899
|
-
- spec/models/
|
|
900
|
-
- spec/models/
|
|
901
|
-
- spec/models/
|
|
902
|
-
- spec/models/
|
|
903
|
-
- spec/models/
|
|
870
|
+
- spec/models/manual_trade_place_time_in_force_strict_spec.rb
|
|
871
|
+
- spec/models/option_instrument_spec.rb
|
|
872
|
+
- spec/models/crypto_instrument_kind_spec.rb
|
|
873
|
+
- spec/models/transactions_status_spec.rb
|
|
874
|
+
- spec/models/account_order_record_spec.rb
|
|
875
|
+
- spec/models/strategy_quotes_spec.rb
|
|
876
|
+
- spec/models/order_updated_response_spec.rb
|
|
877
|
+
- spec/models/etf_instrument_kind_spec.rb
|
|
878
|
+
- spec/models/pagination_details_spec.rb
|
|
879
|
+
- spec/models/net_contributions_spec.rb
|
|
880
|
+
- spec/models/option_quote_spec.rb
|
|
881
|
+
- spec/models/strategy_quotes_greek_spec.rb
|
|
882
|
+
- spec/models/other_instrument_spec.rb
|
|
883
|
+
- spec/models/kind_spec.rb
|
|
884
|
+
- spec/models/manual_trade_form_complex_spec.rb
|
|
885
|
+
- spec/models/underlying_symbol_spec.rb
|
|
886
|
+
- spec/models/underlying_option_instrument_spec.rb
|
|
887
|
+
- spec/models/stock_instrument_kind_spec.rb
|
|
888
|
+
- spec/models/connection_type_spec.rb
|
|
889
|
+
- spec/models/exchange_spec.rb
|
|
890
|
+
- spec/models/line_of_credit_account_minimum_payment_amount_spec.rb
|
|
891
|
+
- spec/models/mleg_order_type_strict_spec.rb
|
|
892
|
+
- spec/models/model402_brokerage_auth_disabled_response_spec.rb
|
|
893
|
+
- spec/models/tokenized_asset_instrument_kind_spec.rb
|
|
894
|
+
- spec/models/option_chain_inner_chain_per_root_inner_spec.rb
|
|
895
|
+
- spec/models/currency_spec.rb
|
|
896
|
+
- spec/models/encrypted_response_encrypted_message_data_spec.rb
|
|
897
|
+
- spec/models/model503_brokerage_request_response_spec.rb
|
|
904
898
|
- spec/models/mleg_action_strict_spec.rb
|
|
899
|
+
- spec/models/manual_trade_symbol_spec.rb
|
|
900
|
+
- spec/models/take_profit_spec.rb
|
|
901
|
+
- spec/models/manual_trade_form_spec.rb
|
|
902
|
+
- spec/models/action_strict_spec.rb
|
|
903
|
+
- spec/models/account_order_record_v2_spec.rb
|
|
905
904
|
- spec/models/account_order_record_universal_symbol_spec.rb
|
|
906
|
-
- spec/models/
|
|
907
|
-
- spec/models/
|
|
908
|
-
- spec/models/
|
|
909
|
-
- spec/models/
|
|
910
|
-
- spec/models/
|
|
911
|
-
- spec/models/
|
|
912
|
-
- spec/models/
|
|
913
|
-
- spec/models/
|
|
905
|
+
- spec/models/net_dividend_spec.rb
|
|
906
|
+
- spec/models/figi_instrument_spec.rb
|
|
907
|
+
- spec/models/crypto_order_form_type_spec.rb
|
|
908
|
+
- spec/models/cfd_instrument_kind_spec.rb
|
|
909
|
+
- spec/models/rate_of_return_object_spec.rb
|
|
910
|
+
- spec/models/simple_order_form_time_in_force_spec.rb
|
|
911
|
+
- spec/models/symbol_exchange_spec.rb
|
|
912
|
+
- spec/models/crypto_instrument_spec.rb
|
|
913
|
+
- spec/models/brokerage_instruments_response_spec.rb
|
|
914
|
+
- spec/models/crypto_order_form_time_in_force_spec.rb
|
|
915
|
+
- spec/models/account_order_record_leg_instrument_spec.rb
|
|
916
|
+
- spec/models/account_order_record_status_v2_spec.rb
|
|
917
|
+
- spec/models/options_symbol_spec.rb
|
|
918
|
+
- spec/models/symbols_quotes_inner_spec.rb
|
|
919
|
+
- spec/models/validated_trade_body_spec.rb
|
|
920
|
+
- spec/models/option_chain_inner_spec.rb
|
|
921
|
+
- spec/models/brokerage_type_spec.rb
|
|
922
|
+
- spec/models/session_event_spec.rb
|
|
923
|
+
- spec/regression/fixtures/all_account_positions.json
|
|
914
924
|
- spec/regression/all_account_positions_spec.rb
|
|
915
925
|
- spec/regression/request_signing_spec.rb
|
|
916
|
-
- spec/regression/fixtures/all_account_positions.json
|
|
917
926
|
- spec/spec_helper.rb
|