snaptrade 2.0.32 → 2.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +26 -21
- data/lib/snaptrade/api/account_information_api.rb +70 -52
- data/lib/snaptrade/api/options_api.rb +16 -12
- data/lib/snaptrade/models/account.rb +13 -3
- data/lib/snaptrade/models/account_balance_total.rb +1 -8
- data/lib/snaptrade/models/account_holdings_account.rb +2 -2
- data/lib/snaptrade/models/account_order_record.rb +22 -18
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id_balance.rb → account_order_record_option_symbol.rb} +102 -12
- data/lib/snaptrade/models/{snap_trade_holdings_account_account_id.rb → account_order_record_universal_symbol.rb} +106 -73
- data/lib/snaptrade/models/account_sync_status.rb +1 -1
- data/lib/snaptrade/models/balance.rb +1 -1
- data/lib/snaptrade/models/{cash_restriction.rb → balance_currency.rb} +27 -35
- data/lib/snaptrade/models/brokerage_authorization_type_read_only.rb +1 -1
- data/lib/snaptrade/models/holdings_status.rb +4 -4
- data/lib/snaptrade/models/monthly_dividends.rb +1 -1
- data/lib/snaptrade/models/net_contributions.rb +1 -1
- data/lib/snaptrade/models/order_type_strict.rb +2 -2
- data/lib/snaptrade/models/past_value.rb +1 -1
- data/lib/snaptrade/models/strategy_order_record.rb +1 -1
- data/lib/snaptrade/models/sub_period_return_rate.rb +2 -2
- data/lib/snaptrade/models/transactions_status.rb +4 -5
- data/lib/snaptrade/models/type.rb +3 -3
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +3 -5
- data/spec/api/account_information_api_spec.rb +12 -12
- data/spec/api/options_api_spec.rb +3 -3
- data/spec/models/{cash_restriction_spec.rb → account_order_record_option_symbol_spec.rb} +22 -10
- data/spec/models/{snap_trade_holdings_account_account_id_spec.rb → account_order_record_universal_symbol_spec.rb} +15 -15
- data/spec/models/balance_currency_spec.rb +41 -0
- metadata +11 -17
- data/lib/snaptrade/models/amount.rb +0 -228
- data/lib/snaptrade/models/brokerage_authorization_type_read_only_type.rb +0 -37
- data/spec/models/amount_spec.rb +0 -35
- data/spec/models/brokerage_authorization_type_read_only_type_spec.rb +0 -23
- 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
|
-
#
|
15
|
-
class
|
16
|
-
# Unique identifier for the
|
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
|
-
#
|
20
|
-
attr_accessor :
|
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
|
-
#
|
23
|
-
attr_accessor :
|
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
|
26
|
-
attr_accessor :
|
25
|
+
# A human-readable description of the security. This is usually the company name or ETF name.
|
26
|
+
attr_accessor :description
|
27
27
|
|
28
|
-
|
29
|
-
attr_accessor :number
|
28
|
+
attr_accessor :currency
|
30
29
|
|
31
|
-
|
32
|
-
attr_accessor :institution_name
|
30
|
+
attr_accessor :exchange
|
33
31
|
|
34
|
-
attr_accessor :
|
32
|
+
attr_accessor :type
|
35
33
|
|
36
|
-
#
|
37
|
-
attr_accessor :
|
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
|
40
|
-
attr_accessor :
|
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
|
-
|
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
|
-
:'
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'
|
53
|
-
:'
|
54
|
-
:'
|
55
|
-
:'
|
56
|
-
:'
|
57
|
-
:'
|
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
|
-
:'
|
71
|
-
:'
|
72
|
-
:'
|
73
|
-
:'
|
74
|
-
:'
|
75
|
-
:'
|
76
|
-
:'
|
77
|
-
:'
|
78
|
-
:'
|
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
|
-
:'
|
86
|
-
:'
|
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::
|
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::
|
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?(:'
|
110
|
-
self.
|
114
|
+
if attributes.key?(:'symbol')
|
115
|
+
self.symbol = attributes[:'symbol']
|
111
116
|
end
|
112
117
|
|
113
|
-
if attributes.key?(:'
|
114
|
-
self.
|
118
|
+
if attributes.key?(:'raw_symbol')
|
119
|
+
self.raw_symbol = attributes[:'raw_symbol']
|
115
120
|
end
|
116
121
|
|
117
|
-
if attributes.key?(:'
|
118
|
-
self.
|
122
|
+
if attributes.key?(:'description')
|
123
|
+
self.description = attributes[:'description']
|
119
124
|
end
|
120
125
|
|
121
|
-
if attributes.key?(:'
|
122
|
-
self.
|
126
|
+
if attributes.key?(:'currency')
|
127
|
+
self.currency = attributes[:'currency']
|
123
128
|
end
|
124
129
|
|
125
|
-
if attributes.key?(:'
|
126
|
-
self.
|
130
|
+
if attributes.key?(:'exchange')
|
131
|
+
self.exchange = attributes[:'exchange']
|
127
132
|
end
|
128
133
|
|
129
|
-
if attributes.key?(:'
|
130
|
-
self.
|
134
|
+
if attributes.key?(:'type')
|
135
|
+
self.type = attributes[:'type']
|
131
136
|
end
|
132
137
|
|
133
|
-
if attributes.key?(:'
|
134
|
-
if (value = attributes[:'
|
135
|
-
self.
|
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?(:'
|
140
|
-
|
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?(:'
|
146
|
-
self.
|
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
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
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,
|
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,26 +11,23 @@ require 'date'
|
|
11
11
|
require 'time'
|
12
12
|
|
13
13
|
module SnapTrade
|
14
|
-
#
|
15
|
-
class
|
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
|
-
|
19
|
+
# The ISO-4217 currency code for the currency.
|
20
|
+
attr_accessor :code
|
19
21
|
|
20
|
-
|
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
|
-
:'
|
31
|
-
:'
|
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
|
-
:'
|
47
|
-
:'
|
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::
|
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::
|
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?(:'
|
79
|
-
self.
|
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?(:'
|
91
|
-
self.
|
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
|
-
|
115
|
-
|
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,
|
121
|
+
[id, code, name].hash
|
130
122
|
end
|
131
123
|
|
132
124
|
# Builds the object from hash
|
@@ -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
|
-
#
|
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' => :'
|
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
|
-
|
18
|
+
STOP = "Stop".freeze
|
19
19
|
|
20
20
|
def self.all_vars
|
21
|
-
@all_vars ||= [LIMIT, MARKET, STOP_LIMIT,
|
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 -
|
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
|
-
#
|
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
|
-
#
|
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
|
-
|
16
|
-
|
15
|
+
READ = "read".freeze
|
16
|
+
TRADE = "trade".freeze
|
17
17
|
|
18
18
|
def self.all_vars
|
19
|
-
@all_vars ||= [
|
19
|
+
@all_vars ||= [READ, TRADE].freeze
|
20
20
|
end
|
21
21
|
|
22
22
|
# Builds the enum from string
|
data/lib/snaptrade/version.rb
CHANGED
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'
|