snaptrade 2.0.184 → 2.0.186
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 +126 -2
- data/lib/snaptrade/api/experimental_endpoints_api.rb +141 -0
- data/lib/snaptrade/api/trading_api.rb +142 -0
- data/lib/snaptrade/models/account_order_record_option_symbol.rb +1 -1
- data/lib/snaptrade/models/account_order_record_quote_universal_symbol.rb +1 -1
- data/lib/snaptrade/models/account_order_record_universal_symbol.rb +1 -1
- data/lib/snaptrade/models/account_position.rb +288 -0
- data/lib/snaptrade/models/account_universal_activity_option_symbol.rb +1 -1
- data/lib/snaptrade/models/account_universal_activity_symbol.rb +1 -1
- data/lib/snaptrade/models/all_account_positions_response.rb +262 -0
- data/lib/snaptrade/models/complex_order_leg.rb +319 -0
- data/lib/snaptrade/models/complex_order_response.rb +229 -0
- data/lib/snaptrade/models/complex_order_response_type.rb +38 -0
- data/lib/snaptrade/models/crypto_instrument.rb +311 -0
- data/lib/snaptrade/models/crypto_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/etf_instrument.rb +311 -0
- data/lib/snaptrade/models/etf_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/future_instrument.rb +326 -0
- data/lib/snaptrade/models/future_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/instrument.rb +61 -0
- data/lib/snaptrade/models/kind.rb +36 -0
- data/lib/snaptrade/models/manual_trade_form_complex.rb +251 -0
- data/lib/snaptrade/models/manual_trade_form_complex_type.rb +38 -0
- data/lib/snaptrade/models/option_instrument.rb +322 -0
- data/lib/snaptrade/models/option_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/options_symbol.rb +1 -1
- data/lib/snaptrade/models/options_symbol_option_type.rb +37 -0
- data/lib/snaptrade/models/order_role.rb +38 -0
- data/lib/snaptrade/models/other_instrument.rb +311 -0
- data/lib/snaptrade/models/other_instrument_kind.rb +36 -0
- data/lib/snaptrade/models/stock_instrument.rb +311 -0
- data/lib/snaptrade/models/{symbol_figi_instrument.rb → stock_instrument_figi_instrument.rb} +3 -3
- data/lib/snaptrade/models/symbol.rb +1 -1
- data/lib/snaptrade/models/underlying_option_instrument.rb +57 -0
- data/lib/snaptrade/models/underlying_symbol.rb +1 -1
- data/lib/snaptrade/models/universal_symbol.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +24 -1
- data/spec/api/experimental_endpoints_api_spec.rb +16 -0
- data/spec/api/trading_api_spec.rb +15 -0
- data/spec/models/account_position_spec.rb +65 -0
- data/spec/models/all_account_positions_response_spec.rb +47 -0
- data/spec/models/complex_order_leg_spec.rb +71 -0
- data/spec/models/complex_order_response_spec.rb +35 -0
- data/spec/models/complex_order_response_type_spec.rb +23 -0
- data/spec/models/crypto_instrument_kind_spec.rb +23 -0
- data/spec/models/crypto_instrument_spec.rb +71 -0
- data/spec/models/etf_instrument_kind_spec.rb +23 -0
- data/spec/models/etf_instrument_spec.rb +71 -0
- data/spec/models/future_instrument_kind_spec.rb +23 -0
- data/spec/models/future_instrument_spec.rb +77 -0
- data/spec/models/instrument_spec.rb +38 -0
- data/spec/models/kind_spec.rb +23 -0
- data/spec/models/manual_trade_form_complex_spec.rb +41 -0
- data/spec/models/manual_trade_form_complex_type_spec.rb +23 -0
- data/spec/models/option_instrument_kind_spec.rb +23 -0
- data/spec/models/option_instrument_spec.rb +71 -0
- data/spec/models/options_symbol_option_type_spec.rb +23 -0
- data/spec/models/order_role_spec.rb +23 -0
- data/spec/models/other_instrument_kind_spec.rb +23 -0
- data/spec/models/other_instrument_spec.rb +71 -0
- data/spec/models/{symbol_figi_instrument_spec.rb → stock_instrument_figi_instrument_spec.rb} +6 -6
- data/spec/models/stock_instrument_spec.rb +71 -0
- data/spec/models/underlying_option_instrument_spec.rb +38 -0
- metadata +231 -162
|
@@ -0,0 +1,57 @@
|
|
|
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 for an option.
|
|
15
|
+
module UnderlyingOptionInstrument
|
|
16
|
+
class << self
|
|
17
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
18
|
+
def openapi_one_of
|
|
19
|
+
[
|
|
20
|
+
:'CryptoInstrument',
|
|
21
|
+
:'EtfInstrument',
|
|
22
|
+
:'OtherInstrument',
|
|
23
|
+
:'StockInstrument'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Discriminator's property name (OpenAPI v3)
|
|
28
|
+
def openapi_discriminator_name
|
|
29
|
+
:'kind'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Discriminator's mapping (OpenAPI v3)
|
|
33
|
+
def openapi_discriminator_mapping
|
|
34
|
+
{
|
|
35
|
+
:'crypto' => :'CryptoInstrument',
|
|
36
|
+
:'etf' => :'EtfInstrument',
|
|
37
|
+
:'other' => :'OtherInstrument',
|
|
38
|
+
:'stock' => :'StockInstrument'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Builds the object
|
|
43
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
44
|
+
# @return [Object] Returns the model or the data itself
|
|
45
|
+
def build(data)
|
|
46
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
47
|
+
return nil if discriminator_value.nil?
|
|
48
|
+
|
|
49
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
|
50
|
+
return nil unless klass
|
|
51
|
+
|
|
52
|
+
SnapTrade.const_get(klass).build_from_hash(data)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
@@ -71,7 +71,7 @@ module SnapTrade
|
|
|
71
71
|
:'exchange' => :'UnderlyingSymbolExchange',
|
|
72
72
|
:'type' => :'UnderlyingSymbolType',
|
|
73
73
|
:'figi_code' => :'String',
|
|
74
|
-
:'figi_instrument' => :'
|
|
74
|
+
:'figi_instrument' => :'StockInstrumentFigiInstrument',
|
|
75
75
|
:'currencies' => :'Array<Currency>'
|
|
76
76
|
}
|
|
77
77
|
end
|
|
@@ -71,7 +71,7 @@ module SnapTrade
|
|
|
71
71
|
:'exchange' => :'SymbolExchange',
|
|
72
72
|
:'type' => :'SecurityType',
|
|
73
73
|
:'figi_code' => :'String',
|
|
74
|
-
:'figi_instrument' => :'
|
|
74
|
+
:'figi_instrument' => :'StockInstrumentFigiInstrument',
|
|
75
75
|
:'currencies' => :'Array<Currency>'
|
|
76
76
|
}
|
|
77
77
|
end
|
data/lib/snaptrade/version.rb
CHANGED
data/lib/snaptrade.rb
CHANGED
|
@@ -36,6 +36,7 @@ require 'snaptrade/models/account_order_record_trailing_stop'
|
|
|
36
36
|
require 'snaptrade/models/account_order_record_universal_symbol'
|
|
37
37
|
require 'snaptrade/models/account_order_record_v2'
|
|
38
38
|
require 'snaptrade/models/account_orders_v2_response'
|
|
39
|
+
require 'snaptrade/models/account_position'
|
|
39
40
|
require 'snaptrade/models/account_simple'
|
|
40
41
|
require 'snaptrade/models/account_status'
|
|
41
42
|
require 'snaptrade/models/account_sync_status'
|
|
@@ -47,6 +48,7 @@ require 'snaptrade/models/account_value_history_item'
|
|
|
47
48
|
require 'snaptrade/models/account_value_history_response'
|
|
48
49
|
require 'snaptrade/models/action_strict'
|
|
49
50
|
require 'snaptrade/models/action_strict_with_options'
|
|
51
|
+
require 'snaptrade/models/all_account_positions_response'
|
|
50
52
|
require 'snaptrade/models/auth_type'
|
|
51
53
|
require 'snaptrade/models/authentication_login_snap_trade_user200_response'
|
|
52
54
|
require 'snaptrade/models/balance'
|
|
@@ -65,9 +67,14 @@ require 'snaptrade/models/brokerage_type'
|
|
|
65
67
|
require 'snaptrade/models/cancel_order_response'
|
|
66
68
|
require 'snaptrade/models/cash_change_direction'
|
|
67
69
|
require 'snaptrade/models/child_brokerage_order_ids'
|
|
70
|
+
require 'snaptrade/models/complex_order_leg'
|
|
71
|
+
require 'snaptrade/models/complex_order_response'
|
|
72
|
+
require 'snaptrade/models/complex_order_response_type'
|
|
68
73
|
require 'snaptrade/models/connection_portal_version'
|
|
69
74
|
require 'snaptrade/models/connection_type'
|
|
70
75
|
require 'snaptrade/models/connections_session_events200_response_inner'
|
|
76
|
+
require 'snaptrade/models/crypto_instrument'
|
|
77
|
+
require 'snaptrade/models/crypto_instrument_kind'
|
|
71
78
|
require 'snaptrade/models/crypto_order_form'
|
|
72
79
|
require 'snaptrade/models/crypto_order_form_time_in_force'
|
|
73
80
|
require 'snaptrade/models/crypto_order_form_type'
|
|
@@ -83,16 +90,24 @@ require 'snaptrade/models/delete_user_response'
|
|
|
83
90
|
require 'snaptrade/models/dividend_at_date'
|
|
84
91
|
require 'snaptrade/models/encrypted_response'
|
|
85
92
|
require 'snaptrade/models/encrypted_response_encrypted_message_data'
|
|
93
|
+
require 'snaptrade/models/etf_instrument'
|
|
94
|
+
require 'snaptrade/models/etf_instrument_kind'
|
|
86
95
|
require 'snaptrade/models/exchange'
|
|
87
96
|
require 'snaptrade/models/exchange_rate_pairs'
|
|
88
97
|
require 'snaptrade/models/figi_instrument'
|
|
98
|
+
require 'snaptrade/models/future_instrument'
|
|
99
|
+
require 'snaptrade/models/future_instrument_kind'
|
|
89
100
|
require 'snaptrade/models/holdings_status'
|
|
101
|
+
require 'snaptrade/models/instrument'
|
|
102
|
+
require 'snaptrade/models/kind'
|
|
90
103
|
require 'snaptrade/models/login_redirect_uri'
|
|
91
104
|
require 'snaptrade/models/manual_trade'
|
|
92
105
|
require 'snaptrade/models/manual_trade_and_impact'
|
|
93
106
|
require 'snaptrade/models/manual_trade_balance'
|
|
94
107
|
require 'snaptrade/models/manual_trade_form'
|
|
95
108
|
require 'snaptrade/models/manual_trade_form_bracket'
|
|
109
|
+
require 'snaptrade/models/manual_trade_form_complex'
|
|
110
|
+
require 'snaptrade/models/manual_trade_form_complex_type'
|
|
96
111
|
require 'snaptrade/models/manual_trade_form_notional_value'
|
|
97
112
|
require 'snaptrade/models/manual_trade_form_with_options'
|
|
98
113
|
require 'snaptrade/models/manual_trade_impact'
|
|
@@ -124,6 +139,8 @@ require 'snaptrade/models/option_chain_inner'
|
|
|
124
139
|
require 'snaptrade/models/option_chain_inner_chain_per_root_inner'
|
|
125
140
|
require 'snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner'
|
|
126
141
|
require 'snaptrade/models/option_impact'
|
|
142
|
+
require 'snaptrade/models/option_instrument'
|
|
143
|
+
require 'snaptrade/models/option_instrument_kind'
|
|
127
144
|
require 'snaptrade/models/option_leg'
|
|
128
145
|
require 'snaptrade/models/option_leg_action'
|
|
129
146
|
require 'snaptrade/models/option_quote'
|
|
@@ -134,9 +151,13 @@ require 'snaptrade/models/option_type'
|
|
|
134
151
|
require 'snaptrade/models/options_position'
|
|
135
152
|
require 'snaptrade/models/options_position_currency'
|
|
136
153
|
require 'snaptrade/models/options_symbol'
|
|
154
|
+
require 'snaptrade/models/options_symbol_option_type'
|
|
155
|
+
require 'snaptrade/models/order_role'
|
|
137
156
|
require 'snaptrade/models/order_type_strict'
|
|
138
157
|
require 'snaptrade/models/order_updated_response'
|
|
139
158
|
require 'snaptrade/models/order_updated_response_order'
|
|
159
|
+
require 'snaptrade/models/other_instrument'
|
|
160
|
+
require 'snaptrade/models/other_instrument_kind'
|
|
140
161
|
require 'snaptrade/models/paginated_universal_activity'
|
|
141
162
|
require 'snaptrade/models/pagination_details'
|
|
142
163
|
require 'snaptrade/models/partner_data'
|
|
@@ -159,6 +180,8 @@ require 'snaptrade/models/snap_trade_holdings_total_value'
|
|
|
159
180
|
require 'snaptrade/models/snap_trade_login_user_request_body'
|
|
160
181
|
require 'snaptrade/models/snap_trade_register_user_request_body'
|
|
161
182
|
require 'snaptrade/models/status'
|
|
183
|
+
require 'snaptrade/models/stock_instrument'
|
|
184
|
+
require 'snaptrade/models/stock_instrument_figi_instrument'
|
|
162
185
|
require 'snaptrade/models/stop_loss'
|
|
163
186
|
require 'snaptrade/models/strategy_order_record'
|
|
164
187
|
require 'snaptrade/models/strategy_order_record_status'
|
|
@@ -169,7 +192,6 @@ require 'snaptrade/models/sub_period_return_rate'
|
|
|
169
192
|
require 'snaptrade/models/symbol'
|
|
170
193
|
require 'snaptrade/models/symbol_currency'
|
|
171
194
|
require 'snaptrade/models/symbol_exchange'
|
|
172
|
-
require 'snaptrade/models/symbol_figi_instrument'
|
|
173
195
|
require 'snaptrade/models/symbol_query'
|
|
174
196
|
require 'snaptrade/models/symbols_quotes_inner'
|
|
175
197
|
require 'snaptrade/models/take_profit'
|
|
@@ -184,6 +206,7 @@ require 'snaptrade/models/trailing_stop'
|
|
|
184
206
|
require 'snaptrade/models/transactions_status'
|
|
185
207
|
require 'snaptrade/models/type'
|
|
186
208
|
require 'snaptrade/models/us_exchange'
|
|
209
|
+
require 'snaptrade/models/underlying_option_instrument'
|
|
187
210
|
require 'snaptrade/models/underlying_symbol'
|
|
188
211
|
require 'snaptrade/models/underlying_symbol_exchange'
|
|
189
212
|
require 'snaptrade/models/underlying_symbol_type'
|
|
@@ -41,6 +41,22 @@ describe 'ExperimentalEndpointsApi' do
|
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# unit tests for get_all_account_positions
|
|
45
|
+
# List all account positions
|
|
46
|
+
# Returns a paginated list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response page, including stocks, ETFs, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. Stock positions may also include `cash_equivalent`, and 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.
|
|
47
|
+
# @param user_id
|
|
48
|
+
# @param user_secret
|
|
49
|
+
# @param account_id
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @option opts [Integer] :page The page number to return. Defaults to 1.
|
|
52
|
+
# @option opts [Integer] :page_size The number of positions to return per page. Defaults to 100 with a maximum of 1000.
|
|
53
|
+
# @return [AllAccountPositionsResponse]
|
|
54
|
+
describe 'get_all_account_positions test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
44
60
|
# unit tests for get_user_account_order_detail_v2
|
|
45
61
|
# Get account order detail (V2)
|
|
46
62
|
# Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
@@ -147,6 +147,21 @@ describe 'TradingApi' do
|
|
|
147
147
|
end
|
|
148
148
|
end
|
|
149
149
|
|
|
150
|
+
# unit tests for place_complex_order
|
|
151
|
+
# Place complex order
|
|
152
|
+
# Places a complex conditional order (OCO, OTO, or OTOCO). Disabled by default — contact support to enable. Only supported on certain brokerages. - **OCO** (One Cancels the Other): Two peer orders; when one fills the other is cancelled. - **OTO** (One Triggers the Other): A trigger order that, when filled, activates a conditional order. - **OTOCO** (One Triggers a One Cancels the Other): A trigger order that, when filled, activates an OCO pair of two peer orders.
|
|
153
|
+
# @param account_id The ID of the account to execute the trade on.
|
|
154
|
+
# @param user_id
|
|
155
|
+
# @param user_secret
|
|
156
|
+
# @param manual_trade_form_complex
|
|
157
|
+
# @param [Hash] opts the optional parameters
|
|
158
|
+
# @return [ComplexOrderResponse]
|
|
159
|
+
describe 'place_complex_order test' do
|
|
160
|
+
it 'should work' do
|
|
161
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
150
165
|
# unit tests for place_crypto_order
|
|
151
166
|
# Place crypto order
|
|
152
167
|
# 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.
|
|
@@ -0,0 +1,65 @@
|
|
|
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::AccountPosition
|
|
15
|
+
describe SnapTrade::AccountPosition do
|
|
16
|
+
let(:instance) { SnapTrade::AccountPosition.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of AccountPosition' do
|
|
19
|
+
it 'should create an instance of AccountPosition' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::AccountPosition)
|
|
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 "units"' 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 "price"' 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 "cost_basis"' 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 "currency"' 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 "cash_equivalent"' 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 "tax_lots"' 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
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
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::AllAccountPositionsResponse
|
|
15
|
+
describe SnapTrade::AllAccountPositionsResponse do
|
|
16
|
+
let(:instance) { SnapTrade::AllAccountPositionsResponse.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of AllAccountPositionsResponse' do
|
|
19
|
+
it 'should create an instance of AllAccountPositionsResponse' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::AllAccountPositionsResponse)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "count"' 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 "_next"' 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 "previous"' 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 "results"' 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
|
+
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::ComplexOrderLeg
|
|
15
|
+
describe SnapTrade::ComplexOrderLeg do
|
|
16
|
+
let(:instance) { SnapTrade::ComplexOrderLeg.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of ComplexOrderLeg' do
|
|
19
|
+
it 'should create an instance of ComplexOrderLeg' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::ComplexOrderLeg)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "order_role"' 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 "action"' 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 "instrument"' 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 "order_type"' 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 "units"' 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 "time_in_force"' 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 "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 "stop"' 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,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::ComplexOrderResponse
|
|
15
|
+
describe SnapTrade::ComplexOrderResponse do
|
|
16
|
+
let(:instance) { SnapTrade::ComplexOrderResponse.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of ComplexOrderResponse' do
|
|
19
|
+
it 'should create an instance of ComplexOrderResponse' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::ComplexOrderResponse)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "type"' 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 "brokerage_group_order_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
|
+
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::ComplexOrderResponseType
|
|
15
|
+
describe SnapTrade::ComplexOrderResponseType do
|
|
16
|
+
let(:instance) { SnapTrade::ComplexOrderResponseType.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of ComplexOrderResponseType' do
|
|
19
|
+
it 'should create an instance of ComplexOrderResponseType' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::ComplexOrderResponseType)
|
|
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::CryptoInstrumentKind
|
|
15
|
+
describe SnapTrade::CryptoInstrumentKind do
|
|
16
|
+
let(:instance) { SnapTrade::CryptoInstrumentKind.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of CryptoInstrumentKind' do
|
|
19
|
+
it 'should create an instance of CryptoInstrumentKind' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoInstrumentKind)
|
|
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::CryptoInstrument
|
|
15
|
+
describe SnapTrade::CryptoInstrument do
|
|
16
|
+
let(:instance) { SnapTrade::CryptoInstrument.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of CryptoInstrument' do
|
|
19
|
+
it 'should create an instance of CryptoInstrument' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::CryptoInstrument)
|
|
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 "figi_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,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::EtfInstrumentKind
|
|
15
|
+
describe SnapTrade::EtfInstrumentKind do
|
|
16
|
+
let(:instance) { SnapTrade::EtfInstrumentKind.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of EtfInstrumentKind' do
|
|
19
|
+
it 'should create an instance of EtfInstrumentKind' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::EtfInstrumentKind)
|
|
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::EtfInstrument
|
|
15
|
+
describe SnapTrade::EtfInstrument do
|
|
16
|
+
let(:instance) { SnapTrade::EtfInstrument.new }
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of EtfInstrument' do
|
|
19
|
+
it 'should create an instance of EtfInstrument' do
|
|
20
|
+
expect(instance).to be_instance_of(SnapTrade::EtfInstrument)
|
|
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 "figi_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
|