snaptrade 2.0.32 → 2.0.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +26 -21
  4. data/lib/snaptrade/api/account_information_api.rb +70 -52
  5. data/lib/snaptrade/api/options_api.rb +16 -12
  6. data/lib/snaptrade/models/account.rb +13 -3
  7. data/lib/snaptrade/models/account_balance_total.rb +1 -8
  8. data/lib/snaptrade/models/account_holdings_account.rb +2 -2
  9. data/lib/snaptrade/models/account_order_record.rb +22 -18
  10. data/lib/snaptrade/models/{snap_trade_holdings_account_account_id_balance.rb → account_order_record_option_symbol.rb} +102 -12
  11. data/lib/snaptrade/models/{snap_trade_holdings_account_account_id.rb → account_order_record_universal_symbol.rb} +106 -73
  12. data/lib/snaptrade/models/account_sync_status.rb +1 -1
  13. data/lib/snaptrade/models/balance.rb +1 -1
  14. data/lib/snaptrade/models/{cash_restriction.rb → balance_currency.rb} +27 -35
  15. data/lib/snaptrade/models/brokerage_authorization_type_read_only.rb +1 -1
  16. data/lib/snaptrade/models/holdings_status.rb +4 -4
  17. data/lib/snaptrade/models/monthly_dividends.rb +1 -1
  18. data/lib/snaptrade/models/net_contributions.rb +1 -1
  19. data/lib/snaptrade/models/order_type_strict.rb +2 -2
  20. data/lib/snaptrade/models/past_value.rb +1 -1
  21. data/lib/snaptrade/models/strategy_order_record.rb +1 -1
  22. data/lib/snaptrade/models/sub_period_return_rate.rb +2 -2
  23. data/lib/snaptrade/models/transactions_status.rb +4 -5
  24. data/lib/snaptrade/models/type.rb +3 -3
  25. data/lib/snaptrade/version.rb +1 -1
  26. data/lib/snaptrade.rb +3 -5
  27. data/spec/api/account_information_api_spec.rb +12 -12
  28. data/spec/api/options_api_spec.rb +3 -3
  29. data/spec/models/{cash_restriction_spec.rb → account_order_record_option_symbol_spec.rb} +22 -10
  30. data/spec/models/{snap_trade_holdings_account_account_id_spec.rb → account_order_record_universal_symbol_spec.rb} +15 -15
  31. data/spec/models/balance_currency_spec.rb +41 -0
  32. metadata +11 -17
  33. data/lib/snaptrade/models/amount.rb +0 -228
  34. data/lib/snaptrade/models/brokerage_authorization_type_read_only_type.rb +0 -37
  35. data/spec/models/amount_spec.rb +0 -35
  36. data/spec/models/brokerage_authorization_type_read_only_type_spec.rb +0 -23
  37. data/spec/models/snap_trade_holdings_account_account_id_balance_spec.rb +0 -29
@@ -11,50 +11,47 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # A single brokerage account at a financial institution.
15
- class SnapTradeHoldingsAccountAccountId
16
- # Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
14
+ # Contains information about the security that the order is for. This field is only present for stock/ETF/crypto/mutual fund orders. For option orders, this field will be null and the `option_symbol` field will be populated.
15
+ class AccountOrderRecordUniversalSymbol
16
+ # Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
17
17
  attr_accessor :id
18
18
 
19
- # Unique identifier for the connection (brokerage authorization). This is the UUID used to reference the connection in SnapTrade.
20
- attr_accessor :brokerage_authorization
19
+ # The security's trading ticker symbol. For example \"AAPL\" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix.
20
+ attr_accessor :symbol
21
21
 
22
- # Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a usecase for it.
23
- attr_accessor :portfolio_group
22
+ # The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
23
+ attr_accessor :raw_symbol
24
24
 
25
- # A display name for the account. Either assigned by the user or by the financial institution itself. For certain institutions, SnapTrade appends the institution name to the account name for clarity.
26
- attr_accessor :name
25
+ # A human-readable description of the security. This is usually the company name or ETF name.
26
+ attr_accessor :description
27
27
 
28
- # The account number assigned by the financial institution.
29
- attr_accessor :number
28
+ attr_accessor :currency
30
29
 
31
- # The name of the financial institution that holds the account.
32
- attr_accessor :institution_name
30
+ attr_accessor :exchange
33
31
 
34
- attr_accessor :balance
32
+ attr_accessor :type
35
33
 
36
- # Additional information about the account, such as account type, status, etc. This information is specific to the financial institution and there's no standard format for this data. Please use at your own risk.
37
- attr_accessor :meta
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
38
36
 
39
- # This field is deprecated.
40
- attr_accessor :cash_restrictions
37
+ # 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
+ attr_accessor :figi_code
41
39
 
42
- # Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was created in SnapTrade. This is _not_ the account opening date at the financial institution.
43
- attr_accessor :created_date
40
+ attr_accessor :figi_instrument
44
41
 
45
42
  # Attribute mapping from ruby-style variable name to JSON key.
46
43
  def self.attribute_map
47
44
  {
48
45
  :'id' => :'id',
49
- :'brokerage_authorization' => :'brokerage_authorization',
50
- :'portfolio_group' => :'portfolio_group',
51
- :'name' => :'name',
52
- :'number' => :'number',
53
- :'institution_name' => :'institution_name',
54
- :'balance' => :'balance',
55
- :'meta' => :'meta',
56
- :'cash_restrictions' => :'cash_restrictions',
57
- :'created_date' => :'created_date'
46
+ :'symbol' => :'symbol',
47
+ :'raw_symbol' => :'raw_symbol',
48
+ :'description' => :'description',
49
+ :'currency' => :'currency',
50
+ :'exchange' => :'exchange',
51
+ :'type' => :'type',
52
+ :'currencies' => :'currencies',
53
+ :'figi_code' => :'figi_code',
54
+ :'figi_instrument' => :'figi_instrument'
58
55
  }
59
56
  end
60
57
 
@@ -67,37 +64,45 @@ module SnapTrade
67
64
  def self.openapi_types
68
65
  {
69
66
  :'id' => :'String',
70
- :'brokerage_authorization' => :'String',
71
- :'portfolio_group' => :'String',
72
- :'name' => :'String',
73
- :'number' => :'String',
74
- :'institution_name' => :'String',
75
- :'balance' => :'SnapTradeHoldingsAccountAccountIdBalance',
76
- :'meta' => :'Hash<String, Object>',
77
- :'cash_restrictions' => :'Array<CashRestriction>',
78
- :'created_date' => :'Time'
67
+ :'symbol' => :'String',
68
+ :'raw_symbol' => :'String',
69
+ :'description' => :'String',
70
+ :'currency' => :'UniversalSymbolCurrency',
71
+ :'exchange' => :'UniversalSymbolExchange',
72
+ :'type' => :'SecurityType',
73
+ :'currencies' => :'Array<Currency>',
74
+ :'figi_code' => :'String',
75
+ :'figi_instrument' => :'SymbolFigiInstrument'
79
76
  }
80
77
  end
81
78
 
82
79
  # List of attributes with nullable: true
83
80
  def self.openapi_nullable
84
81
  Set.new([
85
- :'name',
86
- :'balance',
82
+ :'description',
83
+ :'figi_code',
84
+ :'figi_instrument'
87
85
  ])
88
86
  end
89
87
 
88
+ # List of class defined in allOf (OpenAPI v3)
89
+ def self.openapi_all_of
90
+ [
91
+ :'UniversalSymbol'
92
+ ]
93
+ end
94
+
90
95
  # Initializes the object
91
96
  # @param [Hash] attributes Model attributes in the form of hash
92
97
  def initialize(attributes = {})
93
98
  if (!attributes.is_a?(Hash))
94
- fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::SnapTradeHoldingsAccountAccountId` initialize method"
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::AccountOrderRecordUniversalSymbol` initialize method"
95
100
  end
96
101
 
97
102
  # check to see if the attribute exists and convert string to symbol for hash key
98
103
  attributes = attributes.each_with_object({}) { |(k, v), h|
99
104
  if (!self.class.attribute_map.key?(k.to_sym))
100
- fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::SnapTradeHoldingsAccountAccountId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::AccountOrderRecordUniversalSymbol`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
106
  end
102
107
  h[k.to_sym] = v
103
108
  }
@@ -106,44 +111,42 @@ module SnapTrade
106
111
  self.id = attributes[:'id']
107
112
  end
108
113
 
109
- if attributes.key?(:'brokerage_authorization')
110
- self.brokerage_authorization = attributes[:'brokerage_authorization']
114
+ if attributes.key?(:'symbol')
115
+ self.symbol = attributes[:'symbol']
111
116
  end
112
117
 
113
- if attributes.key?(:'portfolio_group')
114
- self.portfolio_group = attributes[:'portfolio_group']
118
+ if attributes.key?(:'raw_symbol')
119
+ self.raw_symbol = attributes[:'raw_symbol']
115
120
  end
116
121
 
117
- if attributes.key?(:'name')
118
- self.name = attributes[:'name']
122
+ if attributes.key?(:'description')
123
+ self.description = attributes[:'description']
119
124
  end
120
125
 
121
- if attributes.key?(:'number')
122
- self.number = attributes[:'number']
126
+ if attributes.key?(:'currency')
127
+ self.currency = attributes[:'currency']
123
128
  end
124
129
 
125
- if attributes.key?(:'institution_name')
126
- self.institution_name = attributes[:'institution_name']
130
+ if attributes.key?(:'exchange')
131
+ self.exchange = attributes[:'exchange']
127
132
  end
128
133
 
129
- if attributes.key?(:'balance')
130
- self.balance = attributes[:'balance']
134
+ if attributes.key?(:'type')
135
+ self.type = attributes[:'type']
131
136
  end
132
137
 
133
- if attributes.key?(:'meta')
134
- if (value = attributes[:'meta']).is_a?(Hash)
135
- self.meta = value
138
+ if attributes.key?(:'currencies')
139
+ if (value = attributes[:'currencies']).is_a?(Array)
140
+ self.currencies = value
136
141
  end
137
142
  end
138
143
 
139
- if attributes.key?(:'cash_restrictions')
140
- if (value = attributes[:'cash_restrictions']).is_a?(Array)
141
- self.cash_restrictions = value
142
- end
144
+ if attributes.key?(:'figi_code')
145
+ self.figi_code = attributes[:'figi_code']
143
146
  end
144
147
 
145
- if attributes.key?(:'created_date')
146
- self.created_date = attributes[:'created_date']
148
+ if attributes.key?(:'figi_instrument')
149
+ self.figi_instrument = attributes[:'figi_instrument']
147
150
  end
148
151
  end
149
152
 
@@ -151,12 +154,42 @@ module SnapTrade
151
154
  # @return Array for valid properties with the reasons
152
155
  def list_invalid_properties
153
156
  invalid_properties = Array.new
157
+ if @id.nil?
158
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
159
+ end
160
+
161
+ if @symbol.nil?
162
+ invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
163
+ end
164
+
165
+ if @raw_symbol.nil?
166
+ invalid_properties.push('invalid value for "raw_symbol", raw_symbol cannot be nil.')
167
+ end
168
+
169
+ if @currency.nil?
170
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
171
+ end
172
+
173
+ if @type.nil?
174
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
175
+ end
176
+
177
+ if @currencies.nil?
178
+ invalid_properties.push('invalid value for "currencies", currencies cannot be nil.')
179
+ end
180
+
154
181
  invalid_properties
155
182
  end
156
183
 
157
184
  # Check to see if the all the properties in the model are valid
158
185
  # @return true if the model is valid
159
186
  def valid?
187
+ return false if @id.nil?
188
+ return false if @symbol.nil?
189
+ return false if @raw_symbol.nil?
190
+ return false if @currency.nil?
191
+ return false if @type.nil?
192
+ return false if @currencies.nil?
160
193
  true
161
194
  end
162
195
 
@@ -166,15 +199,15 @@ module SnapTrade
166
199
  return true if self.equal?(o)
167
200
  self.class == o.class &&
168
201
  id == o.id &&
169
- brokerage_authorization == o.brokerage_authorization &&
170
- portfolio_group == o.portfolio_group &&
171
- name == o.name &&
172
- number == o.number &&
173
- institution_name == o.institution_name &&
174
- balance == o.balance &&
175
- meta == o.meta &&
176
- cash_restrictions == o.cash_restrictions &&
177
- created_date == o.created_date
202
+ symbol == o.symbol &&
203
+ raw_symbol == o.raw_symbol &&
204
+ description == o.description &&
205
+ currency == o.currency &&
206
+ exchange == o.exchange &&
207
+ type == o.type &&
208
+ currencies == o.currencies &&
209
+ figi_code == o.figi_code &&
210
+ figi_instrument == o.figi_instrument
178
211
  end
179
212
 
180
213
  # @see the `==` method
@@ -186,7 +219,7 @@ module SnapTrade
186
219
  # Calculates hash code according to all attributes.
187
220
  # @return [Integer] Hash code
188
221
  def hash
189
- [id, brokerage_authorization, portfolio_group, name, number, institution_name, balance, meta, cash_restrictions, created_date].hash
222
+ [id, symbol, raw_symbol, description, currency, exchange, type, currencies, figi_code, figi_instrument].hash
190
223
  end
191
224
 
192
225
  # Builds the object from hash
@@ -11,7 +11,7 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # Status of account
14
+ # Contains status update for the account sync process between SnapTrade and the brokerage.
15
15
  class AccountSyncStatus
16
16
  attr_accessor :transactions
17
17
 
@@ -38,7 +38,7 @@ module SnapTrade
38
38
  # Attribute type mapping.
39
39
  def self.openapi_types
40
40
  {
41
- :'currency' => :'Currency',
41
+ :'currency' => :'BalanceCurrency',
42
42
  :'cash' => :'Float',
43
43
  :'buying_power' => :'Float'
44
44
  }
@@ -11,26 +11,23 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # Cash restriction rules that apply to this account when undergoing portfolio rebalance calculations.
15
- class CashRestriction
14
+ # The currency of the balance. This applies to both `cash` and `buying_power`.
15
+ class BalanceCurrency
16
+ # Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
16
17
  attr_accessor :id
17
18
 
18
- attr_accessor :account
19
+ # The ISO-4217 currency code for the currency.
20
+ attr_accessor :code
19
21
 
20
- attr_accessor :currency
21
-
22
- attr_accessor :type
23
-
24
- attr_accessor :amount
22
+ # A human-friendly name of the currency.
23
+ attr_accessor :name
25
24
 
26
25
  # Attribute mapping from ruby-style variable name to JSON key.
27
26
  def self.attribute_map
28
27
  {
29
28
  :'id' => :'id',
30
- :'account' => :'account',
31
- :'currency' => :'currency',
32
- :'type' => :'type',
33
- :'amount' => :'amount'
29
+ :'code' => :'code',
30
+ :'name' => :'name'
34
31
  }
35
32
  end
36
33
 
@@ -43,10 +40,8 @@ module SnapTrade
43
40
  def self.openapi_types
44
41
  {
45
42
  :'id' => :'String',
46
- :'account' => :'String',
47
- :'currency' => :'String',
48
- :'type' => :'Type',
49
- :'amount' => :'Float'
43
+ :'code' => :'String',
44
+ :'name' => :'String'
50
45
  }
51
46
  end
52
47
 
@@ -56,17 +51,24 @@ module SnapTrade
56
51
  ])
57
52
  end
58
53
 
54
+ # List of class defined in allOf (OpenAPI v3)
55
+ def self.openapi_all_of
56
+ [
57
+ :'Currency'
58
+ ]
59
+ end
60
+
59
61
  # Initializes the object
60
62
  # @param [Hash] attributes Model attributes in the form of hash
61
63
  def initialize(attributes = {})
62
64
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::CashRestriction` initialize method"
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::BalanceCurrency` initialize method"
64
66
  end
65
67
 
66
68
  # check to see if the attribute exists and convert string to symbol for hash key
67
69
  attributes = attributes.each_with_object({}) { |(k, v), h|
68
70
  if (!self.class.attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::CashRestriction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::BalanceCurrency`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
72
  end
71
73
  h[k.to_sym] = v
72
74
  }
@@ -75,20 +77,12 @@ module SnapTrade
75
77
  self.id = attributes[:'id']
76
78
  end
77
79
 
78
- if attributes.key?(:'account')
79
- self.account = attributes[:'account']
80
- end
81
-
82
- if attributes.key?(:'currency')
83
- self.currency = attributes[:'currency']
84
- end
85
-
86
- if attributes.key?(:'type')
87
- self.type = attributes[:'type']
80
+ if attributes.key?(:'code')
81
+ self.code = attributes[:'code']
88
82
  end
89
83
 
90
- if attributes.key?(:'amount')
91
- self.amount = attributes[:'amount']
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
92
86
  end
93
87
  end
94
88
 
@@ -111,10 +105,8 @@ module SnapTrade
111
105
  return true if self.equal?(o)
112
106
  self.class == o.class &&
113
107
  id == o.id &&
114
- account == o.account &&
115
- currency == o.currency &&
116
- type == o.type &&
117
- amount == o.amount
108
+ code == o.code &&
109
+ name == o.name
118
110
  end
119
111
 
120
112
  # @see the `==` method
@@ -126,7 +118,7 @@ module SnapTrade
126
118
  # Calculates hash code according to all attributes.
127
119
  # @return [Integer] Hash code
128
120
  def hash
129
- [id, account, currency, type, amount].hash
121
+ [id, code, name].hash
130
122
  end
131
123
 
132
124
  # Builds the object from hash
@@ -39,7 +39,7 @@ module SnapTrade
39
39
  def self.openapi_types
40
40
  {
41
41
  :'id' => :'String',
42
- :'type' => :'BrokerageAuthorizationTypeReadOnlyType',
42
+ :'type' => :'Type',
43
43
  :'auth_type' => :'AuthType',
44
44
  :'brokerage' => :'BrokerageAuthorizationTypeReadOnlyBrokerage'
45
45
  }
@@ -11,11 +11,12 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # Status of account holdings sync
14
+ # Status of account holdings sync. SnapTrade syncs holdings from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all holdings (positions, balances, recent orders, and transactions) immediately after the connection is established. 2. Daily sync - Once a day SnapTrade refreshes all holdings from the brokerage. 3. Manual sync - You can trigger a refresh of holdings with the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
15
15
  class HoldingsStatus
16
+ # Indicates if the initial sync of holdings has been completed. For accounts with a large number of positions/orders/transactions, the initial sync may take a while to complete.
16
17
  attr_accessor :initial_sync_completed
17
18
 
18
- # Date in ISO 8601 format or null (YYYY-MM-DD HH:MM:SS.mmmmmmTZ)
19
+ # The last time holdings were successfully synced by SnapTrade.
19
20
  attr_accessor :last_successful_sync
20
21
 
21
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -35,14 +36,13 @@ module SnapTrade
35
36
  def self.openapi_types
36
37
  {
37
38
  :'initial_sync_completed' => :'Boolean',
38
- :'last_successful_sync' => :'String'
39
+ :'last_successful_sync' => :'Time'
39
40
  }
40
41
  end
41
42
 
42
43
  # List of attributes with nullable: true
43
44
  def self.openapi_nullable
44
45
  Set.new([
45
- :'last_successful_sync'
46
46
  ])
47
47
  end
48
48
 
@@ -12,7 +12,7 @@ require 'time'
12
12
 
13
13
  module SnapTrade
14
14
  class MonthlyDividends
15
- # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
15
+ # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
16
16
  attr_accessor :date
17
17
 
18
18
  attr_accessor :dividends
@@ -12,7 +12,7 @@ require 'time'
12
12
 
13
13
  module SnapTrade
14
14
  class NetContributions
15
- # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
15
+ # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
16
16
  attr_accessor :date
17
17
 
18
18
  attr_accessor :contributions
@@ -15,10 +15,10 @@ module SnapTrade
15
15
  LIMIT = "Limit".freeze
16
16
  MARKET = "Market".freeze
17
17
  STOP_LIMIT = "StopLimit".freeze
18
- STOP_LOSS = "StopLoss".freeze
18
+ STOP = "Stop".freeze
19
19
 
20
20
  def self.all_vars
21
- @all_vars ||= [LIMIT, MARKET, STOP_LIMIT, STOP_LOSS].freeze
21
+ @all_vars ||= [LIMIT, MARKET, STOP_LIMIT, STOP].freeze
22
22
  end
23
23
 
24
24
  # Builds the enum from string
@@ -12,7 +12,7 @@ require 'time'
12
12
 
13
13
  module SnapTrade
14
14
  class PastValue
15
- # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
15
+ # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
16
16
  attr_accessor :date
17
17
 
18
18
  attr_accessor :value
@@ -23,7 +23,7 @@ module SnapTrade
23
23
 
24
24
  attr_accessor :closed_quantity
25
25
 
26
- # Order Type potential values include (but are not limited to) - Limit - Market - StopLimit - StopLoss
26
+ # Order Type potential values include (but are not limited to) - Limit - Market - StopLimit - Stop
27
27
  attr_accessor :order_type
28
28
 
29
29
  # Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled * GTD - Good Til Date
@@ -12,10 +12,10 @@ require 'time'
12
12
 
13
13
  module SnapTrade
14
14
  class SubPeriodReturnRate
15
- # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
15
+ # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
16
16
  attr_accessor :period_start
17
17
 
18
- # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
18
+ # Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
19
19
  attr_accessor :period_end
20
20
 
21
21
  # The return rate for the given period
@@ -11,14 +11,15 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # Status of account transaction sync
14
+ # Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all transactions from the brokerage account as far back as the brokerage allows. Check [our integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=6fab8012ade6441fa0c6d9af9c55ce3a) for details on how far back we sync for each brokerage. 2. Daily sync - Once a day SnapTrade syncs new transactions from the brokerage. 3. Manual sync - You can retrigger an incremental sync of transactions with the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
15
15
  class TransactionsStatus
16
+ # Indicates if the initial sync of transactions has been completed. For accounts with a large number of transactions, the initial sync may take a while to complete.
16
17
  attr_accessor :initial_sync_completed
17
18
 
18
- # Date in YYYY-MM-DD format or null
19
+ # All transactions up to this date have been successfully synced. Please note that this is not the date of the last transaction, nor the last time SnapTrade attempted to sync transactions.
19
20
  attr_accessor :last_successful_sync
20
21
 
21
- # Date in YYYY-MM-DD format or null
22
+ # The date of the first transaction in the account known to SnapTrade. It's possible that the account has transactions before this date, but they are not known to SnapTrade.
22
23
  attr_accessor :first_transaction_date
23
24
 
24
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -47,8 +48,6 @@ module SnapTrade
47
48
  # List of attributes with nullable: true
48
49
  def self.openapi_nullable
49
50
  Set.new([
50
- :'last_successful_sync',
51
- :'first_transaction_date'
52
51
  ])
53
52
  end
54
53
 
@@ -12,11 +12,11 @@ require 'time'
12
12
 
13
13
  module SnapTrade
14
14
  class Type
15
- ALLOCATE_MAX = "ALLOCATE_MAX".freeze
16
- RETAIN_MIN = "RETAIN_MIN".freeze
15
+ READ = "read".freeze
16
+ TRADE = "trade".freeze
17
17
 
18
18
  def self.all_vars
19
- @all_vars ||= [ALLOCATE_MAX, RETAIN_MIN].freeze
19
+ @all_vars ||= [READ, TRADE].freeze
20
20
  end
21
21
 
22
22
  # Builds the enum from string
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.32'
11
+ VERSION = '2.0.34'
12
12
  end
data/lib/snaptrade.rb CHANGED
@@ -22,23 +22,23 @@ require 'snaptrade/models/account_balance_total'
22
22
  require 'snaptrade/models/account_holdings'
23
23
  require 'snaptrade/models/account_holdings_account'
24
24
  require 'snaptrade/models/account_order_record'
25
+ require 'snaptrade/models/account_order_record_option_symbol'
25
26
  require 'snaptrade/models/account_order_record_status'
27
+ require 'snaptrade/models/account_order_record_universal_symbol'
26
28
  require 'snaptrade/models/account_simple'
27
29
  require 'snaptrade/models/account_sync_status'
28
30
  require 'snaptrade/models/action_strict'
29
- require 'snaptrade/models/amount'
30
31
  require 'snaptrade/models/auth_type'
31
32
  require 'snaptrade/models/authentication_login_snap_trade_user200_response'
32
33
  require 'snaptrade/models/balance'
34
+ require 'snaptrade/models/balance_currency'
33
35
  require 'snaptrade/models/brokerage'
34
36
  require 'snaptrade/models/brokerage_authorization'
35
37
  require 'snaptrade/models/brokerage_authorization_disabled_confirmation'
36
38
  require 'snaptrade/models/brokerage_authorization_refresh_confirmation'
37
39
  require 'snaptrade/models/brokerage_authorization_type_read_only'
38
40
  require 'snaptrade/models/brokerage_authorization_type_read_only_brokerage'
39
- require 'snaptrade/models/brokerage_authorization_type_read_only_type'
40
41
  require 'snaptrade/models/brokerage_type'
41
- require 'snaptrade/models/cash_restriction'
42
42
  require 'snaptrade/models/connection_portal_version'
43
43
  require 'snaptrade/models/connection_type'
44
44
  require 'snaptrade/models/connections_session_events200_response_inner'
@@ -94,8 +94,6 @@ require 'snaptrade/models/security_type'
94
94
  require 'snaptrade/models/session_event'
95
95
  require 'snaptrade/models/session_event_type'
96
96
  require 'snaptrade/models/snap_trade_holdings_account'
97
- require 'snaptrade/models/snap_trade_holdings_account_account_id'
98
- require 'snaptrade/models/snap_trade_holdings_account_account_id_balance'
99
97
  require 'snaptrade/models/snap_trade_holdings_total_value'
100
98
  require 'snaptrade/models/snap_trade_login_user_request_body'
101
99
  require 'snaptrade/models/snap_trade_register_user_request_body'