snaptrade 2.0.86 → 2.0.88
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 +376 -304
- data/lib/snaptrade/api/trading_api.rb +831 -14
- data/lib/snaptrade/models/cryptocurrency_pair.rb +12 -2
- data/lib/snaptrade/models/{crypto_spot_quote.rb → cryptocurrency_pair_quote.rb} +3 -3
- data/lib/snaptrade/models/manual_trade_form_bracket.rb +13 -19
- data/lib/snaptrade/models/manual_trade_replace_form.rb +285 -0
- data/lib/snaptrade/models/{crypto_spot_order_preview.rb → simple_order_preview.rb} +5 -5
- data/lib/snaptrade/models/{crypto_spot_order_preview_estimated_fee.rb → simple_order_preview_estimated_fee.rb} +3 -3
- data/lib/snaptrade/models/{crypto_spot_order_request_body_time_in_force.rb → simple_order_request_body_time_in_force.rb} +3 -3
- data/lib/snaptrade/models/{trading_crypto_spot_cancel_order_request.rb → trading_instrument.rb} +21 -16
- data/lib/snaptrade/models/trading_instrument_type.rb +38 -0
- data/lib/snaptrade/models/{trading_crypto_spot_place_order_request.rb → trading_place_simple_order_request.rb} +14 -14
- data/lib/snaptrade/models/{trading_crypto_spot_symbols200_response.rb → trading_search_cryptocurrency_pair_instruments200_response.rb} +3 -3
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +9 -10
- data/spec/api/trading_api_spec.rb +93 -0
- data/spec/models/{crypto_spot_quote_spec.rb → cryptocurrency_pair_quote_spec.rb} +6 -6
- data/spec/models/cryptocurrency_pair_spec.rb +6 -0
- data/spec/models/manual_trade_form_bracket_spec.rb +3 -3
- data/spec/models/manual_trade_replace_form_spec.rb +59 -0
- data/spec/models/{crypto_spot_order_preview_estimated_fee_spec.rb → simple_order_preview_estimated_fee_spec.rb} +6 -6
- data/spec/models/{crypto_spot_order_preview_spec.rb → simple_order_preview_spec.rb} +6 -6
- data/spec/models/simple_order_request_body_time_in_force_spec.rb +23 -0
- data/spec/models/trading_instrument_spec.rb +35 -0
- data/spec/models/trading_instrument_type_spec.rb +23 -0
- data/spec/models/{trading_crypto_spot_place_order_request_spec.rb → trading_place_simple_order_request_spec.rb} +7 -7
- data/spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb +29 -0
- metadata +29 -26
- data/lib/snaptrade/api/crypto_spot_trading_api.rb +0 -698
- data/spec/api/crypto_spot_trading_api_spec.rb +0 -107
- data/spec/models/crypto_spot_order_request_body_time_in_force_spec.rb +0 -23
- data/spec/models/trading_crypto_spot_cancel_order_request_spec.rb +0 -29
- data/spec/models/trading_crypto_spot_symbols200_response_spec.rb +0 -29
@@ -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 'date'
|
11
|
+
require 'time'
|
12
|
+
|
13
|
+
module SnapTrade
|
14
|
+
class TradingInstrumentType
|
15
|
+
EQUITY = "EQUITY".freeze
|
16
|
+
CRYPTOCURRENCY = "CRYPTOCURRENCY".freeze
|
17
|
+
CRYPTOCURRENCY_PAIR = "CRYPTOCURRENCY_PAIR".freeze
|
18
|
+
|
19
|
+
def self.all_vars
|
20
|
+
@all_vars ||= [EQUITY, CRYPTOCURRENCY, CRYPTOCURRENCY_PAIR].freeze
|
21
|
+
end
|
22
|
+
|
23
|
+
# Builds the enum from string
|
24
|
+
# @param [String] The enum value in the form of the string
|
25
|
+
# @return [String] The enum value
|
26
|
+
def self.build_from_hash(value)
|
27
|
+
new.build_from_hash(value)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Builds the enum from string
|
31
|
+
# @param [String] The enum value in the form of the string
|
32
|
+
# @return [String] The enum value
|
33
|
+
def build_from_hash(value)
|
34
|
+
return value if TradingInstrumentType.all_vars.include?(value)
|
35
|
+
raise "Invalid ENUM value #{value} for class #TradingInstrumentType"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -11,8 +11,8 @@ require 'date'
|
|
11
11
|
require 'time'
|
12
12
|
|
13
13
|
module SnapTrade
|
14
|
-
class
|
15
|
-
attr_accessor :
|
14
|
+
class TradingPlaceSimpleOrderRequest
|
15
|
+
attr_accessor :instrument
|
16
16
|
|
17
17
|
# The action describes the intent or side of a trade. This is either `BUY` or `SELL`.
|
18
18
|
attr_accessor :side
|
@@ -41,7 +41,7 @@ module SnapTrade
|
|
41
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
42
|
def self.attribute_map
|
43
43
|
{
|
44
|
-
:'
|
44
|
+
:'instrument' => :'instrument',
|
45
45
|
:'side' => :'side',
|
46
46
|
:'type' => :'type',
|
47
47
|
:'time_in_force' => :'time_in_force',
|
@@ -61,10 +61,10 @@ module SnapTrade
|
|
61
61
|
# Attribute type mapping.
|
62
62
|
def self.openapi_types
|
63
63
|
{
|
64
|
-
:'
|
64
|
+
:'instrument' => :'TradingInstrument',
|
65
65
|
:'side' => :'ActionStrict',
|
66
66
|
:'type' => :'Type',
|
67
|
-
:'time_in_force' => :'
|
67
|
+
:'time_in_force' => :'SimpleOrderRequestBodyTimeInForce',
|
68
68
|
:'amount' => :'Float',
|
69
69
|
:'limit_price' => :'Float',
|
70
70
|
:'stop_price' => :'Float',
|
@@ -83,19 +83,19 @@ module SnapTrade
|
|
83
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
84
84
|
def initialize(attributes = {})
|
85
85
|
if (!attributes.is_a?(Hash))
|
86
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::TradingPlaceSimpleOrderRequest` initialize method"
|
87
87
|
end
|
88
88
|
|
89
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
90
90
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
91
91
|
if (!self.class.attribute_map.key?(k.to_sym))
|
92
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::TradingPlaceSimpleOrderRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
93
93
|
end
|
94
94
|
h[k.to_sym] = v
|
95
95
|
}
|
96
96
|
|
97
|
-
if attributes.key?(:'
|
98
|
-
self.
|
97
|
+
if attributes.key?(:'instrument')
|
98
|
+
self.instrument = attributes[:'instrument']
|
99
99
|
end
|
100
100
|
|
101
101
|
if attributes.key?(:'side')
|
@@ -135,8 +135,8 @@ module SnapTrade
|
|
135
135
|
# @return Array for valid properties with the reasons
|
136
136
|
def list_invalid_properties
|
137
137
|
invalid_properties = Array.new
|
138
|
-
if @
|
139
|
-
invalid_properties.push('invalid value for "
|
138
|
+
if @instrument.nil?
|
139
|
+
invalid_properties.push('invalid value for "instrument", instrument cannot be nil.')
|
140
140
|
end
|
141
141
|
|
142
142
|
if @side.nil?
|
@@ -161,7 +161,7 @@ module SnapTrade
|
|
161
161
|
# Check to see if the all the properties in the model are valid
|
162
162
|
# @return true if the model is valid
|
163
163
|
def valid?
|
164
|
-
return false if @
|
164
|
+
return false if @instrument.nil?
|
165
165
|
return false if @side.nil?
|
166
166
|
return false if @type.nil?
|
167
167
|
return false if @time_in_force.nil?
|
@@ -174,7 +174,7 @@ module SnapTrade
|
|
174
174
|
def ==(o)
|
175
175
|
return true if self.equal?(o)
|
176
176
|
self.class == o.class &&
|
177
|
-
|
177
|
+
instrument == o.instrument &&
|
178
178
|
side == o.side &&
|
179
179
|
type == o.type &&
|
180
180
|
time_in_force == o.time_in_force &&
|
@@ -194,7 +194,7 @@ module SnapTrade
|
|
194
194
|
# Calculates hash code according to all attributes.
|
195
195
|
# @return [Integer] Hash code
|
196
196
|
def hash
|
197
|
-
[
|
197
|
+
[instrument, side, type, time_in_force, amount, limit_price, stop_price, post_only, expiration_date].hash
|
198
198
|
end
|
199
199
|
|
200
200
|
# Builds the object from hash
|
@@ -12,7 +12,7 @@ require 'time'
|
|
12
12
|
|
13
13
|
module SnapTrade
|
14
14
|
# The symbols
|
15
|
-
class
|
15
|
+
class TradingSearchCryptocurrencyPairInstruments200Response
|
16
16
|
attr_accessor :items
|
17
17
|
|
18
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -44,13 +44,13 @@ module SnapTrade
|
|
44
44
|
# @param [Hash] attributes Model attributes in the form of hash
|
45
45
|
def initialize(attributes = {})
|
46
46
|
if (!attributes.is_a?(Hash))
|
47
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::TradingSearchCryptocurrencyPairInstruments200Response` initialize method"
|
48
48
|
end
|
49
49
|
|
50
50
|
# check to see if the attribute exists and convert string to symbol for hash key
|
51
51
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
52
|
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::TradingSearchCryptocurrencyPairInstruments200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
54
|
end
|
55
55
|
h[k.to_sym] = v
|
56
56
|
}
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
@@ -52,11 +52,8 @@ require 'snaptrade/models/child_brokerage_order_ids'
|
|
52
52
|
require 'snaptrade/models/connection_portal_version'
|
53
53
|
require 'snaptrade/models/connection_type'
|
54
54
|
require 'snaptrade/models/connections_session_events200_response_inner'
|
55
|
-
require 'snaptrade/models/crypto_spot_order_preview'
|
56
|
-
require 'snaptrade/models/crypto_spot_order_preview_estimated_fee'
|
57
|
-
require 'snaptrade/models/crypto_spot_order_request_body_time_in_force'
|
58
|
-
require 'snaptrade/models/crypto_spot_quote'
|
59
55
|
require 'snaptrade/models/cryptocurrency_pair'
|
56
|
+
require 'snaptrade/models/cryptocurrency_pair_quote'
|
60
57
|
require 'snaptrade/models/currency'
|
61
58
|
require 'snaptrade/models/delete_user_response'
|
62
59
|
require 'snaptrade/models/dividend_at_date'
|
@@ -75,6 +72,7 @@ require 'snaptrade/models/manual_trade_form_bracket'
|
|
75
72
|
require 'snaptrade/models/manual_trade_form_notional_value'
|
76
73
|
require 'snaptrade/models/manual_trade_form_with_options'
|
77
74
|
require 'snaptrade/models/manual_trade_impact'
|
75
|
+
require 'snaptrade/models/manual_trade_replace_form'
|
78
76
|
require 'snaptrade/models/manual_trade_symbol'
|
79
77
|
require 'snaptrade/models/model400_failed_request_response'
|
80
78
|
require 'snaptrade/models/model401_failed_request_response'
|
@@ -118,6 +116,9 @@ require 'snaptrade/models/recent_orders_response'
|
|
118
116
|
require 'snaptrade/models/security_type'
|
119
117
|
require 'snaptrade/models/session_event'
|
120
118
|
require 'snaptrade/models/session_event_type'
|
119
|
+
require 'snaptrade/models/simple_order_preview'
|
120
|
+
require 'snaptrade/models/simple_order_preview_estimated_fee'
|
121
|
+
require 'snaptrade/models/simple_order_request_body_time_in_force'
|
121
122
|
require 'snaptrade/models/snap_trade_holdings_account'
|
122
123
|
require 'snaptrade/models/snap_trade_holdings_total_value'
|
123
124
|
require 'snaptrade/models/snap_trade_login_user_request_body'
|
@@ -140,9 +141,10 @@ require 'snaptrade/models/take_profit'
|
|
140
141
|
require 'snaptrade/models/time_in_force_strict'
|
141
142
|
require 'snaptrade/models/timeframe'
|
142
143
|
require 'snaptrade/models/trading_cancel_user_account_order_request'
|
143
|
-
require 'snaptrade/models/
|
144
|
-
require 'snaptrade/models/
|
145
|
-
require 'snaptrade/models/
|
144
|
+
require 'snaptrade/models/trading_instrument'
|
145
|
+
require 'snaptrade/models/trading_instrument_type'
|
146
|
+
require 'snaptrade/models/trading_place_simple_order_request'
|
147
|
+
require 'snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response'
|
146
148
|
require 'snaptrade/models/transactions_status'
|
147
149
|
require 'snaptrade/models/type'
|
148
150
|
require 'snaptrade/models/us_exchange'
|
@@ -159,7 +161,6 @@ require 'snaptrade/api/account_information_api'
|
|
159
161
|
require 'snaptrade/api/api_status_api'
|
160
162
|
require 'snaptrade/api/authentication_api'
|
161
163
|
require 'snaptrade/api/connections_api'
|
162
|
-
require 'snaptrade/api/crypto_spot_trading_api'
|
163
164
|
require 'snaptrade/api/options_api'
|
164
165
|
require 'snaptrade/api/reference_data_api'
|
165
166
|
require 'snaptrade/api/trading_api'
|
@@ -233,7 +234,6 @@ module SnapTrade
|
|
233
234
|
attr_reader :api_status
|
234
235
|
attr_reader :authentication
|
235
236
|
attr_reader :connections
|
236
|
-
attr_reader :crypto_spot_trading
|
237
237
|
attr_reader :options
|
238
238
|
attr_reader :reference_data
|
239
239
|
attr_reader :trading
|
@@ -245,7 +245,6 @@ module SnapTrade
|
|
245
245
|
@api_status = SnapTrade::APIStatusApi.new(@api_client)
|
246
246
|
@authentication = SnapTrade::AuthenticationApi.new(@api_client)
|
247
247
|
@connections = SnapTrade::ConnectionsApi.new(@api_client)
|
248
|
-
@crypto_spot_trading = SnapTrade::CryptoSpotTradingApi.new(@api_client)
|
249
248
|
@options = SnapTrade::OptionsApi.new(@api_client)
|
250
249
|
@reference_data = SnapTrade::ReferenceDataApi.new(@api_client)
|
251
250
|
@trading = SnapTrade::TradingApi.new(@api_client)
|
@@ -27,6 +27,21 @@ describe 'TradingApi' do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
# unit tests for cancel_order
|
31
|
+
# Cancel an order.
|
32
|
+
# Cancels an order in the specified account.
|
33
|
+
# @param user_id
|
34
|
+
# @param user_secret
|
35
|
+
# @param account_id
|
36
|
+
# @param brokerage_order_id
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [OrderUpdatedResponse]
|
39
|
+
describe 'cancel_order test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
30
45
|
# unit tests for cancel_user_account_order
|
31
46
|
# Cancel order
|
32
47
|
# Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
@@ -42,6 +57,21 @@ describe 'TradingApi' do
|
|
42
57
|
end
|
43
58
|
end
|
44
59
|
|
60
|
+
# unit tests for get_cryptocurrency_pair_quote
|
61
|
+
# Get cryptocurrency pair quote
|
62
|
+
# Gets a quote for the specified account.
|
63
|
+
# @param user_id
|
64
|
+
# @param user_secret
|
65
|
+
# @param account_id
|
66
|
+
# @param instrument_symbol
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @return [CryptocurrencyPairQuote]
|
69
|
+
describe 'get_cryptocurrency_pair_quote test' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
45
75
|
# unit tests for get_order_impact
|
46
76
|
# Check order impact
|
47
77
|
# Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
@@ -75,6 +105,7 @@ describe 'TradingApi' do
|
|
75
105
|
# unit tests for place_bracket_order
|
76
106
|
# Place a Bracket Order
|
77
107
|
# Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages
|
108
|
+
# @param account_id The ID of the account to execute the trade on.
|
78
109
|
# @param user_id
|
79
110
|
# @param user_secret
|
80
111
|
# @param manual_trade_form_bracket
|
@@ -115,4 +146,66 @@ describe 'TradingApi' do
|
|
115
146
|
end
|
116
147
|
end
|
117
148
|
|
149
|
+
# unit tests for place_simple_order
|
150
|
+
# Place order
|
151
|
+
# 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.
|
152
|
+
# @param user_id
|
153
|
+
# @param user_secret
|
154
|
+
# @param account_id
|
155
|
+
# @param trading_place_simple_order_request
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [OrderUpdatedResponse]
|
158
|
+
describe 'place_simple_order test' do
|
159
|
+
it 'should work' do
|
160
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# unit tests for preview_simple_order
|
165
|
+
# Preview order
|
166
|
+
# Previews an order using the specified account.
|
167
|
+
# @param user_id
|
168
|
+
# @param user_secret
|
169
|
+
# @param account_id
|
170
|
+
# @param trading_place_simple_order_request
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [SimpleOrderPreview]
|
173
|
+
describe 'preview_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 replace_order
|
180
|
+
# Replaces an order with a new one
|
181
|
+
# 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
|
182
|
+
# @param account_id The ID of the account to execute the trade on.
|
183
|
+
# @param brokerage_order_id The Brokerage Order ID of the order to replace.
|
184
|
+
# @param user_id
|
185
|
+
# @param user_secret
|
186
|
+
# @param manual_trade_replace_form
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @return [AccountOrderRecord]
|
189
|
+
describe 'replace_order test' do
|
190
|
+
it 'should work' do
|
191
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# unit tests for search_cryptocurrency_pair_instruments
|
196
|
+
# Search cryptocurrency pairs instruments
|
197
|
+
# Searches cryptocurrency pairs instruments accessible to the specified account.
|
198
|
+
# @param user_id
|
199
|
+
# @param user_secret
|
200
|
+
# @param account_id
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @option opts [String] :base
|
203
|
+
# @option opts [String] :quote
|
204
|
+
# @return [TradingSearchCryptocurrencyPairInstruments200Response]
|
205
|
+
describe 'search_cryptocurrency_pair_instruments test' do
|
206
|
+
it 'should work' do
|
207
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
118
211
|
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::CryptocurrencyPairQuote
|
15
|
+
describe SnapTrade::CryptocurrencyPairQuote do
|
16
|
+
let(:instance) { SnapTrade::CryptocurrencyPairQuote.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 CryptocurrencyPairQuote' do
|
19
|
+
it 'should create an instance of CryptocurrencyPairQuote' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptocurrencyPairQuote)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "bid"' do
|
@@ -20,6 +20,12 @@ describe SnapTrade::CryptocurrencyPair do
|
|
20
20
|
expect(instance).to be_instance_of(SnapTrade::CryptocurrencyPair)
|
21
21
|
end
|
22
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
|
+
|
23
29
|
describe 'test attribute "base"' do
|
24
30
|
it 'should work' do
|
25
31
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -20,19 +20,19 @@ describe SnapTrade::ManualTradeFormBracket do
|
|
20
20
|
expect(instance).to be_instance_of(SnapTrade::ManualTradeFormBracket)
|
21
21
|
end
|
22
22
|
end
|
23
|
-
describe 'test attribute "
|
23
|
+
describe 'test attribute "action"' do
|
24
24
|
it 'should work' do
|
25
25
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
describe 'test attribute "
|
29
|
+
describe 'test attribute "symbol"' do
|
30
30
|
it 'should work' do
|
31
31
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "instrument"' do
|
36
36
|
it 'should work' do
|
37
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
38
|
end
|
@@ -0,0 +1,59 @@
|
|
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::ManualTradeReplaceForm
|
15
|
+
describe SnapTrade::ManualTradeReplaceForm do
|
16
|
+
let(:instance) { SnapTrade::ManualTradeReplaceForm.new }
|
17
|
+
|
18
|
+
describe 'test an instance of ManualTradeReplaceForm' do
|
19
|
+
it 'should create an instance of ManualTradeReplaceForm' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::ManualTradeReplaceForm)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "action"' 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 "order_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
|
+
describe 'test attribute "time_in_force"' 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 "price"' 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 "stop"' 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 "units"' 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
|
+
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::SimpleOrderPreviewEstimatedFee
|
15
|
+
describe SnapTrade::SimpleOrderPreviewEstimatedFee do
|
16
|
+
let(:instance) { SnapTrade::SimpleOrderPreviewEstimatedFee.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 SimpleOrderPreviewEstimatedFee' do
|
19
|
+
it 'should create an instance of SimpleOrderPreviewEstimatedFee' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::SimpleOrderPreviewEstimatedFee)
|
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::SimpleOrderPreview
|
15
|
+
describe SnapTrade::SimpleOrderPreview do
|
16
|
+
let(:instance) { SnapTrade::SimpleOrderPreview.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 SimpleOrderPreview' do
|
19
|
+
it 'should create an instance of SimpleOrderPreview' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::SimpleOrderPreview)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
describe 'test attribute "estimated_fee"' do
|
@@ -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::SimpleOrderRequestBodyTimeInForce
|
15
|
+
describe SnapTrade::SimpleOrderRequestBodyTimeInForce do
|
16
|
+
let(:instance) { SnapTrade::SimpleOrderRequestBodyTimeInForce.new }
|
17
|
+
|
18
|
+
describe 'test an instance of SimpleOrderRequestBodyTimeInForce' do
|
19
|
+
it 'should create an instance of SimpleOrderRequestBodyTimeInForce' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::SimpleOrderRequestBodyTimeInForce)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -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::TradingInstrument
|
15
|
+
describe SnapTrade::TradingInstrument do
|
16
|
+
let(:instance) { SnapTrade::TradingInstrument.new }
|
17
|
+
|
18
|
+
describe 'test an instance of TradingInstrument' do
|
19
|
+
it 'should create an instance of TradingInstrument' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::TradingInstrument)
|
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::TradingInstrumentType
|
15
|
+
describe SnapTrade::TradingInstrumentType do
|
16
|
+
let(:instance) { SnapTrade::TradingInstrumentType.new }
|
17
|
+
|
18
|
+
describe 'test an instance of TradingInstrumentType' do
|
19
|
+
it 'should create an instance of TradingInstrumentType' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::TradingInstrumentType)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -11,16 +11,16 @@ 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::TradingPlaceSimpleOrderRequest
|
15
|
+
describe SnapTrade::TradingPlaceSimpleOrderRequest do
|
16
|
+
let(:instance) { SnapTrade::TradingPlaceSimpleOrderRequest.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 TradingPlaceSimpleOrderRequest' do
|
19
|
+
it 'should create an instance of TradingPlaceSimpleOrderRequest' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::TradingPlaceSimpleOrderRequest)
|
21
21
|
end
|
22
22
|
end
|
23
|
-
describe 'test attribute "
|
23
|
+
describe 'test attribute "instrument"' do
|
24
24
|
it 'should work' do
|
25
25
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
26
26
|
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::TradingSearchCryptocurrencyPairInstruments200Response
|
15
|
+
describe SnapTrade::TradingSearchCryptocurrencyPairInstruments200Response do
|
16
|
+
let(:instance) { SnapTrade::TradingSearchCryptocurrencyPairInstruments200Response.new }
|
17
|
+
|
18
|
+
describe 'test an instance of TradingSearchCryptocurrencyPairInstruments200Response' do
|
19
|
+
it 'should create an instance of TradingSearchCryptocurrencyPairInstruments200Response' do
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::TradingSearchCryptocurrencyPairInstruments200Response)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
describe 'test attribute "items"' 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
|