snaptrade 1.16.3 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -20
- data/README.md +5 -5
- data/docs/AccountHoldings.md +2 -2
- data/docs/AccountHoldingsAccount.md +2 -2
- data/docs/AccountInformationApi.md +64 -64
- data/docs/AccountOrderRecord.md +2 -2
- data/docs/AuthenticationApi.md +32 -32
- data/docs/Balance.md +1 -1
- data/docs/Brokerage.md +1 -1
- data/docs/BrokerageAuthorization.md +1 -1
- data/docs/BrokerageAuthorizationTypeReadOnly.md +1 -1
- data/docs/BrokerageSymbol.md +1 -1
- data/docs/BrokerageSymbolOptionSymbol.md +1 -1
- data/docs/BrokerageSymbolSymbol.md +7 -7
- data/docs/ConnectionsApi.md +30 -30
- data/docs/EncryptedResponse.md +1 -1
- data/docs/ErrorLogsApi.md +6 -6
- data/docs/ExchangeRatePairs.md +2 -2
- data/docs/ExcludedAsset.md +1 -1
- data/docs/ManualTrade.md +1 -1
- data/docs/ManualTradeAndImpact.md +2 -2
- data/docs/ManualTradeBalance.md +2 -2
- data/docs/ManualTradeSymbol.md +1 -1
- data/docs/ModelAssetClassDetails.md +1 -1
- data/docs/ModelAssetClassTarget.md +1 -1
- data/docs/ModelPortfolioAssetClass.md +1 -1
- data/docs/ModelPortfolioDetails.md +1 -1
- data/docs/ModelPortfolioSecurity.md +1 -1
- data/docs/MonthlyDividends.md +1 -1
- data/docs/NetContributions.md +1 -1
- data/docs/NetDividend.md +1 -1
- data/docs/OptionStrategy.md +1 -1
- data/docs/OptionsApi.md +58 -58
- data/docs/OptionsHoldings.md +2 -2
- data/docs/OptionsPosition.md +1 -1
- data/docs/OptionsSymbol.md +1 -1
- data/docs/PastValue.md +1 -1
- data/docs/PerformanceCustom.md +1 -1
- data/docs/PortfolioGroupInfo.md +1 -1
- data/docs/PortfolioGroupPosition.md +1 -1
- data/docs/PortfolioGroupSettings.md +1 -1
- data/docs/Position.md +1 -1
- data/docs/PositionSymbol.md +1 -1
- data/docs/ReferenceDataApi.md +28 -28
- data/docs/SnapTradeHoldingsAccount.md +1 -1
- data/docs/StrategyOrderRecord.md +1 -1
- data/docs/StrategyQuotes.md +2 -2
- data/docs/SubPeriodReturnRate.md +2 -2
- data/docs/Symbol.md +3 -3
- data/docs/SymbolsQuotesInner.md +1 -1
- data/docs/TargetAsset.md +1 -1
- data/docs/Trade.md +3 -3
- data/docs/TradeExecutionStatus.md +3 -3
- data/docs/TradeImpact.md +2 -2
- data/docs/TradingApi.md +84 -84
- data/docs/TransactionsAndReportingApi.md +32 -32
- data/docs/TransactionsStatus.md +1 -1
- data/docs/UnderlyingSymbol.md +3 -3
- data/docs/UniversalActivity.md +5 -5
- data/docs/UniversalSymbol.md +7 -7
- data/docs/UniversalSymbolTicker.md +3 -3
- data/docs/UserSettings.md +1 -1
- data/header.png +0 -0
- data/lib/snaptrade/api/account_information_api.rb +0 -16
- data/lib/snaptrade/api/api_status_api.rb +0 -2
- data/lib/snaptrade/api/authentication_api.rb +0 -10
- data/lib/snaptrade/api/connections_api.rb +0 -8
- data/lib/snaptrade/api/error_logs_api.rb +0 -2
- data/lib/snaptrade/api/options_api.rb +0 -10
- data/lib/snaptrade/api/reference_data_api.rb +0 -22
- data/lib/snaptrade/api/trading_api.rb +0 -12
- data/lib/snaptrade/api/transactions_and_reporting_api.rb +0 -4
- data/lib/snaptrade/models/brokerage_symbol_symbol.rb +30 -0
- data/lib/snaptrade/models/universal_activity.rb +1 -1
- data/lib/snaptrade/models/universal_symbol.rb +30 -0
- data/lib/snaptrade/version.rb +1 -1
- metadata +4 -3
data/docs/ConnectionsApi.md
CHANGED
@@ -28,10 +28,10 @@ user_secret = "USERSECRET123"
|
|
28
28
|
begin
|
29
29
|
# Get brokerage authorization details
|
30
30
|
result = SnapTrade::Connections.detail_brokerage_authorization(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
authorization_id: authorization_id,
|
32
|
+
user_id: user_id,
|
33
|
+
user_secret: user_secret,
|
34
|
+
)
|
35
35
|
p result
|
36
36
|
rescue SnapTrade::ApiError => e
|
37
37
|
puts "Exception when calling SnapTrade::Connections.detail_brokerage_authorization: #{e}"
|
@@ -50,10 +50,10 @@ user_secret = "USERSECRET123"
|
|
50
50
|
begin
|
51
51
|
# Get brokerage authorization details
|
52
52
|
data, status_code, headers, response = SnapTrade::Connections.detail_brokerage_authorization_with_http_info(
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
authorization_id: authorization_id,
|
54
|
+
user_id: user_id,
|
55
|
+
user_secret: user_secret,
|
56
|
+
)
|
57
57
|
p status_code # => 2xx
|
58
58
|
p headers # => { ... }
|
59
59
|
p data # => BrokerageAuthorization
|
@@ -92,9 +92,9 @@ user_secret = "USERSECRET123"
|
|
92
92
|
begin
|
93
93
|
# List all brokerage authorizations for the user
|
94
94
|
result = SnapTrade::Connections.list_brokerage_authorizations(
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
user_id: user_id,
|
96
|
+
user_secret: user_secret,
|
97
|
+
)
|
98
98
|
p result
|
99
99
|
rescue SnapTrade::ApiError => e
|
100
100
|
puts "Exception when calling SnapTrade::Connections.list_brokerage_authorizations: #{e}"
|
@@ -112,9 +112,9 @@ user_secret = "USERSECRET123"
|
|
112
112
|
begin
|
113
113
|
# List all brokerage authorizations for the user
|
114
114
|
data, status_code, headers, response = SnapTrade::Connections.list_brokerage_authorizations_with_http_info(
|
115
|
-
|
116
|
-
|
117
|
-
|
115
|
+
user_id: user_id,
|
116
|
+
user_secret: user_secret,
|
117
|
+
)
|
118
118
|
p status_code # => 2xx
|
119
119
|
p headers # => { ... }
|
120
120
|
p data # => Array<BrokerageAuthorization>
|
@@ -153,10 +153,10 @@ user_secret = "USERSECRET123"
|
|
153
153
|
begin
|
154
154
|
# Delete brokerage authorization
|
155
155
|
SnapTrade::Connections.remove_brokerage_authorization(
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
156
|
+
authorization_id: authorization_id,
|
157
|
+
user_id: user_id,
|
158
|
+
user_secret: user_secret,
|
159
|
+
)
|
160
160
|
rescue SnapTrade::ApiError => e
|
161
161
|
puts "Exception when calling SnapTrade::Connections.remove_brokerage_authorization: #{e}"
|
162
162
|
end
|
@@ -174,10 +174,10 @@ user_secret = "USERSECRET123"
|
|
174
174
|
begin
|
175
175
|
# Delete brokerage authorization
|
176
176
|
data, status_code, headers, response = SnapTrade::Connections.remove_brokerage_authorization_with_http_info(
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
177
|
+
authorization_id: authorization_id,
|
178
|
+
user_id: user_id,
|
179
|
+
user_secret: user_secret,
|
180
|
+
)
|
181
181
|
p status_code # => 2xx
|
182
182
|
p headers # => { ... }
|
183
183
|
p data # => nil
|
@@ -217,10 +217,10 @@ session_id = "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071e
|
|
217
217
|
begin
|
218
218
|
# List all session events for the partner
|
219
219
|
result = SnapTrade::Connections.session_events(
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
220
|
+
partner_client_id: partner_client_id,
|
221
|
+
user_id: user_id,
|
222
|
+
session_id: session_id,
|
223
|
+
)
|
224
224
|
p result
|
225
225
|
rescue SnapTrade::ApiError => e
|
226
226
|
puts "Exception when calling SnapTrade::Connections.session_events: #{e}"
|
@@ -239,10 +239,10 @@ session_id = "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071e
|
|
239
239
|
begin
|
240
240
|
# List all session events for the partner
|
241
241
|
data, status_code, headers, response = SnapTrade::Connections.session_events_with_http_info(
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
242
|
+
partner_client_id: partner_client_id,
|
243
|
+
user_id: user_id,
|
244
|
+
session_id: session_id,
|
245
|
+
)
|
246
246
|
p status_code # => 2xx
|
247
247
|
p headers # => { ... }
|
248
248
|
p data # => Array<ConnectionsSessionEvents200ResponseInner>
|
data/docs/EncryptedResponse.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **encrypted_shared_key** | **String** | | [optional] |
|
8
|
-
| **encrypted_message_data** |
|
8
|
+
| **encrypted_message_data** | **EncryptedResponseEncryptedMessageData** | | [optional] |
|
9
9
|
|
10
10
|
## Example
|
11
11
|
|
data/docs/ErrorLogsApi.md
CHANGED
@@ -24,9 +24,9 @@ user_secret = "USERSECRET123"
|
|
24
24
|
begin
|
25
25
|
# Retrieve error logs on behalf of your SnapTrade users
|
26
26
|
result = SnapTrade::ErrorLogs.list_user_errors(
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
user_id: user_id,
|
28
|
+
user_secret: user_secret,
|
29
|
+
)
|
30
30
|
p result
|
31
31
|
rescue SnapTrade::ApiError => e
|
32
32
|
puts "Exception when calling SnapTrade::ErrorLogs.list_user_errors: #{e}"
|
@@ -44,9 +44,9 @@ user_secret = "USERSECRET123"
|
|
44
44
|
begin
|
45
45
|
# Retrieve error logs on behalf of your SnapTrade users
|
46
46
|
data, status_code, headers, response = SnapTrade::ErrorLogs.list_user_errors_with_http_info(
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
user_id: user_id,
|
48
|
+
user_secret: user_secret,
|
49
|
+
)
|
50
50
|
p status_code # => 2xx
|
51
51
|
p headers # => { ... }
|
52
52
|
p data # => Array<UserErrorLog>
|
data/docs/ExchangeRatePairs.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **src** |
|
8
|
-
| **dst** |
|
7
|
+
| **src** | **Currency** | | [optional] |
|
8
|
+
| **dst** | **Currency** | | [optional] |
|
9
9
|
| **exchange_rate** | **Float** | | [optional] |
|
10
10
|
|
11
11
|
## Example
|
data/docs/ExcludedAsset.md
CHANGED
data/docs/ManualTrade.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
| **account** | **String** | | [optional] |
|
9
9
|
| **order_type** | [**OrderType**](OrderType.md) | | [optional] |
|
10
10
|
| **time_in_force** | [**TimeInForce**](TimeInForce.md) | | [optional] |
|
11
|
-
| **symbol** |
|
11
|
+
| **symbol** | **ManualTradeSymbol** | | [optional] |
|
12
12
|
| **action** | [**Action**](Action.md) | | [optional] |
|
13
13
|
| **units** | **Float** | Trade Units | [optional] |
|
14
14
|
| **price** | **Float** | Trade Price if limit or stop limit order | [optional] |
|
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **trade** |
|
7
|
+
| **trade** | **ManualTrade** | | [optional] |
|
8
8
|
| **trade_impacts** | [**Array<ManualTrade>**](ManualTrade.md) | | [optional] |
|
9
|
-
| **combined_remaining_balance** |
|
9
|
+
| **combined_remaining_balance** | **ManualTradeBalance** | | [optional] |
|
10
10
|
|
11
11
|
## Example
|
12
12
|
|
data/docs/ManualTradeBalance.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **account** |
|
8
|
-
| **currency** |
|
7
|
+
| **account** | **Account** | | [optional] |
|
8
|
+
| **currency** | **Currency** | | [optional] |
|
9
9
|
| **cash** | **Float** | Cash | [optional] |
|
10
10
|
|
11
11
|
## Example
|
data/docs/ManualTradeSymbol.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **brokerage_symbol_id** | **String** | | [optional] |
|
8
8
|
| **universal_symbol_id** | **String** | | [optional] |
|
9
|
-
| **currency** |
|
9
|
+
| **currency** | **Currency** | | [optional] |
|
10
10
|
| **local_id** | **String** | | [optional] |
|
11
11
|
| **description** | **String** | | [optional] |
|
12
12
|
| **symbol** | **String** | | [optional] |
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **model_asset_class** |
|
7
|
+
| **model_asset_class** | **ModelAssetClass** | | [optional] |
|
8
8
|
| **model_asset_class_target** | [**Array<ModelAssetClassTarget>**](ModelAssetClassTarget.md) | | [optional] |
|
9
9
|
|
10
10
|
## Example
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **model_asset_class** |
|
7
|
+
| **model_asset_class** | **ModelAssetClass** | | [optional] |
|
8
8
|
| **percent** | **Integer** | | [optional] |
|
9
9
|
|
10
10
|
## Example
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **model_portfolio** |
|
7
|
+
| **model_portfolio** | **ModelPortfolio** | | [optional] |
|
8
8
|
| **model_portfolio_security** | [**Array<ModelPortfolioSecurity>**](ModelPortfolioSecurity.md) | | [optional] |
|
9
9
|
| **model_portfolio_asset_class** | [**Array<ModelPortfolioAssetClass>**](ModelPortfolioAssetClass.md) | | [optional] |
|
10
10
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** |
|
7
|
+
| **symbol** | **UniversalSymbol** | | [optional] |
|
8
8
|
| **percent** | **Integer** | | [optional] |
|
9
9
|
|
10
10
|
## Example
|
data/docs/MonthlyDividends.md
CHANGED
data/docs/NetContributions.md
CHANGED
data/docs/NetDividend.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** |
|
7
|
+
| **symbol** | **UniversalSymbol** | | [optional] |
|
8
8
|
| **amount** | **Float** | | [optional] |
|
9
9
|
| **currency** | **String** | | [optional] |
|
10
10
|
|
data/docs/OptionStrategy.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
|
-
| **underlying_symbol_id** |
|
8
|
+
| **underlying_symbol_id** | **UniversalSymbol** | | [optional] |
|
9
9
|
| **strategy_type** | **String** | | [optional] |
|
10
10
|
| **number_of_legs** | **Float** | | [optional] |
|
11
11
|
| **legs** | [**Array<OptionStrategyLegsInner>**](OptionStrategyLegsInner.md) | | [optional] |
|
data/docs/OptionsApi.md
CHANGED
@@ -38,13 +38,13 @@ account_id = "accountId_example"
|
|
38
38
|
begin
|
39
39
|
# Creates an option strategy object that will be used to place an option strategy order
|
40
40
|
result = SnapTrade::Options.get_option_strategy(
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
underlying_symbol_id: underlying_symbol_id,
|
42
|
+
legs: legs,
|
43
|
+
strategy_type: strategy_type,
|
44
|
+
user_id: user_id,
|
45
|
+
user_secret: user_secret,
|
46
|
+
account_id: account_id,
|
47
|
+
)
|
48
48
|
p result
|
49
49
|
rescue SnapTrade::ApiError => e
|
50
50
|
puts "Exception when calling SnapTrade::Options.get_option_strategy: #{e}"
|
@@ -72,13 +72,13 @@ account_id = "accountId_example"
|
|
72
72
|
begin
|
73
73
|
# Creates an option strategy object that will be used to place an option strategy order
|
74
74
|
data, status_code, headers, response = SnapTrade::Options.get_option_strategy_with_http_info(
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
75
|
+
underlying_symbol_id: underlying_symbol_id,
|
76
|
+
legs: legs,
|
77
|
+
strategy_type: strategy_type,
|
78
|
+
user_id: user_id,
|
79
|
+
user_secret: user_secret,
|
80
|
+
account_id: account_id,
|
81
|
+
)
|
82
82
|
p status_code # => 2xx
|
83
83
|
p headers # => { ... }
|
84
84
|
p data # => StrategyQuotes
|
@@ -120,11 +120,11 @@ symbol = "symbol_example"
|
|
120
120
|
begin
|
121
121
|
# Get the options chain
|
122
122
|
result = SnapTrade::Options.get_options_chain(
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
123
|
+
user_id: user_id,
|
124
|
+
user_secret: user_secret,
|
125
|
+
account_id: account_id,
|
126
|
+
symbol: symbol,
|
127
|
+
)
|
128
128
|
p result
|
129
129
|
rescue SnapTrade::ApiError => e
|
130
130
|
puts "Exception when calling SnapTrade::Options.get_options_chain: #{e}"
|
@@ -144,11 +144,11 @@ symbol = "symbol_example"
|
|
144
144
|
begin
|
145
145
|
# Get the options chain
|
146
146
|
data, status_code, headers, response = SnapTrade::Options.get_options_chain_with_http_info(
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
147
|
+
user_id: user_id,
|
148
|
+
user_secret: user_secret,
|
149
|
+
account_id: account_id,
|
150
|
+
symbol: symbol,
|
151
|
+
)
|
152
152
|
p status_code # => 2xx
|
153
153
|
p headers # => { ... }
|
154
154
|
p data # => Array<OptionChainInner>
|
@@ -190,11 +190,11 @@ option_strategy_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
|
190
190
|
begin
|
191
191
|
# Get latest market data of option strategy
|
192
192
|
result = SnapTrade::Options.get_options_strategy_quote(
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
193
|
+
user_id: user_id,
|
194
|
+
user_secret: user_secret,
|
195
|
+
account_id: account_id,
|
196
|
+
option_strategy_id: option_strategy_id,
|
197
|
+
)
|
198
198
|
p result
|
199
199
|
rescue SnapTrade::ApiError => e
|
200
200
|
puts "Exception when calling SnapTrade::Options.get_options_strategy_quote: #{e}"
|
@@ -214,11 +214,11 @@ option_strategy_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
|
214
214
|
begin
|
215
215
|
# Get latest market data of option strategy
|
216
216
|
data, status_code, headers, response = SnapTrade::Options.get_options_strategy_quote_with_http_info(
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
217
|
+
user_id: user_id,
|
218
|
+
user_secret: user_secret,
|
219
|
+
account_id: account_id,
|
220
|
+
option_strategy_id: option_strategy_id,
|
221
|
+
)
|
222
222
|
p status_code # => 2xx
|
223
223
|
p headers # => { ... }
|
224
224
|
p data # => StrategyQuotes
|
@@ -259,10 +259,10 @@ account_id = "accountId_example"
|
|
259
259
|
begin
|
260
260
|
# Get the options holdings in the account
|
261
261
|
result = SnapTrade::Options.list_option_holdings(
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
262
|
+
user_id: user_id,
|
263
|
+
user_secret: user_secret,
|
264
|
+
account_id: account_id,
|
265
|
+
)
|
266
266
|
p result
|
267
267
|
rescue SnapTrade::ApiError => e
|
268
268
|
puts "Exception when calling SnapTrade::Options.list_option_holdings: #{e}"
|
@@ -281,10 +281,10 @@ account_id = "accountId_example"
|
|
281
281
|
begin
|
282
282
|
# Get the options holdings in the account
|
283
283
|
data, status_code, headers, response = SnapTrade::Options.list_option_holdings_with_http_info(
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
284
|
+
user_id: user_id,
|
285
|
+
user_secret: user_secret,
|
286
|
+
account_id: account_id,
|
287
|
+
)
|
288
288
|
p status_code # => 2xx
|
289
289
|
p headers # => { ... }
|
290
290
|
p data # => Array<OptionsPosition>
|
@@ -328,14 +328,14 @@ option_strategy_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
|
328
328
|
begin
|
329
329
|
# Place an option strategy order on the brokerage
|
330
330
|
result = SnapTrade::Options.place_option_strategy(
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
331
|
+
order_type: order_type,
|
332
|
+
time_in_force: time_in_force,
|
333
|
+
price: price,
|
334
|
+
user_id: user_id,
|
335
|
+
user_secret: user_secret,
|
336
|
+
account_id: account_id,
|
337
|
+
option_strategy_id: option_strategy_id,
|
338
|
+
)
|
339
339
|
p result
|
340
340
|
rescue SnapTrade::ApiError => e
|
341
341
|
puts "Exception when calling SnapTrade::Options.place_option_strategy: #{e}"
|
@@ -358,14 +358,14 @@ option_strategy_id = "2bcd7cc3-e922-4976-bce1-9858296801c3"
|
|
358
358
|
begin
|
359
359
|
# Place an option strategy order on the brokerage
|
360
360
|
data, status_code, headers, response = SnapTrade::Options.place_option_strategy_with_http_info(
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
361
|
+
order_type: order_type,
|
362
|
+
time_in_force: time_in_force,
|
363
|
+
price: price,
|
364
|
+
user_id: user_id,
|
365
|
+
user_secret: user_secret,
|
366
|
+
account_id: account_id,
|
367
|
+
option_strategy_id: option_strategy_id,
|
368
|
+
)
|
369
369
|
p status_code # => 2xx
|
370
370
|
p headers # => { ... }
|
371
371
|
p data # => StrategyOrderRecord
|
data/docs/OptionsHoldings.md
CHANGED
@@ -6,9 +6,9 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | Options information | [optional] |
|
8
8
|
| **symbol** | **String** | | [optional] |
|
9
|
-
| **option_symbol** |
|
9
|
+
| **option_symbol** | **OptionsSymbol** | | [optional] |
|
10
10
|
| **price** | **Float** | Trade Price if limit or stop limit order | [optional] |
|
11
|
-
| **currency** |
|
11
|
+
| **currency** | **Currency** | | [optional] |
|
12
12
|
| **average_purchase_price** | **Float** | Average purchase price for this position | [optional] |
|
13
13
|
|
14
14
|
## Example
|
data/docs/OptionsPosition.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** |
|
7
|
+
| **symbol** | **BrokerageSymbol** | | [optional] |
|
8
8
|
| **price** | **Float** | Trade Price if limit or stop limit order | [optional] |
|
9
9
|
| **units** | **Float** | | [optional] |
|
10
10
|
| **currency** | [**OptionsPositionCurrency**](OptionsPositionCurrency.md) | | [optional] |
|
data/docs/OptionsSymbol.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
| **strike_price** | **Float** | | |
|
11
11
|
| **expiration_date** | **String** | | |
|
12
12
|
| **is_mini_option** | **Boolean** | | [optional] |
|
13
|
-
| **underlying_symbol** |
|
13
|
+
| **underlying_symbol** | **UnderlyingSymbol** | | |
|
14
14
|
| **local_id** | **String** | | [optional] |
|
15
15
|
| **exchange_id** | **String** | | [optional] |
|
16
16
|
|
data/docs/PastValue.md
CHANGED
data/docs/PerformanceCustom.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **total_equity_timeframe** | [**Array<PastValue>**](PastValue.md) | | [optional] |
|
8
|
-
| **contributions** |
|
8
|
+
| **contributions** | **NetContributions** | | [optional] |
|
9
9
|
| **contribution_timeframe** | [**Array<PastValue>**](PastValue.md) | | [optional] |
|
10
10
|
| **contribution_timeframe_cumulative** | [**Array<PastValue>**](PastValue.md) | | [optional] |
|
11
11
|
| **withdrawal_timeframe** | [**Array<PastValue>**](PastValue.md) | | [optional] |
|
data/docs/PortfolioGroupInfo.md
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
| **calculated_trades** | [**Array<CalculatedTrade>**](CalculatedTrade.md) | | [optional] |
|
15
15
|
| **brokerage_authorizations** | [**Array<BrokerageAuthorization>**](BrokerageAuthorization.md) | | [optional] |
|
16
16
|
| **accuracy** | **Float** | | [optional] |
|
17
|
-
| **settings** |
|
17
|
+
| **settings** | **PortfolioGroupSettings** | | [optional] |
|
18
18
|
|
19
19
|
## Example
|
20
20
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** |
|
7
|
+
| **symbol** | **UniversalSymbol** | | [optional] |
|
8
8
|
| **price** | **Float** | Last known market price for the symbol | [optional] |
|
9
9
|
| **units** | **Integer** | | [optional] |
|
10
10
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
| **cash_optimizer** | **Boolean** | | [optional] |
|
9
9
|
| **notify_frequency** | **String** | | [optional] |
|
10
10
|
| **drift_threshold** | **Float** | | [optional] |
|
11
|
-
| **preferred_currency** |
|
11
|
+
| **preferred_currency** | **Currency** | | [optional] |
|
12
12
|
|
13
13
|
## Example
|
14
14
|
|
data/docs/Position.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **symbol** |
|
7
|
+
| **symbol** | **PositionSymbol** | | [optional] |
|
8
8
|
| **units** | **Float** | | [optional] |
|
9
9
|
| **price** | **Float** | Last known market price for the symbol | [optional] |
|
10
10
|
| **open_pnl** | **Float** | | [optional] |
|
data/docs/PositionSymbol.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
8
|
| **description** | **String** | | [optional] |
|
9
|
-
| **symbol** |
|
9
|
+
| **symbol** | **UniversalSymbol** | | [optional] |
|
10
10
|
| **local_id** | **String** | | [optional] |
|
11
11
|
| **is_quotable** | **Boolean** | | [optional] |
|
12
12
|
| **is_tradable** | **Boolean** | | [optional] |
|