snaptrade 2.0.209 → 2.0.210
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/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/lib/snaptrade/api/account_information_api.rb +4 -4
- data/lib/snaptrade/models/account_position.rb +2 -2
- data/lib/snaptrade/models/cfd_instrument.rb +315 -0
- data/lib/snaptrade/models/cfd_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/instrument.rb +2 -0
- data/lib/snaptrade/models/model501_not_implemented_response.rb +218 -0
- data/lib/snaptrade/models/model503_brokerage_request_response.rb +238 -0
- data/lib/snaptrade/models/underlying_cfd_instrument.rb +63 -0
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +5 -0
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/models/cfd_instrument_kind_spec.rb +23 -0
- data/spec/models/cfd_instrument_spec.rb +71 -0
- data/spec/models/model501_not_implemented_response_spec.rb +29 -0
- data/spec/models/model503_brokerage_request_response_spec.rb +41 -0
- data/spec/models/underlying_cfd_instrument_spec.rb +38 -0
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a43ae165ab0fc248a19c003b269d0b98a4b48d8e28dea5044d119946c1cf11f
|
|
4
|
+
data.tar.gz: 50ff8983c367af245cdfe1bbd65db5158fd6bb74ecec7136b7cfa24bd85a3286
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68521f4050bcd62fa6ec10eb0b86210cb999ffe40d941e304100c44179e436c7b047918ffc07ce279e8d0254f0ddc1987abedd21e999cfe274d215186daf50f2
|
|
7
|
+
data.tar.gz: da9f62f8c80072072a55d0bebaa7c5c5a64d59f114da0ef146af8e6b4f78e10a5ee0b92869b91bd70e70425324a9a718d880e5ff3db5a67e2242ea9e61d5a9e6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.210)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -94,7 +94,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
94
94
|
Add to Gemfile:
|
|
95
95
|
|
|
96
96
|
```ruby
|
|
97
|
-
gem 'snaptrade', '~> 2.0.
|
|
97
|
+
gem 'snaptrade', '~> 2.0.210'
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -259,7 +259,7 @@ p result
|
|
|
259
259
|
|
|
260
260
|
Returns a list of all positions in the specified account.
|
|
261
261
|
|
|
262
|
-
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and
|
|
262
|
+
The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
263
263
|
|
|
264
264
|
`mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
265
265
|
|
|
@@ -286,7 +286,7 @@ module SnapTrade
|
|
|
286
286
|
#
|
|
287
287
|
# Returns a list of all positions in the specified account.
|
|
288
288
|
#
|
|
289
|
-
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and
|
|
289
|
+
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
290
290
|
#
|
|
291
291
|
# `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
292
292
|
#
|
|
@@ -305,7 +305,7 @@ module SnapTrade
|
|
|
305
305
|
#
|
|
306
306
|
# Returns a list of all positions in the specified account.
|
|
307
307
|
#
|
|
308
|
-
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and
|
|
308
|
+
# The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`.
|
|
309
309
|
#
|
|
310
310
|
# `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account.
|
|
311
311
|
#
|
|
@@ -320,7 +320,7 @@ module SnapTrade
|
|
|
320
320
|
end
|
|
321
321
|
|
|
322
322
|
# List all account positions
|
|
323
|
-
# 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, crypto, futures, and
|
|
323
|
+
# 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, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
324
324
|
# @param user_id [String]
|
|
325
325
|
# @param user_secret [String]
|
|
326
326
|
# @param account_id [String]
|
|
@@ -332,7 +332,7 @@ module SnapTrade
|
|
|
332
332
|
end
|
|
333
333
|
|
|
334
334
|
# List all account positions
|
|
335
|
-
# 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, crypto, futures, and
|
|
335
|
+
# 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, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. 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.
|
|
336
336
|
# @param user_id [String]
|
|
337
337
|
# @param user_secret [String]
|
|
338
338
|
# @param account_id [String]
|
|
@@ -18,10 +18,10 @@ module SnapTrade
|
|
|
18
18
|
# The number of units held in the position. Positive numbers indicate long positions and negative numbers indicate short positions.
|
|
19
19
|
attr_accessor :units
|
|
20
20
|
|
|
21
|
-
# Last known market price
|
|
21
|
+
# Last known market price _per share_. The freshness of this price depends on the brokerage. Some brokerages provide real-time prices, while others provide delayed prices. It is recommended that you rely on your own third-party market data provider for most up to date prices.
|
|
22
22
|
attr_accessor :price
|
|
23
23
|
|
|
24
|
-
# Book price or average purchase price for the position.
|
|
24
|
+
# Book price or average purchase price for the position. For options, this is per-contract.
|
|
25
25
|
attr_accessor :cost_basis
|
|
26
26
|
|
|
27
27
|
# ISO-4217 currency code for the position `price` and `cost_basis`.
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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 CFD wrapper instrument metadata for a V2 position.
|
|
15
|
+
class CfdInstrument
|
|
16
|
+
# Type of security instrument.
|
|
17
|
+
attr_accessor :kind
|
|
18
|
+
|
|
19
|
+
# Unique identifier for the canonical CFD instrument wrapper.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# Formatted symbol of the instrument underlying the CFD wrapper.
|
|
23
|
+
attr_accessor :symbol
|
|
24
|
+
|
|
25
|
+
# Raw symbol of the instrument underlying the CFD wrapper.
|
|
26
|
+
attr_accessor :raw_symbol
|
|
27
|
+
|
|
28
|
+
# Human-readable description of the instrument underlying the CFD wrapper.
|
|
29
|
+
attr_accessor :description
|
|
30
|
+
|
|
31
|
+
# ISO-4217 currency code for the instrument underlying the CFD wrapper.
|
|
32
|
+
attr_accessor :currency
|
|
33
|
+
|
|
34
|
+
# Exchange MIC code or exchange code for the instrument underlying the CFD wrapper.
|
|
35
|
+
attr_accessor :exchange
|
|
36
|
+
|
|
37
|
+
attr_accessor :underlying_instrument
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'kind' => :'kind',
|
|
43
|
+
:'id' => :'id',
|
|
44
|
+
:'symbol' => :'symbol',
|
|
45
|
+
:'raw_symbol' => :'raw_symbol',
|
|
46
|
+
:'description' => :'description',
|
|
47
|
+
:'currency' => :'currency',
|
|
48
|
+
:'exchange' => :'exchange',
|
|
49
|
+
:'underlying_instrument' => :'underlying_instrument'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'kind' => :'CfdInstrumentKind',
|
|
62
|
+
:'id' => :'String',
|
|
63
|
+
:'symbol' => :'String',
|
|
64
|
+
:'raw_symbol' => :'String',
|
|
65
|
+
:'description' => :'String',
|
|
66
|
+
:'currency' => :'String',
|
|
67
|
+
:'exchange' => :'String',
|
|
68
|
+
:'underlying_instrument' => :'UnderlyingCfdInstrument'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# List of attributes with nullable: true
|
|
73
|
+
def self.openapi_nullable
|
|
74
|
+
Set.new([
|
|
75
|
+
:'description',
|
|
76
|
+
:'currency',
|
|
77
|
+
:'exchange',
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::CfdInstrument` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::CfdInstrument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'kind')
|
|
97
|
+
self.kind = attributes[:'kind']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'id')
|
|
101
|
+
self.id = attributes[:'id']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'symbol')
|
|
105
|
+
self.symbol = attributes[:'symbol']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'raw_symbol')
|
|
109
|
+
self.raw_symbol = attributes[:'raw_symbol']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'description')
|
|
113
|
+
self.description = attributes[:'description']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'currency')
|
|
117
|
+
self.currency = attributes[:'currency']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'exchange')
|
|
121
|
+
self.exchange = attributes[:'exchange']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'underlying_instrument')
|
|
125
|
+
self.underlying_instrument = attributes[:'underlying_instrument']
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
130
|
+
# @return Array for valid properties with the reasons
|
|
131
|
+
def list_invalid_properties
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
if @kind.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "kind", kind cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if @id.nil?
|
|
138
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if @symbol.nil?
|
|
142
|
+
invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if @raw_symbol.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "raw_symbol", raw_symbol cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @underlying_instrument.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "underlying_instrument", underlying_instrument cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
invalid_properties
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Check to see if the all the properties in the model are valid
|
|
157
|
+
# @return true if the model is valid
|
|
158
|
+
def valid?
|
|
159
|
+
return false if @kind.nil?
|
|
160
|
+
return false if @id.nil?
|
|
161
|
+
return false if @symbol.nil?
|
|
162
|
+
return false if @raw_symbol.nil?
|
|
163
|
+
return false if @underlying_instrument.nil?
|
|
164
|
+
true
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Checks equality by comparing each attribute.
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def ==(o)
|
|
170
|
+
return true if self.equal?(o)
|
|
171
|
+
self.class == o.class &&
|
|
172
|
+
kind == o.kind &&
|
|
173
|
+
id == o.id &&
|
|
174
|
+
symbol == o.symbol &&
|
|
175
|
+
raw_symbol == o.raw_symbol &&
|
|
176
|
+
description == o.description &&
|
|
177
|
+
currency == o.currency &&
|
|
178
|
+
exchange == o.exchange &&
|
|
179
|
+
underlying_instrument == o.underlying_instrument
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# @see the `==` method
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def eql?(o)
|
|
185
|
+
self == o
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Calculates hash code according to all attributes.
|
|
189
|
+
# @return [Integer] Hash code
|
|
190
|
+
def hash
|
|
191
|
+
[kind, id, symbol, raw_symbol, description, currency, exchange, underlying_instrument].hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Builds the object from hash
|
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
196
|
+
# @return [Object] Returns the model itself
|
|
197
|
+
def self.build_from_hash(attributes)
|
|
198
|
+
new.build_from_hash(attributes)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Builds the object from hash
|
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
203
|
+
# @return [Object] Returns the model itself
|
|
204
|
+
def build_from_hash(attributes)
|
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
207
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
208
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
209
|
+
self.send("#{key}=", nil)
|
|
210
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
211
|
+
# check to ensure the input is an array given that the attribute
|
|
212
|
+
# is documented as an array but the input is not
|
|
213
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
214
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
215
|
+
end
|
|
216
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
217
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
self
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Deserializes the data based on type
|
|
225
|
+
# @param string type Data type
|
|
226
|
+
# @param string value Value to be deserialized
|
|
227
|
+
# @return [Object] Deserialized data
|
|
228
|
+
def _deserialize(type, value)
|
|
229
|
+
case type.to_sym
|
|
230
|
+
when :Time
|
|
231
|
+
Time.parse(value)
|
|
232
|
+
when :Date
|
|
233
|
+
Date.parse(value)
|
|
234
|
+
when :String
|
|
235
|
+
value.to_s
|
|
236
|
+
when :Integer
|
|
237
|
+
value.to_i
|
|
238
|
+
when :Float
|
|
239
|
+
value.to_f
|
|
240
|
+
when :Boolean
|
|
241
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
242
|
+
true
|
|
243
|
+
else
|
|
244
|
+
false
|
|
245
|
+
end
|
|
246
|
+
when :Object
|
|
247
|
+
# generic object (usually a Hash), return directly
|
|
248
|
+
value
|
|
249
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
250
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
251
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
252
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
253
|
+
k_type = Regexp.last_match[:k_type]
|
|
254
|
+
v_type = Regexp.last_match[:v_type]
|
|
255
|
+
{}.tap do |hash|
|
|
256
|
+
value.each do |k, v|
|
|
257
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
else # model
|
|
261
|
+
# models (e.g. Pet) or oneOf
|
|
262
|
+
klass = SnapTrade.const_get(type)
|
|
263
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Returns the string representation of the object
|
|
268
|
+
# @return [String] String presentation of the object
|
|
269
|
+
def to_s
|
|
270
|
+
to_hash.to_s
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
274
|
+
# @return [Hash] Returns the object in the form of hash
|
|
275
|
+
def to_body
|
|
276
|
+
to_hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Returns the object in the form of hash
|
|
280
|
+
# @return [Hash] Returns the object in the form of hash
|
|
281
|
+
def to_hash
|
|
282
|
+
hash = {}
|
|
283
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
284
|
+
value = self.send(attr)
|
|
285
|
+
if value.nil?
|
|
286
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
287
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
hash[param] = _to_hash(value)
|
|
291
|
+
end
|
|
292
|
+
hash
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Outputs non-array value in the form of hash
|
|
296
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
297
|
+
# @param [Object] value Any valid value
|
|
298
|
+
# @return [Hash] Returns the value in the form of hash
|
|
299
|
+
def _to_hash(value)
|
|
300
|
+
if value.is_a?(Array)
|
|
301
|
+
value.compact.map { |v| _to_hash(v) }
|
|
302
|
+
elsif value.is_a?(Hash)
|
|
303
|
+
{}.tap do |hash|
|
|
304
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
305
|
+
end
|
|
306
|
+
elsif value.respond_to? :to_hash
|
|
307
|
+
value.to_hash
|
|
308
|
+
else
|
|
309
|
+
value
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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 CfdInstrumentKind
|
|
15
|
+
CFD = "cfd".freeze
|
|
16
|
+
|
|
17
|
+
def self.all_vars
|
|
18
|
+
@all_vars ||= [CFD].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 CfdInstrumentKind.all_vars.include?(value)
|
|
33
|
+
raise "Invalid ENUM value #{value} for class #CfdInstrumentKind"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -19,6 +19,7 @@ module SnapTrade
|
|
|
19
19
|
[
|
|
20
20
|
:'AdrInstrument',
|
|
21
21
|
:'CefInstrument',
|
|
22
|
+
:'CfdInstrument',
|
|
22
23
|
:'CryptoInstrument',
|
|
23
24
|
:'EtfInstrument',
|
|
24
25
|
:'FutureInstrument',
|
|
@@ -39,6 +40,7 @@ module SnapTrade
|
|
|
39
40
|
{
|
|
40
41
|
:'adr' => :'AdrInstrument',
|
|
41
42
|
:'cef' => :'CefInstrument',
|
|
43
|
+
:'cfd' => :'CfdInstrument',
|
|
42
44
|
:'crypto' => :'CryptoInstrument',
|
|
43
45
|
:'etf' => :'EtfInstrument',
|
|
44
46
|
:'future' => :'FutureInstrument',
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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
|
+
# Example for a response where the endpoint is not implemented for the brokerage
|
|
15
|
+
class Model501NotImplementedResponse
|
|
16
|
+
attr_accessor :error
|
|
17
|
+
|
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
19
|
+
def self.attribute_map
|
|
20
|
+
{
|
|
21
|
+
:'error' => :'error'
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Returns all the JSON keys this model knows about
|
|
26
|
+
def self.acceptable_attributes
|
|
27
|
+
attribute_map.values
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Attribute type mapping.
|
|
31
|
+
def self.openapi_types
|
|
32
|
+
{
|
|
33
|
+
:'error' => :'Object'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# List of attributes with nullable: true
|
|
38
|
+
def self.openapi_nullable
|
|
39
|
+
Set.new([
|
|
40
|
+
:'error'
|
|
41
|
+
])
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Initializes the object
|
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
if (!attributes.is_a?(Hash))
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::Model501NotImplementedResponse` initialize method"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::Model501NotImplementedResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
55
|
+
end
|
|
56
|
+
h[k.to_sym] = v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'error')
|
|
60
|
+
self.error = attributes[:'error']
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
65
|
+
# @return Array for valid properties with the reasons
|
|
66
|
+
def list_invalid_properties
|
|
67
|
+
invalid_properties = Array.new
|
|
68
|
+
invalid_properties
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Check to see if the all the properties in the model are valid
|
|
72
|
+
# @return true if the model is valid
|
|
73
|
+
def valid?
|
|
74
|
+
true
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Checks equality by comparing each attribute.
|
|
78
|
+
# @param [Object] Object to be compared
|
|
79
|
+
def ==(o)
|
|
80
|
+
return true if self.equal?(o)
|
|
81
|
+
self.class == o.class &&
|
|
82
|
+
error == o.error
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @see the `==` method
|
|
86
|
+
# @param [Object] Object to be compared
|
|
87
|
+
def eql?(o)
|
|
88
|
+
self == o
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Calculates hash code according to all attributes.
|
|
92
|
+
# @return [Integer] Hash code
|
|
93
|
+
def hash
|
|
94
|
+
[error].hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Builds the object from hash
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
# @return [Object] Returns the model itself
|
|
100
|
+
def self.build_from_hash(attributes)
|
|
101
|
+
new.build_from_hash(attributes)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Builds the object from hash
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
# @return [Object] Returns the model itself
|
|
107
|
+
def build_from_hash(attributes)
|
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
|
109
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
112
|
+
self.send("#{key}=", nil)
|
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
114
|
+
# check to ensure the input is an array given that the attribute
|
|
115
|
+
# is documented as an array but the input is not
|
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
118
|
+
end
|
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Deserializes the data based on type
|
|
128
|
+
# @param string type Data type
|
|
129
|
+
# @param string value Value to be deserialized
|
|
130
|
+
# @return [Object] Deserialized data
|
|
131
|
+
def _deserialize(type, value)
|
|
132
|
+
case type.to_sym
|
|
133
|
+
when :Time
|
|
134
|
+
Time.parse(value)
|
|
135
|
+
when :Date
|
|
136
|
+
Date.parse(value)
|
|
137
|
+
when :String
|
|
138
|
+
value.to_s
|
|
139
|
+
when :Integer
|
|
140
|
+
value.to_i
|
|
141
|
+
when :Float
|
|
142
|
+
value.to_f
|
|
143
|
+
when :Boolean
|
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
145
|
+
true
|
|
146
|
+
else
|
|
147
|
+
false
|
|
148
|
+
end
|
|
149
|
+
when :Object
|
|
150
|
+
# generic object (usually a Hash), return directly
|
|
151
|
+
value
|
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
|
158
|
+
{}.tap do |hash|
|
|
159
|
+
value.each do |k, v|
|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
else # model
|
|
164
|
+
# models (e.g. Pet) or oneOf
|
|
165
|
+
klass = SnapTrade.const_get(type)
|
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Returns the string representation of the object
|
|
171
|
+
# @return [String] String presentation of the object
|
|
172
|
+
def to_s
|
|
173
|
+
to_hash.to_s
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_body
|
|
179
|
+
to_hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
if value.nil?
|
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
hash[param] = _to_hash(value)
|
|
194
|
+
end
|
|
195
|
+
hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Outputs non-array value in the form of hash
|
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
200
|
+
# @param [Object] value Any valid value
|
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
|
202
|
+
def _to_hash(value)
|
|
203
|
+
if value.is_a?(Array)
|
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
|
205
|
+
elsif value.is_a?(Hash)
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
208
|
+
end
|
|
209
|
+
elsif value.respond_to? :to_hash
|
|
210
|
+
value.to_hash
|
|
211
|
+
else
|
|
212
|
+
value
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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
|
+
# Example for a response that failed because of an upstream brokerage API failure
|
|
15
|
+
class Model503BrokerageRequestResponse
|
|
16
|
+
attr_accessor :detail
|
|
17
|
+
|
|
18
|
+
attr_accessor :status_code
|
|
19
|
+
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'detail' => :'detail',
|
|
26
|
+
:'status_code' => :'status_code',
|
|
27
|
+
:'code' => :'code'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
|
32
|
+
def self.acceptable_attributes
|
|
33
|
+
attribute_map.values
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Attribute type mapping.
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'detail' => :'Object',
|
|
40
|
+
:'status_code' => :'Object',
|
|
41
|
+
:'code' => :'Object'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
:'detail',
|
|
49
|
+
:'status_code',
|
|
50
|
+
:'code'
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::Model503BrokerageRequestResponse` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::Model503BrokerageRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
65
|
+
end
|
|
66
|
+
h[k.to_sym] = v
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'detail')
|
|
70
|
+
self.detail = attributes[:'detail']
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'status_code')
|
|
74
|
+
self.status_code = attributes[:'status_code']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'code')
|
|
78
|
+
self.code = attributes[:'code']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
detail == o.detail &&
|
|
101
|
+
status_code == o.status_code &&
|
|
102
|
+
code == o.code
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[detail, status_code, code].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
new.build_from_hash(attributes)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
132
|
+
self.send("#{key}=", nil)
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
137
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
140
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
self
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Deserializes the data based on type
|
|
148
|
+
# @param string type Data type
|
|
149
|
+
# @param string value Value to be deserialized
|
|
150
|
+
# @return [Object] Deserialized data
|
|
151
|
+
def _deserialize(type, value)
|
|
152
|
+
case type.to_sym
|
|
153
|
+
when :Time
|
|
154
|
+
Time.parse(value)
|
|
155
|
+
when :Date
|
|
156
|
+
Date.parse(value)
|
|
157
|
+
when :String
|
|
158
|
+
value.to_s
|
|
159
|
+
when :Integer
|
|
160
|
+
value.to_i
|
|
161
|
+
when :Float
|
|
162
|
+
value.to_f
|
|
163
|
+
when :Boolean
|
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
165
|
+
true
|
|
166
|
+
else
|
|
167
|
+
false
|
|
168
|
+
end
|
|
169
|
+
when :Object
|
|
170
|
+
# generic object (usually a Hash), return directly
|
|
171
|
+
value
|
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
|
178
|
+
{}.tap do |hash|
|
|
179
|
+
value.each do |k, v|
|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
else # model
|
|
184
|
+
# models (e.g. Pet) or oneOf
|
|
185
|
+
klass = SnapTrade.const_get(type)
|
|
186
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the string representation of the object
|
|
191
|
+
# @return [String] String presentation of the object
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_body
|
|
199
|
+
to_hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Outputs non-array value in the form of hash
|
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
220
|
+
# @param [Object] value Any valid value
|
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
|
222
|
+
def _to_hash(value)
|
|
223
|
+
if value.is_a?(Array)
|
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
|
225
|
+
elsif value.is_a?(Hash)
|
|
226
|
+
{}.tap do |hash|
|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
228
|
+
end
|
|
229
|
+
elsif value.respond_to? :to_hash
|
|
230
|
+
value.to_hash
|
|
231
|
+
else
|
|
232
|
+
value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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 underlying instrument referenced by a CFD contract.
|
|
15
|
+
module UnderlyingCfdInstrument
|
|
16
|
+
class << self
|
|
17
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
18
|
+
def openapi_one_of
|
|
19
|
+
[
|
|
20
|
+
:'AdrInstrument',
|
|
21
|
+
:'CefInstrument',
|
|
22
|
+
:'CryptoInstrument',
|
|
23
|
+
:'EtfInstrument',
|
|
24
|
+
:'MutualFundInstrument',
|
|
25
|
+
:'OtherInstrument',
|
|
26
|
+
:'StockInstrument'
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Discriminator's property name (OpenAPI v3)
|
|
31
|
+
def openapi_discriminator_name
|
|
32
|
+
:'kind'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Discriminator's mapping (OpenAPI v3)
|
|
36
|
+
def openapi_discriminator_mapping
|
|
37
|
+
{
|
|
38
|
+
:'adr' => :'AdrInstrument',
|
|
39
|
+
:'cef' => :'CefInstrument',
|
|
40
|
+
:'crypto' => :'CryptoInstrument',
|
|
41
|
+
:'etf' => :'EtfInstrument',
|
|
42
|
+
:'mutualfund' => :'MutualFundInstrument',
|
|
43
|
+
:'other' => :'OtherInstrument',
|
|
44
|
+
:'stock' => :'StockInstrument'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Builds the object
|
|
49
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
50
|
+
# @return [Object] Returns the model or the data itself
|
|
51
|
+
def build(data)
|
|
52
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
53
|
+
return nil if discriminator_value.nil?
|
|
54
|
+
|
|
55
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
|
56
|
+
return nil unless klass
|
|
57
|
+
|
|
58
|
+
SnapTrade.const_get(klass).build_from_hash(data)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
|
@@ -72,6 +72,8 @@ require 'snaptrade/models/cancel_order_response'
|
|
|
72
72
|
require 'snaptrade/models/cash_change_direction'
|
|
73
73
|
require 'snaptrade/models/cef_instrument'
|
|
74
74
|
require 'snaptrade/models/cef_instrument_kind'
|
|
75
|
+
require 'snaptrade/models/cfd_instrument'
|
|
76
|
+
require 'snaptrade/models/cfd_instrument_kind'
|
|
75
77
|
require 'snaptrade/models/child_brokerage_order_ids'
|
|
76
78
|
require 'snaptrade/models/complex_order_leg'
|
|
77
79
|
require 'snaptrade/models/complex_order_leg_order_role'
|
|
@@ -139,6 +141,8 @@ require 'snaptrade/models/model404_failed_request_response'
|
|
|
139
141
|
require 'snaptrade/models/model425_failed_request_response'
|
|
140
142
|
require 'snaptrade/models/model429_too_many_requests_response'
|
|
141
143
|
require 'snaptrade/models/model500_unexpected_exception_response'
|
|
144
|
+
require 'snaptrade/models/model501_not_implemented_response'
|
|
145
|
+
require 'snaptrade/models/model503_brokerage_request_response'
|
|
142
146
|
require 'snaptrade/models/monthly_dividends'
|
|
143
147
|
require 'snaptrade/models/mutual_fund_instrument'
|
|
144
148
|
require 'snaptrade/models/mutual_fund_instrument_kind'
|
|
@@ -221,6 +225,7 @@ require 'snaptrade/models/trailing_stop'
|
|
|
221
225
|
require 'snaptrade/models/transactions_status'
|
|
222
226
|
require 'snaptrade/models/type'
|
|
223
227
|
require 'snaptrade/models/us_exchange'
|
|
228
|
+
require 'snaptrade/models/underlying_cfd_instrument'
|
|
224
229
|
require 'snaptrade/models/underlying_option_instrument'
|
|
225
230
|
require 'snaptrade/models/underlying_symbol'
|
|
226
231
|
require 'snaptrade/models/underlying_symbol_exchange'
|
|
@@ -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, crypto, futures, 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, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. 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
|
|
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::CfdInstrumentKind
|
|
15
|
+
describe SnapTrade::CfdInstrumentKind do
|
|
16
|
+
let(:instance) { SnapTrade::CfdInstrumentKind.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of CfdInstrumentKind' do
|
|
19
|
+
it 'should create an instance of CfdInstrumentKind' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CfdInstrumentKind)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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::CfdInstrument
|
|
15
|
+
describe SnapTrade::CfdInstrument do
|
|
16
|
+
let(:instance) { SnapTrade::CfdInstrument.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of CfdInstrument' do
|
|
19
|
+
it 'should create an instance of CfdInstrument' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CfdInstrument)
|
|
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 "raw_symbol"' 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 "description"' 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
|
+
describe 'test attribute "currency"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe 'test attribute "exchange"' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "underlying_instrument"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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::Model501NotImplementedResponse
|
|
15
|
+
describe SnapTrade::Model501NotImplementedResponse do
|
|
16
|
+
let(:instance) { SnapTrade::Model501NotImplementedResponse.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of Model501NotImplementedResponse' do
|
|
19
|
+
it 'should create an instance of Model501NotImplementedResponse' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::Model501NotImplementedResponse)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "error"' 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
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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::Model503BrokerageRequestResponse
|
|
15
|
+
describe SnapTrade::Model503BrokerageRequestResponse do
|
|
16
|
+
let(:instance) { SnapTrade::Model503BrokerageRequestResponse.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of Model503BrokerageRequestResponse' do
|
|
19
|
+
it 'should create an instance of Model503BrokerageRequestResponse' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::Model503BrokerageRequestResponse)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "detail"' 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 "status_code"' 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 "code"' 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
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SnapTrade
|
|
3
|
+
|
|
4
|
+
#Connect brokerage accounts to your app for live positions and trading
|
|
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::UnderlyingCfdInstrument
|
|
15
|
+
describe SnapTrade::UnderlyingCfdInstrument 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.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: 2.0.
|
|
4
|
+
version: 2.0.210
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SnapTrade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -152,6 +152,8 @@ files:
|
|
|
152
152
|
- lib/snaptrade/models/cash_change_direction.rb
|
|
153
153
|
- lib/snaptrade/models/cef_instrument.rb
|
|
154
154
|
- lib/snaptrade/models/cef_instrument_kind.rb
|
|
155
|
+
- lib/snaptrade/models/cfd_instrument.rb
|
|
156
|
+
- lib/snaptrade/models/cfd_instrument_kind.rb
|
|
155
157
|
- lib/snaptrade/models/child_brokerage_order_ids.rb
|
|
156
158
|
- lib/snaptrade/models/complex_order_leg.rb
|
|
157
159
|
- lib/snaptrade/models/complex_order_leg_order_role.rb
|
|
@@ -219,6 +221,8 @@ files:
|
|
|
219
221
|
- lib/snaptrade/models/model425_failed_request_response.rb
|
|
220
222
|
- lib/snaptrade/models/model429_too_many_requests_response.rb
|
|
221
223
|
- lib/snaptrade/models/model500_unexpected_exception_response.rb
|
|
224
|
+
- lib/snaptrade/models/model501_not_implemented_response.rb
|
|
225
|
+
- lib/snaptrade/models/model503_brokerage_request_response.rb
|
|
222
226
|
- lib/snaptrade/models/monthly_dividends.rb
|
|
223
227
|
- lib/snaptrade/models/mutual_fund_instrument.rb
|
|
224
228
|
- lib/snaptrade/models/mutual_fund_instrument_kind.rb
|
|
@@ -300,6 +304,7 @@ files:
|
|
|
300
304
|
- lib/snaptrade/models/trailing_stop.rb
|
|
301
305
|
- lib/snaptrade/models/transactions_status.rb
|
|
302
306
|
- lib/snaptrade/models/type.rb
|
|
307
|
+
- lib/snaptrade/models/underlying_cfd_instrument.rb
|
|
303
308
|
- lib/snaptrade/models/underlying_option_instrument.rb
|
|
304
309
|
- lib/snaptrade/models/underlying_symbol.rb
|
|
305
310
|
- lib/snaptrade/models/underlying_symbol_exchange.rb
|
|
@@ -379,6 +384,8 @@ files:
|
|
|
379
384
|
- spec/models/cash_change_direction_spec.rb
|
|
380
385
|
- spec/models/cef_instrument_kind_spec.rb
|
|
381
386
|
- spec/models/cef_instrument_spec.rb
|
|
387
|
+
- spec/models/cfd_instrument_kind_spec.rb
|
|
388
|
+
- spec/models/cfd_instrument_spec.rb
|
|
382
389
|
- spec/models/child_brokerage_order_ids_spec.rb
|
|
383
390
|
- spec/models/complex_order_leg_order_role_spec.rb
|
|
384
391
|
- spec/models/complex_order_leg_spec.rb
|
|
@@ -446,6 +453,8 @@ files:
|
|
|
446
453
|
- spec/models/model425_failed_request_response_spec.rb
|
|
447
454
|
- spec/models/model429_too_many_requests_response_spec.rb
|
|
448
455
|
- spec/models/model500_unexpected_exception_response_spec.rb
|
|
456
|
+
- spec/models/model501_not_implemented_response_spec.rb
|
|
457
|
+
- spec/models/model503_brokerage_request_response_spec.rb
|
|
449
458
|
- spec/models/monthly_dividends_spec.rb
|
|
450
459
|
- spec/models/mutual_fund_instrument_kind_spec.rb
|
|
451
460
|
- spec/models/mutual_fund_instrument_spec.rb
|
|
@@ -527,6 +536,7 @@ files:
|
|
|
527
536
|
- spec/models/trailing_stop_spec.rb
|
|
528
537
|
- spec/models/transactions_status_spec.rb
|
|
529
538
|
- spec/models/type_spec.rb
|
|
539
|
+
- spec/models/underlying_cfd_instrument_spec.rb
|
|
530
540
|
- spec/models/underlying_option_instrument_spec.rb
|
|
531
541
|
- spec/models/underlying_symbol_exchange_spec.rb
|
|
532
542
|
- spec/models/underlying_symbol_spec.rb
|
|
@@ -591,6 +601,7 @@ test_files:
|
|
|
591
601
|
- spec/models/trading_session_spec.rb
|
|
592
602
|
- spec/models/option_type_spec.rb
|
|
593
603
|
- spec/models/past_value_spec.rb
|
|
604
|
+
- spec/models/model501_not_implemented_response_spec.rb
|
|
594
605
|
- spec/models/complex_order_leg_spec.rb
|
|
595
606
|
- spec/models/crypto_order_preview_spec.rb
|
|
596
607
|
- spec/models/monthly_dividends_spec.rb
|
|
@@ -647,11 +658,13 @@ test_files:
|
|
|
647
658
|
- spec/models/symbols_quotes_inner_spec.rb
|
|
648
659
|
- spec/models/manual_trade_and_impact_spec.rb
|
|
649
660
|
- spec/models/simple_order_form_time_in_force_spec.rb
|
|
661
|
+
- spec/models/cfd_instrument_kind_spec.rb
|
|
650
662
|
- spec/models/brokerage_instruments_response_spec.rb
|
|
651
663
|
- spec/models/dividend_at_date_spec.rb
|
|
652
664
|
- spec/models/status_spec.rb
|
|
653
665
|
- spec/models/option_quote_greeks_spec.rb
|
|
654
666
|
- spec/models/account_order_record_leg_instrument_spec.rb
|
|
667
|
+
- spec/models/model503_brokerage_request_response_spec.rb
|
|
655
668
|
- spec/models/delete_user_response_spec.rb
|
|
656
669
|
- spec/models/model400_failed_request_response_spec.rb
|
|
657
670
|
- spec/models/connections_session_events200_response_inner_spec.rb
|
|
@@ -689,6 +702,7 @@ test_files:
|
|
|
689
702
|
- spec/models/brokerage_type_spec.rb
|
|
690
703
|
- spec/models/crypto_order_form_spec.rb
|
|
691
704
|
- spec/models/account_holdings_account_spec.rb
|
|
705
|
+
- spec/models/underlying_cfd_instrument_spec.rb
|
|
692
706
|
- spec/models/manual_trade_form_spec.rb
|
|
693
707
|
- spec/models/rate_of_return_response_spec.rb
|
|
694
708
|
- spec/models/account_order_record_option_symbol_spec.rb
|
|
@@ -782,6 +796,7 @@ test_files:
|
|
|
782
796
|
- spec/models/model425_failed_request_response_spec.rb
|
|
783
797
|
- spec/models/account_order_record_trailing_stop_spec.rb
|
|
784
798
|
- spec/models/account_orders_v2_response_spec.rb
|
|
799
|
+
- spec/models/cfd_instrument_spec.rb
|
|
785
800
|
- spec/models/future_instrument_spec.rb
|
|
786
801
|
- spec/models/symbol_currency_spec.rb
|
|
787
802
|
- spec/models/model500_unexpected_exception_response_spec.rb
|