snaptrade 2.0.118 → 2.0.120
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 +2 -2
- data/README.md +105 -102
- data/lib/snaptrade/api/reference_data_api.rb +8 -8
- data/lib/snaptrade/api/trading_api.rb +212 -214
- data/lib/snaptrade/models/crypto_order_form.rb +321 -0
- data/lib/snaptrade/models/crypto_order_form_time_in_force.rb +39 -0
- data/lib/snaptrade/models/crypto_order_form_type.rb +41 -0
- data/lib/snaptrade/models/{simple_order_preview.rb → crypto_order_preview.rb} +4 -4
- data/lib/snaptrade/models/{simple_order_preview_estimated_fee.rb → crypto_order_preview_estimated_fee.rb} +3 -3
- data/lib/snaptrade/models/crypto_trading_instrument.rb +237 -0
- data/lib/snaptrade/models/crypto_trading_instrument_type.rb +37 -0
- data/lib/snaptrade/models/manual_trade_replace_form.rb +17 -2
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +7 -2
- data/spec/api/reference_data_api_spec.rb +2 -2
- data/spec/api/trading_api_spec.rb +21 -22
- data/spec/models/crypto_order_form_spec.rb +77 -0
- data/spec/models/crypto_order_form_time_in_force_spec.rb +23 -0
- data/spec/models/crypto_order_form_type_spec.rb +23 -0
- data/spec/models/{simple_order_preview_estimated_fee_spec.rb → crypto_order_preview_estimated_fee_spec.rb} +6 -6
- data/spec/models/{simple_order_preview_spec.rb → crypto_order_preview_spec.rb} +6 -6
- data/spec/models/crypto_trading_instrument_spec.rb +35 -0
- data/spec/models/crypto_trading_instrument_type_spec.rb +23 -0
- data/spec/models/manual_trade_replace_form_spec.rb +6 -0
- metadata +23 -8
@@ -0,0 +1,37 @@
|
|
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 CryptoTradingInstrumentType
|
15
|
+
CRYPTOCURRENCY = "CRYPTOCURRENCY".freeze
|
16
|
+
CRYPTOCURRENCY_PAIR = "CRYPTOCURRENCY_PAIR".freeze
|
17
|
+
|
18
|
+
def self.all_vars
|
19
|
+
@all_vars ||= [CRYPTOCURRENCY, CRYPTOCURRENCY_PAIR].freeze
|
20
|
+
end
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def self.build_from_hash(value)
|
26
|
+
new.build_from_hash(value)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
return value if CryptoTradingInstrumentType.all_vars.include?(value)
|
34
|
+
raise "Invalid ENUM value #{value} for class #CryptoTradingInstrumentType"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -11,8 +11,11 @@ require 'date'
|
|
11
11
|
require 'time'
|
12
12
|
|
13
13
|
module SnapTrade
|
14
|
-
# Inputs for
|
14
|
+
# Inputs for replacing an order with the brokerage.
|
15
15
|
class ManualTradeReplaceForm
|
16
|
+
# Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
17
|
+
attr_accessor :brokerage_order_id
|
18
|
+
|
16
19
|
# The action describes the intent or side of a trade. This is either `BUY` or `SELL`.
|
17
20
|
attr_accessor :action
|
18
21
|
|
@@ -36,6 +39,7 @@ module SnapTrade
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
40
|
def self.attribute_map
|
38
41
|
{
|
42
|
+
:'brokerage_order_id' => :'brokerage_order_id',
|
39
43
|
:'action' => :'action',
|
40
44
|
:'order_type' => :'order_type',
|
41
45
|
:'time_in_force' => :'time_in_force',
|
@@ -54,6 +58,7 @@ module SnapTrade
|
|
54
58
|
# Attribute type mapping.
|
55
59
|
def self.openapi_types
|
56
60
|
{
|
61
|
+
:'brokerage_order_id' => :'String',
|
57
62
|
:'action' => :'ActionStrict',
|
58
63
|
:'order_type' => :'OrderTypeStrict',
|
59
64
|
:'time_in_force' => :'TimeInForceStrict',
|
@@ -88,6 +93,10 @@ module SnapTrade
|
|
88
93
|
h[k.to_sym] = v
|
89
94
|
}
|
90
95
|
|
96
|
+
if attributes.key?(:'brokerage_order_id')
|
97
|
+
self.brokerage_order_id = attributes[:'brokerage_order_id']
|
98
|
+
end
|
99
|
+
|
91
100
|
if attributes.key?(:'action')
|
92
101
|
self.action = attributes[:'action']
|
93
102
|
end
|
@@ -121,6 +130,10 @@ module SnapTrade
|
|
121
130
|
# @return Array for valid properties with the reasons
|
122
131
|
def list_invalid_properties
|
123
132
|
invalid_properties = Array.new
|
133
|
+
if @brokerage_order_id.nil?
|
134
|
+
invalid_properties.push('invalid value for "brokerage_order_id", brokerage_order_id cannot be nil.')
|
135
|
+
end
|
136
|
+
|
124
137
|
if @action.nil?
|
125
138
|
invalid_properties.push('invalid value for "action", action cannot be nil.')
|
126
139
|
end
|
@@ -139,6 +152,7 @@ module SnapTrade
|
|
139
152
|
# Check to see if the all the properties in the model are valid
|
140
153
|
# @return true if the model is valid
|
141
154
|
def valid?
|
155
|
+
return false if @brokerage_order_id.nil?
|
142
156
|
return false if @action.nil?
|
143
157
|
return false if @order_type.nil?
|
144
158
|
return false if @time_in_force.nil?
|
@@ -150,6 +164,7 @@ module SnapTrade
|
|
150
164
|
def ==(o)
|
151
165
|
return true if self.equal?(o)
|
152
166
|
self.class == o.class &&
|
167
|
+
brokerage_order_id == o.brokerage_order_id &&
|
153
168
|
action == o.action &&
|
154
169
|
order_type == o.order_type &&
|
155
170
|
time_in_force == o.time_in_force &&
|
@@ -168,7 +183,7 @@ module SnapTrade
|
|
168
183
|
# Calculates hash code according to all attributes.
|
169
184
|
# @return [Integer] Hash code
|
170
185
|
def hash
|
171
|
-
[action, order_type, time_in_force, price, symbol, stop, units].hash
|
186
|
+
[brokerage_order_id, action, order_type, time_in_force, price, symbol, stop, units].hash
|
172
187
|
end
|
173
188
|
|
174
189
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
@@ -55,6 +55,13 @@ require 'snaptrade/models/child_brokerage_order_ids'
|
|
55
55
|
require 'snaptrade/models/connection_portal_version'
|
56
56
|
require 'snaptrade/models/connection_type'
|
57
57
|
require 'snaptrade/models/connections_session_events200_response_inner'
|
58
|
+
require 'snaptrade/models/crypto_order_form'
|
59
|
+
require 'snaptrade/models/crypto_order_form_time_in_force'
|
60
|
+
require 'snaptrade/models/crypto_order_form_type'
|
61
|
+
require 'snaptrade/models/crypto_order_preview'
|
62
|
+
require 'snaptrade/models/crypto_order_preview_estimated_fee'
|
63
|
+
require 'snaptrade/models/crypto_trading_instrument'
|
64
|
+
require 'snaptrade/models/crypto_trading_instrument_type'
|
58
65
|
require 'snaptrade/models/cryptocurrency_pair'
|
59
66
|
require 'snaptrade/models/cryptocurrency_pair_quote'
|
60
67
|
require 'snaptrade/models/currency'
|
@@ -130,8 +137,6 @@ require 'snaptrade/models/session_event_type'
|
|
130
137
|
require 'snaptrade/models/simple_order_form'
|
131
138
|
require 'snaptrade/models/simple_order_form_time_in_force'
|
132
139
|
require 'snaptrade/models/simple_order_form_type'
|
133
|
-
require 'snaptrade/models/simple_order_preview'
|
134
|
-
require 'snaptrade/models/simple_order_preview_estimated_fee'
|
135
140
|
require 'snaptrade/models/snap_trade_holdings_account'
|
136
141
|
require 'snaptrade/models/snap_trade_holdings_total_value'
|
137
142
|
require 'snaptrade/models/snap_trade_login_user_request_body'
|
@@ -109,8 +109,8 @@ describe 'ReferenceDataApi' do
|
|
109
109
|
end
|
110
110
|
|
111
111
|
# unit tests for list_all_brokerage_instruments
|
112
|
-
# Get
|
113
|
-
# Returns a list of all brokerage instruments available for a given brokerage
|
112
|
+
# Get brokerage instruments
|
113
|
+
# Returns a list of all brokerage instruments available for a given brokerage. Not all brokerages support this. The ones that don't will return an empty list.
|
114
114
|
# @param brokerage_id
|
115
115
|
# @param [Hash] opts the optional parameters
|
116
116
|
# @return [BrokerageInstrumentsResponse]
|
@@ -29,7 +29,7 @@ describe 'TradingApi' do
|
|
29
29
|
|
30
30
|
# unit tests for cancel_order
|
31
31
|
# Cancel order
|
32
|
-
# Cancels an order in the specified account.
|
32
|
+
# Cancels an order in the specified account. Accepts order IDs for all asset types.
|
33
33
|
# @param user_id
|
34
34
|
# @param user_secret
|
35
35
|
# @param account_id
|
@@ -44,7 +44,7 @@ describe 'TradingApi' do
|
|
44
44
|
|
45
45
|
# unit tests for cancel_user_account_order
|
46
46
|
# Cancel equity order
|
47
|
-
# Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
47
|
+
# **This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) ** Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
48
48
|
# @param user_id
|
49
49
|
# @param user_secret
|
50
50
|
# @param account_id
|
@@ -117,6 +117,21 @@ describe 'TradingApi' do
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
# unit tests for place_crypto_order
|
121
|
+
# Place crypto order
|
122
|
+
# Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
123
|
+
# @param user_id
|
124
|
+
# @param user_secret
|
125
|
+
# @param account_id
|
126
|
+
# @param crypto_order_form
|
127
|
+
# @param [Hash] opts the optional parameters
|
128
|
+
# @return [OrderUpdatedResponse]
|
129
|
+
describe 'place_crypto_order test' do
|
130
|
+
it 'should work' do
|
131
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
120
135
|
# unit tests for place_force_order
|
121
136
|
# Place equity order
|
122
137
|
# Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It's recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
@@ -161,31 +176,16 @@ describe 'TradingApi' do
|
|
161
176
|
end
|
162
177
|
end
|
163
178
|
|
164
|
-
# unit tests for
|
165
|
-
# Place crypto order
|
166
|
-
# Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
167
|
-
# @param user_id
|
168
|
-
# @param user_secret
|
169
|
-
# @param account_id
|
170
|
-
# @param simple_order_form
|
171
|
-
# @param [Hash] opts the optional parameters
|
172
|
-
# @return [OrderUpdatedResponse]
|
173
|
-
describe 'place_simple_order test' do
|
174
|
-
it 'should work' do
|
175
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
# unit tests for preview_simple_order
|
179
|
+
# unit tests for preview_crypto_order
|
180
180
|
# Preview crypto order
|
181
181
|
# Previews an order using the specified account.
|
182
182
|
# @param user_id
|
183
183
|
# @param user_secret
|
184
184
|
# @param account_id
|
185
|
-
# @param
|
185
|
+
# @param crypto_order_form
|
186
186
|
# @param [Hash] opts the optional parameters
|
187
|
-
# @return [
|
188
|
-
describe '
|
187
|
+
# @return [CryptoOrderPreview]
|
188
|
+
describe 'preview_crypto_order test' do
|
189
189
|
it 'should work' do
|
190
190
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
191
191
|
end
|
@@ -195,7 +195,6 @@ describe 'TradingApi' do
|
|
195
195
|
# Replace equity order
|
196
196
|
# Replaces an existing pending order with a new one. The way this works is brokerage dependent, but usually involves cancelling the existing order and placing a new one. The order's brokerage_order_id may or may not change, be sure to use the one returned in the response going forward. Only supported on some brokerages
|
197
197
|
# @param account_id The ID of the account to execute the trade on.
|
198
|
-
# @param brokerage_order_id The Brokerage Order ID of the order to replace.
|
199
198
|
# @param user_id
|
200
199
|
# @param user_secret
|
201
200
|
# @param manual_trade_replace_form
|
@@ -0,0 +1,77 @@
|
|
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::CryptoOrderForm
|
15
|
+
describe SnapTrade::CryptoOrderForm do
|
16
|
+
let(:instance) { SnapTrade::CryptoOrderForm.new }
|
17
|
+
|
18
|
+
describe 'test an instance of CryptoOrderForm' do
|
19
|
+
it 'should create an instance of CryptoOrderForm' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoOrderForm)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "instrument"' do
|
24
|
+
it 'should work' do
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test attribute "side"' 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 "type"' 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 "time_in_force"' 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 "amount"' 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 "limit_price"' 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 "stop_price"' 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 "post_only"' 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
|
+
describe 'test attribute "expiration_date"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
@@ -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::CryptoOrderFormTimeInForce
|
15
|
+
describe SnapTrade::CryptoOrderFormTimeInForce do
|
16
|
+
let(:instance) { SnapTrade::CryptoOrderFormTimeInForce.new }
|
17
|
+
|
18
|
+
describe 'test an instance of CryptoOrderFormTimeInForce' do
|
19
|
+
it 'should create an instance of CryptoOrderFormTimeInForce' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoOrderFormTimeInForce)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -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::CryptoOrderFormType
|
15
|
+
describe SnapTrade::CryptoOrderFormType do
|
16
|
+
let(:instance) { SnapTrade::CryptoOrderFormType.new }
|
17
|
+
|
18
|
+
describe 'test an instance of CryptoOrderFormType' do
|
19
|
+
it 'should create an instance of CryptoOrderFormType' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoOrderFormType)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -11,13 +11,13 @@ require 'spec_helper'
|
|
11
11
|
require 'json'
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
# Unit tests for SnapTrade::
|
15
|
-
describe SnapTrade::
|
16
|
-
let(:instance) { SnapTrade::
|
14
|
+
# Unit tests for SnapTrade::CryptoOrderPreviewEstimatedFee
|
15
|
+
describe SnapTrade::CryptoOrderPreviewEstimatedFee do
|
16
|
+
let(:instance) { SnapTrade::CryptoOrderPreviewEstimatedFee.new }
|
17
17
|
|
18
|
-
describe 'test an instance of
|
19
|
-
it 'should create an instance of
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::
|
18
|
+
describe 'test an instance of CryptoOrderPreviewEstimatedFee' do
|
19
|
+
it 'should create an instance of CryptoOrderPreviewEstimatedFee' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoOrderPreviewEstimatedFee)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "currency"' do
|
@@ -11,13 +11,13 @@ require 'spec_helper'
|
|
11
11
|
require 'json'
|
12
12
|
require 'date'
|
13
13
|
|
14
|
-
# Unit tests for SnapTrade::
|
15
|
-
describe SnapTrade::
|
16
|
-
let(:instance) { SnapTrade::
|
14
|
+
# Unit tests for SnapTrade::CryptoOrderPreview
|
15
|
+
describe SnapTrade::CryptoOrderPreview do
|
16
|
+
let(:instance) { SnapTrade::CryptoOrderPreview.new }
|
17
17
|
|
18
|
-
describe 'test an instance of
|
19
|
-
it 'should create an instance of
|
20
|
-
expect(instance).to be_instance_of(SnapTrade::
|
18
|
+
describe 'test an instance of CryptoOrderPreview' do
|
19
|
+
it 'should create an instance of CryptoOrderPreview' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoOrderPreview)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "estimated_fee"' do
|
@@ -0,0 +1,35 @@
|
|
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::CryptoTradingInstrument
|
15
|
+
describe SnapTrade::CryptoTradingInstrument do
|
16
|
+
let(:instance) { SnapTrade::CryptoTradingInstrument.new }
|
17
|
+
|
18
|
+
describe 'test an instance of CryptoTradingInstrument' do
|
19
|
+
it 'should create an instance of CryptoTradingInstrument' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoTradingInstrument)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "symbol"' 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 "type"' 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
|
+
end
|
@@ -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::CryptoTradingInstrumentType
|
15
|
+
describe SnapTrade::CryptoTradingInstrumentType do
|
16
|
+
let(:instance) { SnapTrade::CryptoTradingInstrumentType.new }
|
17
|
+
|
18
|
+
describe 'test an instance of CryptoTradingInstrumentType' do
|
19
|
+
it 'should create an instance of CryptoTradingInstrumentType' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoTradingInstrumentType)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -20,6 +20,12 @@ describe SnapTrade::ManualTradeReplaceForm do
|
|
20
20
|
expect(instance).to be_instance_of(SnapTrade::ManualTradeReplaceForm)
|
21
21
|
end
|
22
22
|
end
|
23
|
+
describe 'test attribute "brokerage_order_id"' do
|
24
|
+
it 'should work' do
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
23
29
|
describe 'test attribute "action"' do
|
24
30
|
it 'should work' do
|
25
31
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.120
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -134,6 +134,13 @@ files:
|
|
134
134
|
- lib/snaptrade/models/connection_portal_version.rb
|
135
135
|
- lib/snaptrade/models/connection_type.rb
|
136
136
|
- lib/snaptrade/models/connections_session_events200_response_inner.rb
|
137
|
+
- lib/snaptrade/models/crypto_order_form.rb
|
138
|
+
- lib/snaptrade/models/crypto_order_form_time_in_force.rb
|
139
|
+
- lib/snaptrade/models/crypto_order_form_type.rb
|
140
|
+
- lib/snaptrade/models/crypto_order_preview.rb
|
141
|
+
- lib/snaptrade/models/crypto_order_preview_estimated_fee.rb
|
142
|
+
- lib/snaptrade/models/crypto_trading_instrument.rb
|
143
|
+
- lib/snaptrade/models/crypto_trading_instrument_type.rb
|
137
144
|
- lib/snaptrade/models/cryptocurrency_pair.rb
|
138
145
|
- lib/snaptrade/models/cryptocurrency_pair_quote.rb
|
139
146
|
- lib/snaptrade/models/currency.rb
|
@@ -209,8 +216,6 @@ files:
|
|
209
216
|
- lib/snaptrade/models/simple_order_form.rb
|
210
217
|
- lib/snaptrade/models/simple_order_form_time_in_force.rb
|
211
218
|
- lib/snaptrade/models/simple_order_form_type.rb
|
212
|
-
- lib/snaptrade/models/simple_order_preview.rb
|
213
|
-
- lib/snaptrade/models/simple_order_preview_estimated_fee.rb
|
214
219
|
- lib/snaptrade/models/snap_trade_holdings_account.rb
|
215
220
|
- lib/snaptrade/models/snap_trade_holdings_total_value.rb
|
216
221
|
- lib/snaptrade/models/snap_trade_login_user_request_body.rb
|
@@ -298,6 +303,13 @@ files:
|
|
298
303
|
- spec/models/connection_portal_version_spec.rb
|
299
304
|
- spec/models/connection_type_spec.rb
|
300
305
|
- spec/models/connections_session_events200_response_inner_spec.rb
|
306
|
+
- spec/models/crypto_order_form_spec.rb
|
307
|
+
- spec/models/crypto_order_form_time_in_force_spec.rb
|
308
|
+
- spec/models/crypto_order_form_type_spec.rb
|
309
|
+
- spec/models/crypto_order_preview_estimated_fee_spec.rb
|
310
|
+
- spec/models/crypto_order_preview_spec.rb
|
311
|
+
- spec/models/crypto_trading_instrument_spec.rb
|
312
|
+
- spec/models/crypto_trading_instrument_type_spec.rb
|
301
313
|
- spec/models/cryptocurrency_pair_quote_spec.rb
|
302
314
|
- spec/models/cryptocurrency_pair_spec.rb
|
303
315
|
- spec/models/currency_spec.rb
|
@@ -373,8 +385,6 @@ files:
|
|
373
385
|
- spec/models/simple_order_form_spec.rb
|
374
386
|
- spec/models/simple_order_form_time_in_force_spec.rb
|
375
387
|
- spec/models/simple_order_form_type_spec.rb
|
376
|
-
- spec/models/simple_order_preview_estimated_fee_spec.rb
|
377
|
-
- spec/models/simple_order_preview_spec.rb
|
378
388
|
- spec/models/snap_trade_holdings_account_spec.rb
|
379
389
|
- spec/models/snap_trade_holdings_total_value_spec.rb
|
380
390
|
- spec/models/snap_trade_login_user_request_body_spec.rb
|
@@ -460,12 +470,12 @@ test_files:
|
|
460
470
|
- spec/models/manual_trade_impact_spec.rb
|
461
471
|
- spec/models/manual_trade_form_notional_value_spec.rb
|
462
472
|
- spec/models/symbol_query_spec.rb
|
463
|
-
- spec/models/simple_order_preview_spec.rb
|
464
473
|
- spec/models/simple_order_form_time_in_force_spec.rb
|
465
474
|
- spec/models/simple_order_form_spec.rb
|
466
475
|
- spec/models/account_order_record_universal_symbol_spec.rb
|
467
476
|
- spec/models/brokerage_spec.rb
|
468
477
|
- spec/models/options_symbol_spec.rb
|
478
|
+
- spec/models/crypto_order_form_type_spec.rb
|
469
479
|
- spec/models/monthly_dividends_spec.rb
|
470
480
|
- spec/models/manual_trade_replace_form_spec.rb
|
471
481
|
- spec/models/pagination_details_spec.rb
|
@@ -484,9 +494,9 @@ test_files:
|
|
484
494
|
- spec/models/option_strategy_spec.rb
|
485
495
|
- spec/models/account_order_record_spec.rb
|
486
496
|
- spec/models/strategy_order_record_status_spec.rb
|
487
|
-
- spec/models/simple_order_preview_estimated_fee_spec.rb
|
488
497
|
- spec/models/auth_type_spec.rb
|
489
498
|
- spec/models/mleg_leg_spec.rb
|
499
|
+
- spec/models/crypto_order_form_time_in_force_spec.rb
|
490
500
|
- spec/models/strategy_quotes_greek_spec.rb
|
491
501
|
- spec/models/connections_session_events200_response_inner_spec.rb
|
492
502
|
- spec/models/snap_trade_holdings_total_value_spec.rb
|
@@ -498,13 +508,16 @@ test_files:
|
|
498
508
|
- spec/models/net_dividend_spec.rb
|
499
509
|
- spec/models/universal_symbol_spec.rb
|
500
510
|
- spec/models/model404_failed_request_response_spec.rb
|
511
|
+
- spec/models/crypto_trading_instrument_spec.rb
|
501
512
|
- spec/models/model425_failed_request_response_spec.rb
|
502
513
|
- spec/models/brokerage_instrument_spec.rb
|
503
514
|
- spec/models/validated_trade_body_spec.rb
|
504
515
|
- spec/models/option_brokerage_symbol_spec.rb
|
516
|
+
- spec/models/crypto_order_form_spec.rb
|
505
517
|
- spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb
|
506
518
|
- spec/models/option_strategy_legs_inner_spec.rb
|
507
519
|
- spec/models/position_symbol_spec.rb
|
520
|
+
- spec/models/crypto_order_preview_estimated_fee_spec.rb
|
508
521
|
- spec/models/login_redirect_uri_spec.rb
|
509
522
|
- spec/models/trading_instrument_type_spec.rb
|
510
523
|
- spec/models/exchange_spec.rb
|
@@ -524,6 +537,7 @@ test_files:
|
|
524
537
|
- spec/models/trading_cancel_user_account_order_request_spec.rb
|
525
538
|
- spec/models/currency_spec.rb
|
526
539
|
- spec/models/account_order_record_child_brokerage_order_ids_spec.rb
|
540
|
+
- spec/models/crypto_order_preview_spec.rb
|
527
541
|
- spec/models/universal_activity_spec.rb
|
528
542
|
- spec/models/account_sync_status_spec.rb
|
529
543
|
- spec/models/mleg_trade_form_spec.rb
|
@@ -599,4 +613,5 @@ test_files:
|
|
599
613
|
- spec/models/account_universal_activity_symbol_spec.rb
|
600
614
|
- spec/models/account_holdings_spec.rb
|
601
615
|
- spec/models/cryptocurrency_pair_quote_spec.rb
|
616
|
+
- spec/models/crypto_trading_instrument_type_spec.rb
|
602
617
|
- spec/spec_helper.rb
|