snaptrade 1.16.3 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- 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/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/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/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/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/api_client_custom.rb +1 -1
- 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 +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11e9f2aea1f755578213104aa1cc126b653d6292c05c7e3e6288bebcfc8da73b
|
4
|
+
data.tar.gz: b0940810de615ff56c4ef53edb152743c36b48d7a9e1a6ba9f7d2d242322a80c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88953372bdf7e1b38de4a9e3bfdffe2b3cebdd3967afc8f60292fc5ab451ab79429c16dbbbbdae0eb378acded553ffb3551149fa078416ed1cc128bb9a0dd1d8
|
7
|
+
data.tar.gz: ea4851e753695c173cbb9a9779334d3137b38c676388358d82015961c4d7d2852c7debf02cf33f24c1b801b0c8e9230c7742c780c2e2c9785bb3652b96040cbe
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@ For more information, please visit [https://snaptrade.com/](https://snaptrade.co
|
|
9
9
|
Add to Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem 'snaptrade', '~> 1.
|
12
|
+
gem 'snaptrade', '~> 1.17.1'
|
13
13
|
```
|
14
14
|
|
15
15
|
## Getting Started
|
@@ -27,10 +27,10 @@ brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
|
|
27
27
|
begin
|
28
28
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
29
29
|
result = SnapTrade::AccountInformation.get_all_user_holdings(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
user_id: user_id,
|
31
|
+
user_secret: user_secret,
|
32
|
+
brokerage_authorizations: brokerage_authorizations,
|
33
|
+
)
|
34
34
|
p result
|
35
35
|
rescue SnapTrade::ApiError => e
|
36
36
|
puts "Exception when calling SnapTrade::AccountInformation.get_all_user_holdings: #{e}"
|
data/docs/AccountHoldings.md
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **account** |
|
7
|
+
| **account** | **SnapTradeHoldingsAccount** | | [optional] |
|
8
8
|
| **balances** | [**Array<Balance>**](Balance.md) | | [optional] |
|
9
9
|
| **positions** | [**Array<Position>**](Position.md) | | [optional] |
|
10
|
-
| **total_value** |
|
10
|
+
| **total_value** | **SnapTradeHoldingsTotalValue** | | [optional] |
|
11
11
|
|
12
12
|
## Example
|
13
13
|
|
@@ -4,11 +4,11 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **account** |
|
7
|
+
| **account** | **SnapTradeHoldingsAccountAccountId** | | [optional] |
|
8
8
|
| **balances** | [**Array<Balance>**](Balance.md) | | [optional] |
|
9
9
|
| **positions** | [**Array<Position>**](Position.md) | | [optional] |
|
10
10
|
| **orders** | [**Array<AccountOrderRecord>**](AccountOrderRecord.md) | | [optional] |
|
11
|
-
| **total_value** |
|
11
|
+
| **total_value** | **SnapTradeHoldingsTotalValue** | | [optional] |
|
12
12
|
|
13
13
|
## Example
|
14
14
|
|
@@ -32,10 +32,10 @@ brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
|
|
32
32
|
begin
|
33
33
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
34
34
|
result = SnapTrade::AccountInformation.get_all_user_holdings(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
user_id: user_id,
|
36
|
+
user_secret: user_secret,
|
37
|
+
brokerage_authorizations: brokerage_authorizations,
|
38
|
+
)
|
39
39
|
p result
|
40
40
|
rescue SnapTrade::ApiError => e
|
41
41
|
puts "Exception when calling SnapTrade::AccountInformation.get_all_user_holdings: #{e}"
|
@@ -54,10 +54,10 @@ brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
|
|
54
54
|
begin
|
55
55
|
# List all accounts for the user, plus balances, positions, and orders for each account.
|
56
56
|
data, status_code, headers, response = SnapTrade::AccountInformation.get_all_user_holdings_with_http_info(
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
user_id: user_id,
|
58
|
+
user_secret: user_secret,
|
59
|
+
brokerage_authorizations: brokerage_authorizations,
|
60
|
+
)
|
61
61
|
p status_code # => 2xx
|
62
62
|
p headers # => { ... }
|
63
63
|
p data # => Array<AccountHoldings>
|
@@ -97,10 +97,10 @@ account_id = "accountId_example"
|
|
97
97
|
begin
|
98
98
|
# List account balances
|
99
99
|
result = SnapTrade::AccountInformation.get_user_account_balance(
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
user_id: user_id,
|
101
|
+
user_secret: user_secret,
|
102
|
+
account_id: account_id,
|
103
|
+
)
|
104
104
|
p result
|
105
105
|
rescue SnapTrade::ApiError => e
|
106
106
|
puts "Exception when calling SnapTrade::AccountInformation.get_user_account_balance: #{e}"
|
@@ -119,10 +119,10 @@ account_id = "accountId_example"
|
|
119
119
|
begin
|
120
120
|
# List account balances
|
121
121
|
data, status_code, headers, response = SnapTrade::AccountInformation.get_user_account_balance_with_http_info(
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
122
|
+
user_id: user_id,
|
123
|
+
user_secret: user_secret,
|
124
|
+
account_id: account_id,
|
125
|
+
)
|
126
126
|
p status_code # => 2xx
|
127
127
|
p headers # => { ... }
|
128
128
|
p data # => Array<Balance>
|
@@ -162,10 +162,10 @@ account_id = "accountId_example"
|
|
162
162
|
begin
|
163
163
|
# Return details of a specific investment account
|
164
164
|
result = SnapTrade::AccountInformation.get_user_account_details(
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
165
|
+
user_id: user_id,
|
166
|
+
user_secret: user_secret,
|
167
|
+
account_id: account_id,
|
168
|
+
)
|
169
169
|
p result
|
170
170
|
rescue SnapTrade::ApiError => e
|
171
171
|
puts "Exception when calling SnapTrade::AccountInformation.get_user_account_details: #{e}"
|
@@ -184,10 +184,10 @@ account_id = "accountId_example"
|
|
184
184
|
begin
|
185
185
|
# Return details of a specific investment account
|
186
186
|
data, status_code, headers, response = SnapTrade::AccountInformation.get_user_account_details_with_http_info(
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
187
|
+
user_id: user_id,
|
188
|
+
user_secret: user_secret,
|
189
|
+
account_id: account_id,
|
190
|
+
)
|
191
191
|
p status_code # => 2xx
|
192
192
|
p headers # => { ... }
|
193
193
|
p data # => Account
|
@@ -228,11 +228,11 @@ state = "all"
|
|
228
228
|
begin
|
229
229
|
# Get history of orders placed in account
|
230
230
|
result = SnapTrade::AccountInformation.get_user_account_orders(
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
231
|
+
user_id: user_id,
|
232
|
+
user_secret: user_secret,
|
233
|
+
account_id: account_id,
|
234
|
+
state: state,
|
235
|
+
)
|
236
236
|
p result
|
237
237
|
rescue SnapTrade::ApiError => e
|
238
238
|
puts "Exception when calling SnapTrade::AccountInformation.get_user_account_orders: #{e}"
|
@@ -252,11 +252,11 @@ state = "all"
|
|
252
252
|
begin
|
253
253
|
# Get history of orders placed in account
|
254
254
|
data, status_code, headers, response = SnapTrade::AccountInformation.get_user_account_orders_with_http_info(
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
255
|
+
user_id: user_id,
|
256
|
+
user_secret: user_secret,
|
257
|
+
account_id: account_id,
|
258
|
+
state: state,
|
259
|
+
)
|
260
260
|
p status_code # => 2xx
|
261
261
|
p headers # => { ... }
|
262
262
|
p data # => Array<AccountOrderRecord>
|
@@ -297,10 +297,10 @@ account_id = "accountId_example"
|
|
297
297
|
begin
|
298
298
|
# List account positions
|
299
299
|
result = SnapTrade::AccountInformation.get_user_account_positions(
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
300
|
+
user_id: user_id,
|
301
|
+
user_secret: user_secret,
|
302
|
+
account_id: account_id,
|
303
|
+
)
|
304
304
|
p result
|
305
305
|
rescue SnapTrade::ApiError => e
|
306
306
|
puts "Exception when calling SnapTrade::AccountInformation.get_user_account_positions: #{e}"
|
@@ -319,10 +319,10 @@ account_id = "accountId_example"
|
|
319
319
|
begin
|
320
320
|
# List account positions
|
321
321
|
data, status_code, headers, response = SnapTrade::AccountInformation.get_user_account_positions_with_http_info(
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
322
|
+
user_id: user_id,
|
323
|
+
user_secret: user_secret,
|
324
|
+
account_id: account_id,
|
325
|
+
)
|
326
326
|
p status_code # => 2xx
|
327
327
|
p headers # => { ... }
|
328
328
|
p data # => Array<Position>
|
@@ -362,10 +362,10 @@ user_secret = "USERSECRET123"
|
|
362
362
|
begin
|
363
363
|
# List balances, positions and orders for the specified account.
|
364
364
|
result = SnapTrade::AccountInformation.get_user_holdings(
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
365
|
+
account_id: account_id,
|
366
|
+
user_id: user_id,
|
367
|
+
user_secret: user_secret,
|
368
|
+
)
|
369
369
|
p result
|
370
370
|
rescue SnapTrade::ApiError => e
|
371
371
|
puts "Exception when calling SnapTrade::AccountInformation.get_user_holdings: #{e}"
|
@@ -384,10 +384,10 @@ user_secret = "USERSECRET123"
|
|
384
384
|
begin
|
385
385
|
# List balances, positions and orders for the specified account.
|
386
386
|
data, status_code, headers, response = SnapTrade::AccountInformation.get_user_holdings_with_http_info(
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
387
|
+
account_id: account_id,
|
388
|
+
user_id: user_id,
|
389
|
+
user_secret: user_secret,
|
390
|
+
)
|
391
391
|
p status_code # => 2xx
|
392
392
|
p headers # => { ... }
|
393
393
|
p data # => AccountHoldingsAccount
|
@@ -426,9 +426,9 @@ user_secret = "USERSECRET123"
|
|
426
426
|
begin
|
427
427
|
# List accounts
|
428
428
|
result = SnapTrade::AccountInformation.list_user_accounts(
|
429
|
-
|
430
|
-
|
431
|
-
|
429
|
+
user_id: user_id,
|
430
|
+
user_secret: user_secret,
|
431
|
+
)
|
432
432
|
p result
|
433
433
|
rescue SnapTrade::ApiError => e
|
434
434
|
puts "Exception when calling SnapTrade::AccountInformation.list_user_accounts: #{e}"
|
@@ -446,9 +446,9 @@ user_secret = "USERSECRET123"
|
|
446
446
|
begin
|
447
447
|
# List accounts
|
448
448
|
data, status_code, headers, response = SnapTrade::AccountInformation.list_user_accounts_with_http_info(
|
449
|
-
|
450
|
-
|
451
|
-
|
449
|
+
user_id: user_id,
|
450
|
+
user_secret: user_secret,
|
451
|
+
)
|
452
452
|
p status_code # => 2xx
|
453
453
|
p headers # => { ... }
|
454
454
|
p data # => Array<Account>
|
@@ -487,10 +487,10 @@ account_id = "accountId_example"
|
|
487
487
|
begin
|
488
488
|
# Update details of an investment account
|
489
489
|
result = SnapTrade::AccountInformation.update_user_account(
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
490
|
+
user_id: user_id,
|
491
|
+
user_secret: user_secret,
|
492
|
+
account_id: account_id,
|
493
|
+
)
|
494
494
|
p result
|
495
495
|
rescue SnapTrade::ApiError => e
|
496
496
|
puts "Exception when calling SnapTrade::AccountInformation.update_user_account: #{e}"
|
@@ -509,10 +509,10 @@ account_id = "accountId_example"
|
|
509
509
|
begin
|
510
510
|
# Update details of an investment account
|
511
511
|
data, status_code, headers, response = SnapTrade::AccountInformation.update_user_account_with_http_info(
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
512
|
+
user_id: user_id,
|
513
|
+
user_secret: user_secret,
|
514
|
+
account_id: account_id,
|
515
|
+
)
|
516
516
|
p status_code # => 2xx
|
517
517
|
p headers # => { ... }
|
518
518
|
p data # => Array<Account>
|
data/docs/AccountOrderRecord.md
CHANGED
@@ -7,8 +7,8 @@
|
|
7
7
|
| **brokerage_order_id** | **String** | Order id returned by brokerage | [optional] |
|
8
8
|
| **status** | [**AccountOrderRecordStatus**](AccountOrderRecordStatus.md) | | [optional] |
|
9
9
|
| **symbol** | **String** | | [optional] |
|
10
|
-
| **universal_symbol** |
|
11
|
-
| **option_symbol** |
|
10
|
+
| **universal_symbol** | **UniversalSymbol** | | [optional] |
|
11
|
+
| **option_symbol** | **OptionsSymbol** | | [optional] |
|
12
12
|
| **action** | [**Action**](Action.md) | | [optional] |
|
13
13
|
| **total_quantity** | **Float** | Trade Units | [optional] |
|
14
14
|
| **open_quantity** | **Float** | Trade Units | [optional] |
|
data/docs/AuthenticationApi.md
CHANGED
@@ -27,8 +27,8 @@ user_id = "John.doe@snaptrade.com"
|
|
27
27
|
begin
|
28
28
|
# Delete SnapTrade user
|
29
29
|
result = SnapTrade::Authentication.delete_snap_trade_user(
|
30
|
-
|
31
|
-
|
30
|
+
user_id: user_id,
|
31
|
+
)
|
32
32
|
p result
|
33
33
|
rescue SnapTrade::ApiError => e
|
34
34
|
puts "Exception when calling SnapTrade::Authentication.delete_snap_trade_user: #{e}"
|
@@ -45,8 +45,8 @@ user_id = "John.doe@snaptrade.com"
|
|
45
45
|
begin
|
46
46
|
# Delete SnapTrade user
|
47
47
|
data, status_code, headers, response = SnapTrade::Authentication.delete_snap_trade_user_with_http_info(
|
48
|
-
|
49
|
-
|
48
|
+
user_id: user_id,
|
49
|
+
)
|
50
50
|
p status_code # => 2xx
|
51
51
|
p headers # => { ... }
|
52
52
|
p data # => DeleteUserResponse
|
@@ -83,9 +83,9 @@ user_secret = "USERSECRET123"
|
|
83
83
|
begin
|
84
84
|
# Generate encrypted JWT token
|
85
85
|
result = SnapTrade::Authentication.get_user_jwt(
|
86
|
-
|
87
|
-
|
88
|
-
|
86
|
+
user_id: user_id,
|
87
|
+
user_secret: user_secret,
|
88
|
+
)
|
89
89
|
p result
|
90
90
|
rescue SnapTrade::ApiError => e
|
91
91
|
puts "Exception when calling SnapTrade::Authentication.get_user_jwt: #{e}"
|
@@ -103,9 +103,9 @@ user_secret = "USERSECRET123"
|
|
103
103
|
begin
|
104
104
|
# Generate encrypted JWT token
|
105
105
|
data, status_code, headers, response = SnapTrade::Authentication.get_user_jwt_with_http_info(
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
user_id: user_id,
|
107
|
+
user_secret: user_secret,
|
108
|
+
)
|
109
109
|
p status_code # => 2xx
|
110
110
|
p headers # => { ... }
|
111
111
|
p data # => EncryptedResponse
|
@@ -195,14 +195,14 @@ connection_type = "read"
|
|
195
195
|
begin
|
196
196
|
# Login user & generate connection link
|
197
197
|
result = SnapTrade::Authentication.login_snap_trade_user(
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
198
|
+
user_id: user_id,
|
199
|
+
user_secret: user_secret,
|
200
|
+
broker: broker,
|
201
|
+
immediate_redirect: immediate_redirect,
|
202
|
+
custom_redirect: custom_redirect,
|
203
|
+
reconnect: reconnect,
|
204
|
+
connection_type: connection_type,
|
205
|
+
)
|
206
206
|
p result
|
207
207
|
rescue SnapTrade::ApiError => e
|
208
208
|
puts "Exception when calling SnapTrade::Authentication.login_snap_trade_user: #{e}"
|
@@ -225,14 +225,14 @@ connection_type = "read"
|
|
225
225
|
begin
|
226
226
|
# Login user & generate connection link
|
227
227
|
data, status_code, headers, response = SnapTrade::Authentication.login_snap_trade_user_with_http_info(
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
228
|
+
user_id: user_id,
|
229
|
+
user_secret: user_secret,
|
230
|
+
broker: broker,
|
231
|
+
immediate_redirect: immediate_redirect,
|
232
|
+
custom_redirect: custom_redirect,
|
233
|
+
reconnect: reconnect,
|
234
|
+
connection_type: connection_type,
|
235
|
+
)
|
236
236
|
p status_code # => 2xx
|
237
237
|
p headers # => { ... }
|
238
238
|
p data # => AuthenticationLoginSnapTradeUser200Response
|
@@ -271,9 +271,9 @@ rsa_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcp
|
|
271
271
|
begin
|
272
272
|
# Create SnapTrade user
|
273
273
|
result = SnapTrade::Authentication.register_snap_trade_user(
|
274
|
-
|
275
|
-
|
276
|
-
|
274
|
+
user_id: user_id,
|
275
|
+
rsa_public_key: rsa_public_key,
|
276
|
+
)
|
277
277
|
p result
|
278
278
|
rescue SnapTrade::ApiError => e
|
279
279
|
puts "Exception when calling SnapTrade::Authentication.register_snap_trade_user: #{e}"
|
@@ -291,9 +291,9 @@ rsa_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcp
|
|
291
291
|
begin
|
292
292
|
# Create SnapTrade user
|
293
293
|
data, status_code, headers, response = SnapTrade::Authentication.register_snap_trade_user_with_http_info(
|
294
|
-
|
295
|
-
|
296
|
-
|
294
|
+
user_id: user_id,
|
295
|
+
rsa_public_key: rsa_public_key,
|
296
|
+
)
|
297
297
|
p status_code # => 2xx
|
298
298
|
p headers # => { ... }
|
299
299
|
p data # => UserIDandSecret
|
data/docs/Balance.md
CHANGED
data/docs/Brokerage.md
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
| **allows_trading_through_snaptrade_api** | **Boolean** | | [optional] |
|
21
21
|
| **is_scraping_integration** | **Boolean** | | [optional] |
|
22
22
|
| **default_currency** | **String** | | [optional] |
|
23
|
-
| **brokerage_type** |
|
23
|
+
| **brokerage_type** | **BrokerageType** | | [optional] |
|
24
24
|
| **exchanges** | **Array<Object>** | List of exchange ID supported by brokerage | [optional] |
|
25
25
|
|
26
26
|
## Example
|
@@ -7,7 +7,7 @@
|
|
7
7
|
| **id** | **String** | | [optional] |
|
8
8
|
| **created_date** | **String** | Time | [optional] |
|
9
9
|
| **updated_date** | **String** | Time | [optional] |
|
10
|
-
| **brokerage** |
|
10
|
+
| **brokerage** | **Brokerage** | | [optional] |
|
11
11
|
| **name** | **String** | Connection Name | [optional] |
|
12
12
|
| **type** | **String** | | [optional] |
|
13
13
|
| **disabled** | **Boolean** | | [optional] |
|
@@ -7,7 +7,7 @@
|
|
7
7
|
| **id** | **String** | | [optional] |
|
8
8
|
| **type** | [**BrokerageAuthorizationTypeReadOnlyType**](BrokerageAuthorizationTypeReadOnlyType.md) | | [optional] |
|
9
9
|
| **auth_type** | [**AuthType**](AuthType.md) | | [optional] |
|
10
|
-
| **brokerage** |
|
10
|
+
| **brokerage** | **BrokerageAuthorizationTypeReadOnlyBrokerage** | | [optional] |
|
11
11
|
|
12
12
|
## Example
|
13
13
|
|
data/docs/BrokerageSymbol.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | | [optional] |
|
8
8
|
| **symbol** | [**BrokerageSymbolSymbol**](BrokerageSymbolSymbol.md) | | [optional] |
|
9
|
-
| **brokerage_authorization** |
|
9
|
+
| **brokerage_authorization** | **BrokerageAuthorization** | | [optional] |
|
10
10
|
| **description** | **String** | | [optional] |
|
11
11
|
| **allows_fractional_units** | **Boolean** | | [optional] |
|
12
12
|
| **option_symbol** | [**BrokerageSymbolOptionSymbol**](BrokerageSymbolOptionSymbol.md) | | [optional] |
|
@@ -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
|
|
@@ -4,14 +4,14 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **id** | **String** | |
|
8
|
-
| **symbol** | **String** | |
|
9
|
-
| **raw_symbol** | **String** | |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **symbol** | **String** | | |
|
9
|
+
| **raw_symbol** | **String** | | |
|
10
10
|
| **description** | **String** | | [optional] |
|
11
|
-
| **currency** |
|
12
|
-
| **exchange** |
|
13
|
-
| **type** |
|
14
|
-
| **currencies** | [**Array<Currency>**](Currency.md) | |
|
11
|
+
| **currency** | **Currency** | | |
|
12
|
+
| **exchange** | **Exchange** | | [optional] |
|
13
|
+
| **type** | **SecurityType** | | |
|
14
|
+
| **currencies** | [**Array<Currency>**](Currency.md) | | |
|
15
15
|
|
16
16
|
## Example
|
17
17
|
|
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>
|