snaptrade 2.0.47 → 2.0.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +7 -4
- data/lib/snaptrade/api/authentication_api.rb +2 -2
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +4 -4
- data/lib/snaptrade/models/account_order_record.rb +15 -15
- data/lib/snaptrade/models/account_order_record_universal_symbol.rb +17 -17
- data/lib/snaptrade/models/brokerage.rb +26 -26
- data/lib/snaptrade/models/brokerage_authorization.rb +14 -14
- data/lib/snaptrade/models/manual_trade_symbol.rb +14 -14
- data/lib/snaptrade/models/option_brokerage_symbol.rb +13 -13
- data/lib/snaptrade/models/options_position.rb +15 -15
- data/lib/snaptrade/models/position.rb +16 -16
- data/lib/snaptrade/models/position_symbol.rb +10 -10
- data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +1 -1
- data/lib/snaptrade/models/underlying_symbol.rb +17 -17
- data/lib/snaptrade/models/universal_activity.rb +1 -1
- data/lib/snaptrade/models/universal_symbol.rb +17 -17
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/transactions_and_reporting_api_spec.rb +1 -1
- data/spec/models/account_order_record_spec.rb +6 -6
- data/spec/models/account_order_record_universal_symbol_spec.rb +3 -3
- data/spec/models/brokerage_authorization_spec.rb +6 -6
- data/spec/models/brokerage_spec.rb +8 -8
- data/spec/models/manual_trade_symbol_spec.rb +6 -6
- data/spec/models/option_brokerage_symbol_spec.rb +3 -3
- data/spec/models/options_position_spec.rb +2 -2
- data/spec/models/position_spec.rb +2 -2
- data/spec/models/position_symbol_spec.rb +3 -3
- data/spec/models/underlying_symbol_spec.rb +3 -3
- data/spec/models/universal_symbol_spec.rb +3 -3
- metadata +100 -100
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e08bdf56ca308e63579693544f8fca18d020aea297a4b946f40ae05b606721b
|
4
|
+
data.tar.gz: c3d4df66abe4c7a22dc7386d3a741cc6508d9c7c16b40dfe24e42e5ba3caf7cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab697626d2986f45b77335144f244ed7898c4387b59a57034280ca65cca180d701601fa2e3731dcb2aa3cabf7310ff311ccb20f55cb86579ddbadde4b7845761
|
7
|
+
data.tar.gz: '0595be5c6b3c96c42ddebe85bdc7bd588e2db8212f468ce74c55b88deb09583337621198abd6297c044489f8daffbaf921cc4f097b94f7915f81b177bd5514c6'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snaptrade (2.0.
|
4
|
+
snaptrade (2.0.49)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -44,12 +44,12 @@ GEM
|
|
44
44
|
regexp_parser (2.9.2)
|
45
45
|
reline (0.5.10)
|
46
46
|
io-console (~> 0.5)
|
47
|
-
rexml (3.3.
|
47
|
+
rexml (3.3.9)
|
48
48
|
rspec (3.13.0)
|
49
49
|
rspec-core (~> 3.13.0)
|
50
50
|
rspec-expectations (~> 3.13.0)
|
51
51
|
rspec-mocks (~> 3.13.0)
|
52
|
-
rspec-core (3.13.
|
52
|
+
rspec-core (3.13.2)
|
53
53
|
rspec-support (~> 3.13.0)
|
54
54
|
rspec-expectations (3.13.3)
|
55
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
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
|
-
[![npm](https://img.shields.io/badge/gem-v2.0.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v2.0.49-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.49)
|
10
10
|
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -70,7 +70,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
70
70
|
Add to Gemfile:
|
71
71
|
|
72
72
|
```ruby
|
73
|
-
gem 'snaptrade', '~> 2.0.
|
73
|
+
gem 'snaptrade', '~> 2.0.49'
|
74
74
|
```
|
75
75
|
|
76
76
|
## Getting Started<a id="getting-started"></a>
|
@@ -531,7 +531,8 @@ left empty unless you are reconnecting a disabled connection. See the [guide on
|
|
531
531
|
fixing broken connections](/docs/fix-broken-connections) for more information.
|
532
532
|
|
533
533
|
##### connectionType: [`ConnectionType`](./lib/snaptrade/models/connection_type.rb)<a id="connectiontype-connectiontypelibsnaptrademodelsconnection_typerb"></a>
|
534
|
-
Sets whether the connection should be read-only or trade-enabled.
|
534
|
+
Sets whether the connection should be read-only or trade-enabled. Defaults to
|
535
|
+
read-only if not specified.
|
535
536
|
|
536
537
|
##### connectionPortalVersion: [`ConnectionPortalVersion`](./lib/snaptrade/models/connection_portal_version.rb)<a id="connectionportalversion-connectionportalversionlibsnaptrademodelsconnection_portal_versionrb"></a>
|
537
538
|
Sets the version of the connection portal to render.
|
@@ -1716,7 +1717,9 @@ values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
|
1716
1717
|
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash
|
1717
1718
|
contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment.
|
1718
1719
|
- `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from
|
1719
|
-
the account.
|
1720
|
+
the account. - `OPTIONEXPIRATION` - Option expiration event. -
|
1721
|
+
`OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option
|
1722
|
+
exercise event.
|
1720
1723
|
|
1721
1724
|
#### 🔄 Return<a id="🔄-return"></a>
|
1722
1725
|
|
@@ -192,7 +192,7 @@ module SnapTrade
|
|
192
192
|
# @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
193
193
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
194
194
|
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
|
195
|
-
# @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled.
|
195
|
+
# @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled. Defaults to read-only if not specified.
|
196
196
|
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render.
|
197
197
|
# @param body [SnapTradeLoginUserRequestBody]
|
198
198
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -221,7 +221,7 @@ module SnapTrade
|
|
221
221
|
# @param immediate_redirect [Boolean] When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
222
222
|
# @param custom_redirect [String] URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information.
|
223
223
|
# @param reconnect [String] The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information.
|
224
|
-
# @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled.
|
224
|
+
# @param connection_type [ConnectionType] Sets whether the connection should be read-only or trade-enabled. Defaults to read-only if not specified.
|
225
225
|
# @param connection_portal_version [ConnectionPortalVersion] Sets the version of the connection portal to render.
|
226
226
|
# @param body [SnapTradeLoginUserRequestBody]
|
227
227
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -31,7 +31,7 @@ module SnapTrade
|
|
31
31
|
# @param end_date [Date] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
32
32
|
# @param accounts [String] Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
|
33
33
|
# @param brokerage_authorizations [String] Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
|
34
|
-
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account.
|
34
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event.
|
35
35
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
36
36
|
def get_activities(user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, accounts: SENTINEL, brokerage_authorizations: SENTINEL, type: SENTINEL, extra: {})
|
37
37
|
extra[:start_date] = start_date if start_date != SENTINEL
|
@@ -57,7 +57,7 @@ module SnapTrade
|
|
57
57
|
# @param end_date [Date] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
58
58
|
# @param accounts [String] Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
|
59
59
|
# @param brokerage_authorizations [String] Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
|
60
|
-
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account.
|
60
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event.
|
61
61
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
62
62
|
def get_activities_with_http_info(user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, accounts: SENTINEL, brokerage_authorizations: SENTINEL, type: SENTINEL, extra: {})
|
63
63
|
extra[:start_date] = start_date if start_date != SENTINEL
|
@@ -77,7 +77,7 @@ module SnapTrade
|
|
77
77
|
# @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
78
78
|
# @option opts [String] :accounts Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
|
79
79
|
# @option opts [String] :brokerage_authorizations Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
|
80
|
-
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account.
|
80
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event.
|
81
81
|
# @return [Array<UniversalActivity>]
|
82
82
|
private def get_activities_impl(user_id, user_secret, opts = {})
|
83
83
|
data, _status_code, _headers = get_activities_with_http_info(user_id, user_secret, opts)
|
@@ -93,7 +93,7 @@ module SnapTrade
|
|
93
93
|
# @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
94
94
|
# @option opts [String] :accounts Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter.
|
95
95
|
# @option opts [String] :brokerage_authorizations Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter.
|
96
|
-
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account.
|
96
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event.
|
97
97
|
# @return [Array<(Array<UniversalActivity>, Integer, Hash)>] Array<UniversalActivity> data, response status code and response headers
|
98
98
|
private def get_activities_with_http_info_impl(user_id, user_secret, opts = {})
|
99
99
|
if @api_client.config.debugging
|
@@ -19,9 +19,6 @@ module SnapTrade
|
|
19
19
|
# Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum.
|
20
20
|
attr_accessor :status
|
21
21
|
|
22
|
-
# A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change.
|
23
|
-
attr_accessor :symbol
|
24
|
-
|
25
22
|
attr_accessor :universal_symbol
|
26
23
|
|
27
24
|
attr_accessor :option_symbol
|
@@ -68,12 +65,14 @@ module SnapTrade
|
|
68
65
|
# The time the order expires. This value is not always available from the brokerage.
|
69
66
|
attr_accessor :expiry_date
|
70
67
|
|
68
|
+
# A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change.
|
69
|
+
attr_accessor :symbol
|
70
|
+
|
71
71
|
# Attribute mapping from ruby-style variable name to JSON key.
|
72
72
|
def self.attribute_map
|
73
73
|
{
|
74
74
|
:'brokerage_order_id' => :'brokerage_order_id',
|
75
75
|
:'status' => :'status',
|
76
|
-
:'symbol' => :'symbol',
|
77
76
|
:'universal_symbol' => :'universal_symbol',
|
78
77
|
:'option_symbol' => :'option_symbol',
|
79
78
|
:'action' => :'action',
|
@@ -89,7 +88,8 @@ module SnapTrade
|
|
89
88
|
:'time_placed' => :'time_placed',
|
90
89
|
:'time_updated' => :'time_updated',
|
91
90
|
:'time_executed' => :'time_executed',
|
92
|
-
:'expiry_date' => :'expiry_date'
|
91
|
+
:'expiry_date' => :'expiry_date',
|
92
|
+
:'symbol' => :'symbol'
|
93
93
|
}
|
94
94
|
end
|
95
95
|
|
@@ -103,7 +103,6 @@ module SnapTrade
|
|
103
103
|
{
|
104
104
|
:'brokerage_order_id' => :'String',
|
105
105
|
:'status' => :'AccountOrderRecordStatus',
|
106
|
-
:'symbol' => :'String',
|
107
106
|
:'universal_symbol' => :'AccountOrderRecordUniversalSymbol',
|
108
107
|
:'option_symbol' => :'AccountOrderRecordOptionSymbol',
|
109
108
|
:'action' => :'String',
|
@@ -119,7 +118,8 @@ module SnapTrade
|
|
119
118
|
:'time_placed' => :'Time',
|
120
119
|
:'time_updated' => :'Time',
|
121
120
|
:'time_executed' => :'Time',
|
122
|
-
:'expiry_date' => :'Time'
|
121
|
+
:'expiry_date' => :'Time',
|
122
|
+
:'symbol' => :'String'
|
123
123
|
}
|
124
124
|
end
|
125
125
|
|
@@ -136,7 +136,7 @@ module SnapTrade
|
|
136
136
|
:'order_type',
|
137
137
|
:'time_updated',
|
138
138
|
:'time_executed',
|
139
|
-
:'expiry_date'
|
139
|
+
:'expiry_date',
|
140
140
|
])
|
141
141
|
end
|
142
142
|
|
@@ -163,10 +163,6 @@ module SnapTrade
|
|
163
163
|
self.status = attributes[:'status']
|
164
164
|
end
|
165
165
|
|
166
|
-
if attributes.key?(:'symbol')
|
167
|
-
self.symbol = attributes[:'symbol']
|
168
|
-
end
|
169
|
-
|
170
166
|
if attributes.key?(:'universal_symbol')
|
171
167
|
self.universal_symbol = attributes[:'universal_symbol']
|
172
168
|
end
|
@@ -230,6 +226,10 @@ module SnapTrade
|
|
230
226
|
if attributes.key?(:'expiry_date')
|
231
227
|
self.expiry_date = attributes[:'expiry_date']
|
232
228
|
end
|
229
|
+
|
230
|
+
if attributes.key?(:'symbol')
|
231
|
+
self.symbol = attributes[:'symbol']
|
232
|
+
end
|
233
233
|
end
|
234
234
|
|
235
235
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -252,7 +252,6 @@ module SnapTrade
|
|
252
252
|
self.class == o.class &&
|
253
253
|
brokerage_order_id == o.brokerage_order_id &&
|
254
254
|
status == o.status &&
|
255
|
-
symbol == o.symbol &&
|
256
255
|
universal_symbol == o.universal_symbol &&
|
257
256
|
option_symbol == o.option_symbol &&
|
258
257
|
action == o.action &&
|
@@ -268,7 +267,8 @@ module SnapTrade
|
|
268
267
|
time_placed == o.time_placed &&
|
269
268
|
time_updated == o.time_updated &&
|
270
269
|
time_executed == o.time_executed &&
|
271
|
-
expiry_date == o.expiry_date
|
270
|
+
expiry_date == o.expiry_date &&
|
271
|
+
symbol == o.symbol
|
272
272
|
end
|
273
273
|
|
274
274
|
# @see the `==` method
|
@@ -280,7 +280,7 @@ module SnapTrade
|
|
280
280
|
# Calculates hash code according to all attributes.
|
281
281
|
# @return [Integer] Hash code
|
282
282
|
def hash
|
283
|
-
[brokerage_order_id, status,
|
283
|
+
[brokerage_order_id, status, universal_symbol, option_symbol, action, total_quantity, open_quantity, canceled_quantity, filled_quantity, execution_price, limit_price, stop_price, order_type, time_in_force, time_placed, time_updated, time_executed, expiry_date, symbol].hash
|
284
284
|
end
|
285
285
|
|
286
286
|
# Builds the object from hash
|
@@ -31,14 +31,14 @@ module SnapTrade
|
|
31
31
|
|
32
32
|
attr_accessor :type
|
33
33
|
|
34
|
-
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
35
|
-
attr_accessor :currencies
|
36
|
-
|
37
34
|
# This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property.
|
38
35
|
attr_accessor :figi_code
|
39
36
|
|
40
37
|
attr_accessor :figi_instrument
|
41
38
|
|
39
|
+
# This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
40
|
+
attr_accessor :currencies
|
41
|
+
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
43
|
def self.attribute_map
|
44
44
|
{
|
@@ -49,9 +49,9 @@ module SnapTrade
|
|
49
49
|
:'currency' => :'currency',
|
50
50
|
:'exchange' => :'exchange',
|
51
51
|
:'type' => :'type',
|
52
|
-
:'currencies' => :'currencies',
|
53
52
|
:'figi_code' => :'figi_code',
|
54
|
-
:'figi_instrument' => :'figi_instrument'
|
53
|
+
:'figi_instrument' => :'figi_instrument',
|
54
|
+
:'currencies' => :'currencies'
|
55
55
|
}
|
56
56
|
end
|
57
57
|
|
@@ -70,9 +70,9 @@ module SnapTrade
|
|
70
70
|
:'currency' => :'SymbolCurrency',
|
71
71
|
:'exchange' => :'SymbolExchange',
|
72
72
|
:'type' => :'SecurityType',
|
73
|
-
:'currencies' => :'Array<Currency>',
|
74
73
|
:'figi_code' => :'String',
|
75
|
-
:'figi_instrument' => :'SymbolFigiInstrument'
|
74
|
+
:'figi_instrument' => :'SymbolFigiInstrument',
|
75
|
+
:'currencies' => :'Array<Currency>'
|
76
76
|
}
|
77
77
|
end
|
78
78
|
|
@@ -81,7 +81,7 @@ module SnapTrade
|
|
81
81
|
Set.new([
|
82
82
|
:'description',
|
83
83
|
:'figi_code',
|
84
|
-
:'figi_instrument'
|
84
|
+
:'figi_instrument',
|
85
85
|
])
|
86
86
|
end
|
87
87
|
|
@@ -135,12 +135,6 @@ module SnapTrade
|
|
135
135
|
self.type = attributes[:'type']
|
136
136
|
end
|
137
137
|
|
138
|
-
if attributes.key?(:'currencies')
|
139
|
-
if (value = attributes[:'currencies']).is_a?(Array)
|
140
|
-
self.currencies = value
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
138
|
if attributes.key?(:'figi_code')
|
145
139
|
self.figi_code = attributes[:'figi_code']
|
146
140
|
end
|
@@ -148,6 +142,12 @@ module SnapTrade
|
|
148
142
|
if attributes.key?(:'figi_instrument')
|
149
143
|
self.figi_instrument = attributes[:'figi_instrument']
|
150
144
|
end
|
145
|
+
|
146
|
+
if attributes.key?(:'currencies')
|
147
|
+
if (value = attributes[:'currencies']).is_a?(Array)
|
148
|
+
self.currencies = value
|
149
|
+
end
|
150
|
+
end
|
151
151
|
end
|
152
152
|
|
153
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -205,9 +205,9 @@ module SnapTrade
|
|
205
205
|
currency == o.currency &&
|
206
206
|
exchange == o.exchange &&
|
207
207
|
type == o.type &&
|
208
|
-
currencies == o.currencies &&
|
209
208
|
figi_code == o.figi_code &&
|
210
|
-
figi_instrument == o.figi_instrument
|
209
|
+
figi_instrument == o.figi_instrument &&
|
210
|
+
currencies == o.currencies
|
211
211
|
end
|
212
212
|
|
213
213
|
# @see the `==` method
|
@@ -219,7 +219,7 @@ module SnapTrade
|
|
219
219
|
# Calculates hash code according to all attributes.
|
220
220
|
# @return [Integer] Hash code
|
221
221
|
def hash
|
222
|
-
[id, symbol, raw_symbol, description, currency, exchange, type,
|
222
|
+
[id, symbol, raw_symbol, description, currency, exchange, type, figi_code, figi_instrument, currencies].hash
|
223
223
|
end
|
224
224
|
|
225
225
|
# Builds the object from hash
|
@@ -34,9 +34,6 @@ module SnapTrade
|
|
34
34
|
# URL to the brokerage's logo in square format.
|
35
35
|
attr_accessor :aws_s3_square_logo_url
|
36
36
|
|
37
|
-
# This field is deprecated.
|
38
|
-
attr_accessor :open_url
|
39
|
-
|
40
37
|
# URL to the brokerage's website.
|
41
38
|
attr_accessor :url
|
42
39
|
|
@@ -46,12 +43,12 @@ module SnapTrade
|
|
46
43
|
# Whether the brokerage is currently in maintenance mode. A brokerage in maintenance mode will not be available for new connections.
|
47
44
|
attr_accessor :maintenance_mode
|
48
45
|
|
49
|
-
# This field is deprecated. Please contact us if you have a valid use case for it.
|
50
|
-
attr_accessor :allows_fractional_units
|
51
|
-
|
52
46
|
# Whether the brokerage allows trading through SnapTrade.
|
53
47
|
attr_accessor :allows_trading
|
54
48
|
|
49
|
+
# This field is deprecated. Please contact us if you have a valid use case for it.
|
50
|
+
attr_accessor :allows_fractional_units
|
51
|
+
|
55
52
|
# This field is deprecated. Please contact us if you have a valid use case for it.
|
56
53
|
attr_accessor :has_reporting
|
57
54
|
|
@@ -63,6 +60,9 @@ module SnapTrade
|
|
63
60
|
# This field is deprecated. Please contact us if you have a valid use case for it.
|
64
61
|
attr_accessor :exchanges
|
65
62
|
|
63
|
+
# This field is deprecated.
|
64
|
+
attr_accessor :open_url
|
65
|
+
|
66
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
67
67
|
def self.attribute_map
|
68
68
|
{
|
@@ -73,16 +73,16 @@ module SnapTrade
|
|
73
73
|
:'description' => :'description',
|
74
74
|
:'aws_s3_logo_url' => :'aws_s3_logo_url',
|
75
75
|
:'aws_s3_square_logo_url' => :'aws_s3_square_logo_url',
|
76
|
-
:'open_url' => :'open_url',
|
77
76
|
:'url' => :'url',
|
78
77
|
:'enabled' => :'enabled',
|
79
78
|
:'maintenance_mode' => :'maintenance_mode',
|
80
|
-
:'allows_fractional_units' => :'allows_fractional_units',
|
81
79
|
:'allows_trading' => :'allows_trading',
|
80
|
+
:'allows_fractional_units' => :'allows_fractional_units',
|
82
81
|
:'has_reporting' => :'has_reporting',
|
83
82
|
:'is_real_time_connection' => :'is_real_time_connection',
|
84
83
|
:'brokerage_type' => :'brokerage_type',
|
85
|
-
:'exchanges' => :'exchanges'
|
84
|
+
:'exchanges' => :'exchanges',
|
85
|
+
:'open_url' => :'open_url'
|
86
86
|
}
|
87
87
|
end
|
88
88
|
|
@@ -101,16 +101,16 @@ module SnapTrade
|
|
101
101
|
:'description' => :'String',
|
102
102
|
:'aws_s3_logo_url' => :'String',
|
103
103
|
:'aws_s3_square_logo_url' => :'String',
|
104
|
-
:'open_url' => :'String',
|
105
104
|
:'url' => :'String',
|
106
105
|
:'enabled' => :'Boolean',
|
107
106
|
:'maintenance_mode' => :'Boolean',
|
108
|
-
:'allows_fractional_units' => :'Boolean',
|
109
107
|
:'allows_trading' => :'Boolean',
|
108
|
+
:'allows_fractional_units' => :'Boolean',
|
110
109
|
:'has_reporting' => :'Boolean',
|
111
110
|
:'is_real_time_connection' => :'Boolean',
|
112
111
|
:'brokerage_type' => :'BrokerageType',
|
113
|
-
:'exchanges' => :'Array<Object>'
|
112
|
+
:'exchanges' => :'Array<Object>',
|
113
|
+
:'open_url' => :'String'
|
114
114
|
}
|
115
115
|
end
|
116
116
|
|
@@ -118,10 +118,10 @@ module SnapTrade
|
|
118
118
|
def self.openapi_nullable
|
119
119
|
Set.new([
|
120
120
|
:'aws_s3_square_logo_url',
|
121
|
-
:'open_url',
|
122
|
-
:'allows_fractional_units',
|
123
121
|
:'allows_trading',
|
122
|
+
:'allows_fractional_units',
|
124
123
|
:'has_reporting',
|
124
|
+
:'open_url'
|
125
125
|
])
|
126
126
|
end
|
127
127
|
|
@@ -168,10 +168,6 @@ module SnapTrade
|
|
168
168
|
self.aws_s3_square_logo_url = attributes[:'aws_s3_square_logo_url']
|
169
169
|
end
|
170
170
|
|
171
|
-
if attributes.key?(:'open_url')
|
172
|
-
self.open_url = attributes[:'open_url']
|
173
|
-
end
|
174
|
-
|
175
171
|
if attributes.key?(:'url')
|
176
172
|
self.url = attributes[:'url']
|
177
173
|
end
|
@@ -184,14 +180,14 @@ module SnapTrade
|
|
184
180
|
self.maintenance_mode = attributes[:'maintenance_mode']
|
185
181
|
end
|
186
182
|
|
187
|
-
if attributes.key?(:'allows_fractional_units')
|
188
|
-
self.allows_fractional_units = attributes[:'allows_fractional_units']
|
189
|
-
end
|
190
|
-
|
191
183
|
if attributes.key?(:'allows_trading')
|
192
184
|
self.allows_trading = attributes[:'allows_trading']
|
193
185
|
end
|
194
186
|
|
187
|
+
if attributes.key?(:'allows_fractional_units')
|
188
|
+
self.allows_fractional_units = attributes[:'allows_fractional_units']
|
189
|
+
end
|
190
|
+
|
195
191
|
if attributes.key?(:'has_reporting')
|
196
192
|
self.has_reporting = attributes[:'has_reporting']
|
197
193
|
end
|
@@ -209,6 +205,10 @@ module SnapTrade
|
|
209
205
|
self.exchanges = value
|
210
206
|
end
|
211
207
|
end
|
208
|
+
|
209
|
+
if attributes.key?(:'open_url')
|
210
|
+
self.open_url = attributes[:'open_url']
|
211
|
+
end
|
212
212
|
end
|
213
213
|
|
214
214
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -236,16 +236,16 @@ module SnapTrade
|
|
236
236
|
description == o.description &&
|
237
237
|
aws_s3_logo_url == o.aws_s3_logo_url &&
|
238
238
|
aws_s3_square_logo_url == o.aws_s3_square_logo_url &&
|
239
|
-
open_url == o.open_url &&
|
240
239
|
url == o.url &&
|
241
240
|
enabled == o.enabled &&
|
242
241
|
maintenance_mode == o.maintenance_mode &&
|
243
|
-
allows_fractional_units == o.allows_fractional_units &&
|
244
242
|
allows_trading == o.allows_trading &&
|
243
|
+
allows_fractional_units == o.allows_fractional_units &&
|
245
244
|
has_reporting == o.has_reporting &&
|
246
245
|
is_real_time_connection == o.is_real_time_connection &&
|
247
246
|
brokerage_type == o.brokerage_type &&
|
248
|
-
exchanges == o.exchanges
|
247
|
+
exchanges == o.exchanges &&
|
248
|
+
open_url == o.open_url
|
249
249
|
end
|
250
250
|
|
251
251
|
# @see the `==` method
|
@@ -257,7 +257,7 @@ module SnapTrade
|
|
257
257
|
# Calculates hash code according to all attributes.
|
258
258
|
# @return [Integer] Hash code
|
259
259
|
def hash
|
260
|
-
[id, slug, name, display_name, description, aws_s3_logo_url, aws_s3_square_logo_url,
|
260
|
+
[id, slug, name, display_name, description, aws_s3_logo_url, aws_s3_square_logo_url, url, enabled, maintenance_mode, allows_trading, allows_fractional_units, has_reporting, is_real_time_connection, brokerage_type, exchanges, open_url].hash
|
261
261
|
end
|
262
262
|
|
263
263
|
# Builds the object from hash
|
@@ -19,9 +19,6 @@ module SnapTrade
|
|
19
19
|
# Timestamp of when the connection was established in SnapTrade.
|
20
20
|
attr_accessor :created_date
|
21
21
|
|
22
|
-
# Timestamp of when the connection was last updated in SnapTrade. This field is deprecated. Please let us know if you have a valid use case for this field.
|
23
|
-
attr_accessor :updated_date
|
24
|
-
|
25
22
|
attr_accessor :brokerage
|
26
23
|
|
27
24
|
# A short, human-readable name for the connection.
|
@@ -39,18 +36,21 @@ module SnapTrade
|
|
39
36
|
# Additional data about the connection. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version.
|
40
37
|
attr_accessor :meta
|
41
38
|
|
39
|
+
# Timestamp of when the connection was last updated in SnapTrade. This field is deprecated. Please let us know if you have a valid use case for this field.
|
40
|
+
attr_accessor :updated_date
|
41
|
+
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
43
|
def self.attribute_map
|
44
44
|
{
|
45
45
|
:'id' => :'id',
|
46
46
|
:'created_date' => :'created_date',
|
47
|
-
:'updated_date' => :'updated_date',
|
48
47
|
:'brokerage' => :'brokerage',
|
49
48
|
:'name' => :'name',
|
50
49
|
:'type' => :'type',
|
51
50
|
:'disabled' => :'disabled',
|
52
51
|
:'disabled_date' => :'disabled_date',
|
53
|
-
:'meta' => :'meta'
|
52
|
+
:'meta' => :'meta',
|
53
|
+
:'updated_date' => :'updated_date'
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
@@ -64,13 +64,13 @@ module SnapTrade
|
|
64
64
|
{
|
65
65
|
:'id' => :'String',
|
66
66
|
:'created_date' => :'Time',
|
67
|
-
:'updated_date' => :'Time',
|
68
67
|
:'brokerage' => :'Brokerage',
|
69
68
|
:'name' => :'String',
|
70
69
|
:'type' => :'String',
|
71
70
|
:'disabled' => :'Boolean',
|
72
71
|
:'disabled_date' => :'Time',
|
73
|
-
:'meta' => :'Hash<String, Object>'
|
72
|
+
:'meta' => :'Hash<String, Object>',
|
73
|
+
:'updated_date' => :'Time'
|
74
74
|
}
|
75
75
|
end
|
76
76
|
|
@@ -104,10 +104,6 @@ module SnapTrade
|
|
104
104
|
self.created_date = attributes[:'created_date']
|
105
105
|
end
|
106
106
|
|
107
|
-
if attributes.key?(:'updated_date')
|
108
|
-
self.updated_date = attributes[:'updated_date']
|
109
|
-
end
|
110
|
-
|
111
107
|
if attributes.key?(:'brokerage')
|
112
108
|
self.brokerage = attributes[:'brokerage']
|
113
109
|
end
|
@@ -133,6 +129,10 @@ module SnapTrade
|
|
133
129
|
self.meta = value
|
134
130
|
end
|
135
131
|
end
|
132
|
+
|
133
|
+
if attributes.key?(:'updated_date')
|
134
|
+
self.updated_date = attributes[:'updated_date']
|
135
|
+
end
|
136
136
|
end
|
137
137
|
|
138
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -155,13 +155,13 @@ module SnapTrade
|
|
155
155
|
self.class == o.class &&
|
156
156
|
id == o.id &&
|
157
157
|
created_date == o.created_date &&
|
158
|
-
updated_date == o.updated_date &&
|
159
158
|
brokerage == o.brokerage &&
|
160
159
|
name == o.name &&
|
161
160
|
type == o.type &&
|
162
161
|
disabled == o.disabled &&
|
163
162
|
disabled_date == o.disabled_date &&
|
164
|
-
meta == o.meta
|
163
|
+
meta == o.meta &&
|
164
|
+
updated_date == o.updated_date
|
165
165
|
end
|
166
166
|
|
167
167
|
# @see the `==` method
|
@@ -173,7 +173,7 @@ module SnapTrade
|
|
173
173
|
# Calculates hash code according to all attributes.
|
174
174
|
# @return [Integer] Hash code
|
175
175
|
def hash
|
176
|
-
[id, created_date,
|
176
|
+
[id, created_date, brokerage, name, type, disabled, disabled_date, meta, updated_date].hash
|
177
177
|
end
|
178
178
|
|
179
179
|
# Builds the object from hash
|