snaptrade 3.0.42 → 3.0.44
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/README.md +43 -3
- data/lib/snaptrade/api/management_api.rb +108 -12
- data/lib/snaptrade/models/account_balances_v2_response.rb +4 -4
- data/lib/snaptrade/models/account_balances_v2_response_buying_power_inner.rb +1 -1
- data/lib/snaptrade/models/balance_v2_currency_amount.rb +1 -0
- data/lib/snaptrade/models/connected_asset_partner_stats.rb +382 -0
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +1 -1
- data/spec/api/management_api_spec.rb +15 -3
- data/spec/models/{account_balances_v2_response_cash_inner_spec.rb → connected_asset_partner_stats_spec.rb} +80 -8
- metadata +253 -253
- data/lib/snaptrade/models/account_balances_v2_response_cash_inner.rb +0 -244
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50b2501e3d9392b7acb54ee9a9f7695f151bd66ce5294c269dda5c0d069019a3
|
|
4
|
+
data.tar.gz: fc8a7a7ae361a81022f22d06acadebb7852ab7a74d52e299df49c3cf0e338973
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1343586ce71be84d05bb048cce55c96401c48b47d67513feb6eedd04edb8a897b8e317a04a36ec41640daf92fba791ea10416c7c15c1f5ac03ae7df81b3b9ef4
|
|
7
|
+
data.tar.gz: c199f9fac61a030b683dade5dec570a0b17bbef97deb4bf0991810cbcf4ce2439c3beb41130c36e7790da4ebc9ea4fe120669c123e9d1201a10809df582f6157
|
data/README.md
CHANGED
|
@@ -63,7 +63,7 @@ backoff with jitter rather than from the headers.
|
|
|
63
63
|
See https://docs.snaptrade.com/docs/ratelimiting.
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
[](https://rubygems.org/gems/snaptrade/versions/3.0.44)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -114,6 +114,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
114
114
|
* [`snaptrade.experimental_endpoints.list_subscriptions`](#snaptradeexperimental_endpointslist_subscriptions)
|
|
115
115
|
* [`snaptrade.experimental_endpoints.place_simple_order`](#snaptradeexperimental_endpointsplace_simple_order)
|
|
116
116
|
* [`snaptrade.management.get_stats`](#snaptrademanagementget_stats)
|
|
117
|
+
* [`snaptrade.management.get_stats_legacy`](#snaptrademanagementget_stats_legacy)
|
|
117
118
|
* [`snaptrade.reference_data.get_partner_info`](#snaptradereference_dataget_partner_info)
|
|
118
119
|
* [`snaptrade.reference_data.get_stock_exchanges`](#snaptradereference_dataget_stock_exchanges)
|
|
119
120
|
* [`snaptrade.reference_data.get_symbols`](#snaptradereference_dataget_symbols)
|
|
@@ -145,7 +146,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
145
146
|
Add to Gemfile:
|
|
146
147
|
|
|
147
148
|
```ruby
|
|
148
|
-
gem 'snaptrade', '~> 3.0.
|
|
149
|
+
gem 'snaptrade', '~> 3.0.44'
|
|
149
150
|
```
|
|
150
151
|
|
|
151
152
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1778,9 +1779,11 @@ extended-hours enablement. Futures and multi-leg orders only accept regular.
|
|
|
1778
1779
|
|
|
1779
1780
|
### `snaptrade.management.get_stats`<a id="snaptrademanagementget_stats"></a>
|
|
1780
1781
|
|
|
1782
|
+
**Beta.** This endpoint and its response schema may change.
|
|
1783
|
+
|
|
1781
1784
|
Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
1782
1785
|
|
|
1783
|
-
User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `
|
|
1786
|
+
User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
|
|
1784
1787
|
|
|
1785
1788
|
|
|
1786
1789
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1799,6 +1802,43 @@ ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
|
1799
1802
|
|
|
1800
1803
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1801
1804
|
|
|
1805
|
+
[ConnectedAssetPartnerStats](./lib/snaptrade/models/connected_asset_partner_stats.rb)
|
|
1806
|
+
|
|
1807
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1808
|
+
|
|
1809
|
+
`/management/stats` `GET`
|
|
1810
|
+
|
|
1811
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1812
|
+
|
|
1813
|
+
---
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
### `snaptrade.management.get_stats_legacy`<a id="snaptrademanagementget_stats_legacy"></a>
|
|
1817
|
+

|
|
1818
|
+
|
|
1819
|
+
**Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names.
|
|
1820
|
+
|
|
1821
|
+
Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
1822
|
+
|
|
1823
|
+
User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1827
|
+
|
|
1828
|
+
```ruby
|
|
1829
|
+
result = snaptrade.management.get_stats_legacy(
|
|
1830
|
+
currency: "USD",
|
|
1831
|
+
)
|
|
1832
|
+
p result
|
|
1833
|
+
```
|
|
1834
|
+
|
|
1835
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1836
|
+
|
|
1837
|
+
##### currency: `String`<a id="currency-string"></a>
|
|
1838
|
+
ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
1839
|
+
|
|
1840
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1841
|
+
|
|
1802
1842
|
[PartnerStats](./lib/snaptrade/models/partner_stats.rb)
|
|
1803
1843
|
|
|
1804
1844
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
@@ -17,11 +17,13 @@ module SnapTrade
|
|
|
17
17
|
@api_client = api_client
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# Get usage stats
|
|
20
|
+
# Get usage stats (beta)
|
|
21
21
|
#
|
|
22
|
+
# **Beta.** This endpoint and its response schema may change.
|
|
23
|
+
#
|
|
22
24
|
# Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
23
25
|
#
|
|
24
|
-
# User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `
|
|
26
|
+
# User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
|
|
25
27
|
#
|
|
26
28
|
# @param currency [String] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
27
29
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
@@ -31,11 +33,13 @@ module SnapTrade
|
|
|
31
33
|
data
|
|
32
34
|
end
|
|
33
35
|
|
|
34
|
-
# Get usage stats
|
|
36
|
+
# Get usage stats (beta)
|
|
35
37
|
#
|
|
38
|
+
# **Beta.** This endpoint and its response schema may change.
|
|
39
|
+
#
|
|
36
40
|
# Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
37
41
|
#
|
|
38
|
-
# User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `
|
|
42
|
+
# User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
|
|
39
43
|
#
|
|
40
44
|
# @param currency [String] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
41
45
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
@@ -44,27 +48,27 @@ module SnapTrade
|
|
|
44
48
|
get_stats_with_http_info_impl(extra)
|
|
45
49
|
end
|
|
46
50
|
|
|
47
|
-
# Get usage stats
|
|
48
|
-
# Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `
|
|
51
|
+
# Get usage stats (beta)
|
|
52
|
+
# **Beta.** This endpoint and its response schema may change. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
|
|
49
53
|
# @param [Hash] opts the optional parameters
|
|
50
54
|
# @option opts [String] :currency ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
51
|
-
# @return [
|
|
55
|
+
# @return [ConnectedAssetPartnerStats]
|
|
52
56
|
private def get_stats_impl(opts = {})
|
|
53
57
|
data, _status_code, _headers = get_stats_with_http_info(opts)
|
|
54
58
|
data
|
|
55
59
|
end
|
|
56
60
|
|
|
57
|
-
# Get usage stats
|
|
58
|
-
# Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `
|
|
61
|
+
# Get usage stats (beta)
|
|
62
|
+
# **Beta.** This endpoint and its response schema may change. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `connected_assets_calculated_at` indicates when it was last calculated.
|
|
59
63
|
# @param [Hash] opts the optional parameters
|
|
60
64
|
# @option opts [String] :currency ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
61
|
-
# @return [Array<(
|
|
65
|
+
# @return [Array<(ConnectedAssetPartnerStats, Integer, Hash)>] ConnectedAssetPartnerStats data, response status code and response headers
|
|
62
66
|
private def get_stats_with_http_info_impl(opts = {})
|
|
63
67
|
if @api_client.config.debugging
|
|
64
68
|
@api_client.config.logger.debug 'Calling API: ManagementApi.get_stats ...'
|
|
65
69
|
end
|
|
66
70
|
# resource path
|
|
67
|
-
local_var_path = '/
|
|
71
|
+
local_var_path = '/management/stats'
|
|
68
72
|
|
|
69
73
|
# query parameters
|
|
70
74
|
query_params = opts[:query_params] || {}
|
|
@@ -82,7 +86,7 @@ module SnapTrade
|
|
|
82
86
|
post_body = opts[:debug_body]
|
|
83
87
|
|
|
84
88
|
# return_type
|
|
85
|
-
return_type = opts[:debug_return_type] || '
|
|
89
|
+
return_type = opts[:debug_return_type] || 'ConnectedAssetPartnerStats'
|
|
86
90
|
|
|
87
91
|
# auth_names
|
|
88
92
|
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
|
@@ -103,6 +107,98 @@ module SnapTrade
|
|
|
103
107
|
end
|
|
104
108
|
return data, status_code, headers, response
|
|
105
109
|
end
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# Get usage stats (deprecated)
|
|
113
|
+
#
|
|
114
|
+
# **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names.
|
|
115
|
+
#
|
|
116
|
+
# Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
117
|
+
#
|
|
118
|
+
# User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
119
|
+
#
|
|
120
|
+
# @param currency [String] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
121
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
122
|
+
def get_stats_legacy(currency: SENTINEL, extra: {})
|
|
123
|
+
extra[:currency] = currency if currency != SENTINEL
|
|
124
|
+
data, _status_code, _headers = get_stats_legacy_with_http_info_impl(extra)
|
|
125
|
+
data
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Get usage stats (deprecated)
|
|
129
|
+
#
|
|
130
|
+
# **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names.
|
|
131
|
+
#
|
|
132
|
+
# Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard.
|
|
133
|
+
#
|
|
134
|
+
# User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
135
|
+
#
|
|
136
|
+
# @param currency [String] ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
137
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
138
|
+
def get_stats_legacy_with_http_info(currency: SENTINEL, extra: {})
|
|
139
|
+
extra[:currency] = currency if currency != SENTINEL
|
|
140
|
+
get_stats_legacy_with_http_info_impl(extra)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Get usage stats (deprecated)
|
|
144
|
+
# **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
145
|
+
# @param [Hash] opts the optional parameters
|
|
146
|
+
# @option opts [String] :currency ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
147
|
+
# @return [PartnerStats]
|
|
148
|
+
private def get_stats_legacy_impl(opts = {})
|
|
149
|
+
data, _status_code, _headers = get_stats_legacy_with_http_info(opts)
|
|
150
|
+
data
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Get usage stats (deprecated)
|
|
154
|
+
# **Deprecated.** Use `GET /management/stats` for the beta response with connected asset field names. Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated.
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [String] :currency ISO 4217 currency code to express connected asset values in. Defaults to `USD`.
|
|
157
|
+
# @return [Array<(PartnerStats, Integer, Hash)>] PartnerStats data, response status code and response headers
|
|
158
|
+
private def get_stats_legacy_with_http_info_impl(opts = {})
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug 'Calling API: ManagementApi.get_stats_legacy ...'
|
|
161
|
+
end
|
|
162
|
+
# resource path
|
|
163
|
+
local_var_path = '/snapTrade/stats'
|
|
164
|
+
|
|
165
|
+
# query parameters
|
|
166
|
+
query_params = opts[:query_params] || {}
|
|
167
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
|
168
|
+
|
|
169
|
+
# header parameters
|
|
170
|
+
header_params = opts[:header_params] || {}
|
|
171
|
+
# HTTP header 'Accept' (if needed)
|
|
172
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
173
|
+
|
|
174
|
+
# form parameters
|
|
175
|
+
form_params = opts[:form_params] || {}
|
|
176
|
+
|
|
177
|
+
# http body (model)
|
|
178
|
+
post_body = opts[:debug_body]
|
|
179
|
+
|
|
180
|
+
# return_type
|
|
181
|
+
return_type = opts[:debug_return_type] || 'PartnerStats'
|
|
182
|
+
|
|
183
|
+
# auth_names
|
|
184
|
+
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
|
185
|
+
|
|
186
|
+
new_options = opts.merge(
|
|
187
|
+
:operation => :"ManagementApi.get_stats_legacy",
|
|
188
|
+
:header_params => header_params,
|
|
189
|
+
:query_params => query_params,
|
|
190
|
+
:form_params => form_params,
|
|
191
|
+
:body => post_body,
|
|
192
|
+
:auth_names => auth_names,
|
|
193
|
+
:return_type => return_type
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
|
197
|
+
if @api_client.config.debugging
|
|
198
|
+
@api_client.config.logger.debug "API called: ManagementApi#get_stats_legacy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
199
|
+
end
|
|
200
|
+
return data, status_code, headers, response
|
|
201
|
+
end
|
|
106
202
|
end
|
|
107
203
|
|
|
108
204
|
# top-level client access to avoid having the user to insantiate their own API instances
|
|
@@ -16,15 +16,15 @@ module SnapTrade
|
|
|
16
16
|
# Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
|
|
17
17
|
attr_accessor :account_id
|
|
18
18
|
|
|
19
|
-
# Whether the account is a cash or margin account. Same values as `cash_or_margin` on the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint.
|
|
19
|
+
# Whether the account is a cash or margin account, normalized across institutions. Same values as `cash_or_margin` on the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint. - `cash`: the account can't borrow on margin. - `margin`: the account can borrow on margin. - `unknown`: SnapTrade doesn't have enough information to tell, or the distinction doesn't apply (for example crypto accounts).
|
|
20
20
|
attr_accessor :cash_or_margin
|
|
21
21
|
|
|
22
22
|
attr_accessor :net_value
|
|
23
23
|
|
|
24
|
-
# Cash held in the account, one entry per currency. Some institutions allow holding multiple currencies in the same account.
|
|
24
|
+
# Cash held in the account, one entry per currency, as reported by the institution. Some institutions allow holding multiple currencies in the same account. May include proceeds from trades that haven't settled yet. Can be negative, for example on a margin account that is borrowing in a currency.
|
|
25
25
|
attr_accessor :cash
|
|
26
26
|
|
|
27
|
-
# How much the account can spend on new purchases, one entry per currency. Amounts are in different currencies and shouldn't be added together. Null when it can't be determined. - **Cash accounts:** one entry per currency held, never more than the cash in that currency. Each entry is the settled cash available to spend in that currency where the institution reports it; otherwise it's the institution's buying power or cash, which may include proceeds from trades that haven't settled. Check `basis`. - **Margin accounts:**
|
|
27
|
+
# How much the account can spend on new purchases, one entry per currency. Amounts are in different currencies and shouldn't be added together. Null when it can't be determined. - **Cash accounts:** one entry per currency held, each covering purchases in that currency and never more than the cash in that currency. Each entry is the settled cash available to spend in that currency where the institution reports it; otherwise it's the institution's buying power or cash, which may include proceeds from trades that haven't settled. Check `basis`. - **Margin accounts:** a single entry for the whole account, covering purchases in any currency. It's usually in the account's main currency (the currency of `net_value`). It's the institution's buying power, typically its overnight figure (day-trading buying power isn't included). How it's calculated varies by institution, it can be negative, and it may not cover options or other non-marginable securities.
|
|
28
28
|
attr_accessor :buying_power
|
|
29
29
|
|
|
30
30
|
attr_accessor :margin
|
|
@@ -55,7 +55,7 @@ module SnapTrade
|
|
|
55
55
|
:'account_id' => :'String',
|
|
56
56
|
:'cash_or_margin' => :'AccountBalancesV2ResponseCashOrMargin',
|
|
57
57
|
:'net_value' => :'AccountBalancesV2ResponseNetValue',
|
|
58
|
-
:'cash' => :'Array<
|
|
58
|
+
:'cash' => :'Array<BalanceV2CurrencyAmount>',
|
|
59
59
|
:'buying_power' => :'Array<AccountBalancesV2ResponseBuyingPowerInner>',
|
|
60
60
|
:'margin' => :'AccountBalancesV2ResponseMargin',
|
|
61
61
|
:'data_freshness' => :'AccountBalancesV2ResponseDataFreshness'
|
|
@@ -15,7 +15,7 @@ module SnapTrade
|
|
|
15
15
|
# ISO-4217 currency code.
|
|
16
16
|
attr_accessor :currency
|
|
17
17
|
|
|
18
|
-
# Buying power in this currency. Can be negative, for example on a margin account that has exceeded its margin requirement.
|
|
18
|
+
# Buying power in this currency, rounded to 2 decimal places. Can be negative, for example on a margin account that has exceeded its margin requirement.
|
|
19
19
|
attr_accessor :amount
|
|
20
20
|
|
|
21
21
|
# What the amount may include. - `settled`: settled cash only. Excludes proceeds from sales that haven't settled and cash already committed to purchases that haven't settled, so spending it won't cause a good-faith violation. - `cash`: may include proceeds from trades that haven't settled. - `margin`: may include money borrowed on margin. To avoid good-faith violations on cash accounts, only treat the amount as safe to spend when `basis` is `settled`.
|