snaptrade 1.9.0 → 1.11.0
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 +16 -16
- data/docs/AccountInformationApi.md +16 -16
- data/docs/AuthenticationApi.md +20 -20
- data/docs/OptionsApi.md +2 -2
- data/docs/ReferenceDataApi.md +20 -20
- data/lib/snaptrade/api/account_information_api.rb +16 -16
- data/lib/snaptrade/api/authentication_api.rb +20 -20
- data/lib/snaptrade/api/options_api.rb +3 -3
- data/lib/snaptrade/api/reference_data_api.rb +20 -20
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +4 -4
- data/spec/api/authentication_api_spec.rb +5 -5
- data/spec/api/options_api_spec.rb +1 -1
- data/spec/api/reference_data_api_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cedcc631a644ed26cc5bec004b166d8619bc18c35af5aa8d7cd847cc0a29bf60
|
4
|
+
data.tar.gz: c3747bef1d74929e1ca263aa6e935542019e4dea159541813a7e6b312f3c4d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e2ac1f322b9b0b2296711cbea419ebe4b4e61e34e884a623a71c50d3a903761a52bd8c666e09100725bb4bb59768d358edfabd12f979130dc0a5947edf09bbc
|
7
|
+
data.tar.gz: 709f8c2e95ea81a0d50c097ed9aa2f72fd61ccba913ffb0c7d3f850fc087d46314b678037094602a4808e29f10fa244a8a2c5d2fa69987959b2f6575a6e573ce
|
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.11.0'
|
13
13
|
```
|
14
14
|
|
15
15
|
## Getting Started
|
@@ -25,7 +25,7 @@ user_secret = "USERSECRET123"
|
|
25
25
|
brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
|
26
26
|
|
27
27
|
begin
|
28
|
-
# List all accounts for the user, plus balances and
|
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
30
|
user_id: user_id,
|
31
31
|
user_secret: user_secret,
|
@@ -43,20 +43,20 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
43
43
|
|
44
44
|
Class | Method | HTTP request | Description
|
45
45
|
------------ | ------------- | ------------- | -------------
|
46
|
-
*SnapTrade::AccountInformationApi* | [**get_all_user_holdings**](docs/AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances and
|
47
|
-
*SnapTrade::AccountInformationApi* | [**get_user_account_balance**](docs/AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances |
|
46
|
+
*SnapTrade::AccountInformationApi* | [**get_all_user_holdings**](docs/AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances, positions, and orders for each account.
|
47
|
+
*SnapTrade::AccountInformationApi* | [**get_user_account_balance**](docs/AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances | List account balances
|
48
48
|
*SnapTrade::AccountInformationApi* | [**get_user_account_details**](docs/AccountInformationApi.md#get_user_account_details) | **GET** /accounts/{accountId} | Return details of a specific investment account
|
49
49
|
*SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get all history of orders placed in account
|
50
|
-
*SnapTrade::AccountInformationApi* | [**get_user_account_positions**](docs/AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions |
|
50
|
+
*SnapTrade::AccountInformationApi* | [**get_user_account_positions**](docs/AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions | List account positions
|
51
51
|
*SnapTrade::AccountInformationApi* | [**get_user_holdings**](docs/AccountInformationApi.md#get_user_holdings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account.
|
52
|
-
*SnapTrade::AccountInformationApi* | [**list_user_accounts**](docs/AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List
|
52
|
+
*SnapTrade::AccountInformationApi* | [**list_user_accounts**](docs/AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts
|
53
53
|
*SnapTrade::AccountInformationApi* | [**update_user_account**](docs/AccountInformationApi.md#update_user_account) | **PUT** /accounts/{accountId} | Update details of an investment account
|
54
54
|
*SnapTrade::APIStatusApi* | [**check**](docs/APIStatusApi.md#check) | **GET** / | Get API Status
|
55
|
-
*SnapTrade::AuthenticationApi* | [**delete_snap_trade_user**](docs/AuthenticationApi.md#delete_snap_trade_user) | **DELETE** /snapTrade/deleteUser | Delete
|
56
|
-
*SnapTrade::AuthenticationApi* | [**get_user_jwt**](docs/AuthenticationApi.md#get_user_jwt) | **GET** /snapTrade/encryptedJWT |
|
57
|
-
*SnapTrade::AuthenticationApi* | [**list_snap_trade_users**](docs/AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers |
|
58
|
-
*SnapTrade::AuthenticationApi* | [**login_snap_trade_user**](docs/AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login |
|
59
|
-
*SnapTrade::AuthenticationApi* | [**register_snap_trade_user**](docs/AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser |
|
55
|
+
*SnapTrade::AuthenticationApi* | [**delete_snap_trade_user**](docs/AuthenticationApi.md#delete_snap_trade_user) | **DELETE** /snapTrade/deleteUser | Delete SnapTrade user
|
56
|
+
*SnapTrade::AuthenticationApi* | [**get_user_jwt**](docs/AuthenticationApi.md#get_user_jwt) | **GET** /snapTrade/encryptedJWT | Generate encrypted JWT token
|
57
|
+
*SnapTrade::AuthenticationApi* | [**list_snap_trade_users**](docs/AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers | List SnapTrade users
|
58
|
+
*SnapTrade::AuthenticationApi* | [**login_snap_trade_user**](docs/AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login | Login user & generate connection link
|
59
|
+
*SnapTrade::AuthenticationApi* | [**register_snap_trade_user**](docs/AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser | Create SnapTrade user
|
60
60
|
*SnapTrade::ConnectionsApi* | [**detail_brokerage_authorization**](docs/ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get detail of a specific brokerage authorizations for the user
|
61
61
|
*SnapTrade::ConnectionsApi* | [**list_brokerage_authorizations**](docs/ConnectionsApi.md#list_brokerage_authorizations) | **GET** /authorizations | List all brokerage authorizations for the user
|
62
62
|
*SnapTrade::ConnectionsApi* | [**remove_brokerage_authorization**](docs/ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} | Remove a brokerage authorization.
|
@@ -70,14 +70,14 @@ Class | Method | HTTP request | Description
|
|
70
70
|
*SnapTrade::ReferenceDataApi* | [**get_currency_exchange_rate_pair**](docs/ReferenceDataApi.md#get_currency_exchange_rate_pair) | **GET** /currencies/rates/{currencyPair} | Return the exchange rate of a currency pair
|
71
71
|
*SnapTrade::ReferenceDataApi* | [**get_partner_info**](docs/ReferenceDataApi.md#get_partner_info) | **GET** /snapTrade/partners | Get metadata related to Snaptrade partner
|
72
72
|
*SnapTrade::ReferenceDataApi* | [**get_security_types**](docs/ReferenceDataApi.md#get_security_types) | **GET** /securityTypes | List of all security types.
|
73
|
-
*SnapTrade::ReferenceDataApi* | [**get_stock_exchanges**](docs/ReferenceDataApi.md#get_stock_exchanges) | **GET** /exchanges |
|
73
|
+
*SnapTrade::ReferenceDataApi* | [**get_stock_exchanges**](docs/ReferenceDataApi.md#get_stock_exchanges) | **GET** /exchanges | List exchanges
|
74
74
|
*SnapTrade::ReferenceDataApi* | [**get_symbols**](docs/ReferenceDataApi.md#get_symbols) | **POST** /symbols | Search for symbols
|
75
75
|
*SnapTrade::ReferenceDataApi* | [**get_symbols_by_ticker**](docs/ReferenceDataApi.md#get_symbols_by_ticker) | **GET** /symbols/{ticker} | Get details of a symbol by the ticker
|
76
76
|
*SnapTrade::ReferenceDataApi* | [**list_all_brokerage_authorization_type**](docs/ReferenceDataApi.md#list_all_brokerage_authorization_type) | **GET** /brokerageAuthorizationTypes | List of all brokerage authorization types
|
77
|
-
*SnapTrade::ReferenceDataApi* | [**list_all_brokerages**](docs/ReferenceDataApi.md#list_all_brokerages) | **GET** /brokerages | List
|
78
|
-
*SnapTrade::ReferenceDataApi* | [**list_all_currencies**](docs/ReferenceDataApi.md#list_all_currencies) | **GET** /currencies | List
|
79
|
-
*SnapTrade::ReferenceDataApi* | [**list_all_currencies_rates**](docs/ReferenceDataApi.md#list_all_currencies_rates) | **GET** /currencies/rates |
|
80
|
-
*SnapTrade::ReferenceDataApi* | [**symbol_search_user_account**](docs/ReferenceDataApi.md#symbol_search_user_account) | **POST** /accounts/{accountId}/symbols | Search for symbols
|
77
|
+
*SnapTrade::ReferenceDataApi* | [**list_all_brokerages**](docs/ReferenceDataApi.md#list_all_brokerages) | **GET** /brokerages | List brokerages
|
78
|
+
*SnapTrade::ReferenceDataApi* | [**list_all_currencies**](docs/ReferenceDataApi.md#list_all_currencies) | **GET** /currencies | List currencies
|
79
|
+
*SnapTrade::ReferenceDataApi* | [**list_all_currencies_rates**](docs/ReferenceDataApi.md#list_all_currencies_rates) | **GET** /currencies/rates | List currency exchange rates
|
80
|
+
*SnapTrade::ReferenceDataApi* | [**symbol_search_user_account**](docs/ReferenceDataApi.md#symbol_search_user_account) | **POST** /accounts/{accountId}/symbols | Search for symbols available in an account
|
81
81
|
*SnapTrade::TradingApi* | [**cancel_user_account_order**](docs/TradingApi.md#cancel_user_account_order) | **POST** /accounts/{accountId}/orders/cancel | Cancel open order in account
|
82
82
|
*SnapTrade::TradingApi* | [**get_order_impact**](docs/TradingApi.md#get_order_impact) | **POST** /trade/impact | Check impact of trades on account.
|
83
83
|
*SnapTrade::TradingApi* | [**get_user_account_quotes**](docs/TradingApi.md#get_user_account_quotes) | **GET** /accounts/{accountId}/quotes | Get symbol quotes
|
@@ -4,18 +4,18 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**get_all_user_holdings**](AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances and
|
8
|
-
| [**get_user_account_balance**](AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances |
|
7
|
+
| [**get_all_user_holdings**](AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances, positions, and orders for each account. |
|
8
|
+
| [**get_user_account_balance**](AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances | List account balances |
|
9
9
|
| [**get_user_account_details**](AccountInformationApi.md#get_user_account_details) | **GET** /accounts/{accountId} | Return details of a specific investment account |
|
10
10
|
| [**get_user_account_orders**](AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get all history of orders placed in account |
|
11
|
-
| [**get_user_account_positions**](AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions |
|
11
|
+
| [**get_user_account_positions**](AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions | List account positions |
|
12
12
|
| [**get_user_holdings**](AccountInformationApi.md#get_user_holdings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account. |
|
13
|
-
| [**list_user_accounts**](AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List
|
13
|
+
| [**list_user_accounts**](AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts |
|
14
14
|
| [**update_user_account**](AccountInformationApi.md#update_user_account) | **PUT** /accounts/{accountId} | Update details of an investment account |
|
15
15
|
|
16
16
|
## get_all_user_holdings
|
17
17
|
|
18
|
-
List all accounts for the user, plus balances and
|
18
|
+
List all accounts for the user, plus balances, positions, and orders for each account.
|
19
19
|
|
20
20
|
### Example
|
21
21
|
|
@@ -30,7 +30,7 @@ user_secret = "USERSECRET123"
|
|
30
30
|
brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
|
31
31
|
|
32
32
|
begin
|
33
|
-
# List all accounts for the user, plus balances and
|
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
35
|
user_id: user_id,
|
36
36
|
user_secret: user_secret,
|
@@ -52,7 +52,7 @@ user_secret = "USERSECRET123"
|
|
52
52
|
brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
|
53
53
|
|
54
54
|
begin
|
55
|
-
# List all accounts for the user, plus balances and
|
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
57
|
user_id: user_id,
|
58
58
|
user_secret: user_secret,
|
@@ -80,7 +80,7 @@ end
|
|
80
80
|
|
81
81
|
## get_user_account_balance
|
82
82
|
|
83
|
-
|
83
|
+
List account balances
|
84
84
|
|
85
85
|
### Example
|
86
86
|
|
@@ -95,7 +95,7 @@ user_secret = "USERSECRET123"
|
|
95
95
|
account_id = "accountId_example"
|
96
96
|
|
97
97
|
begin
|
98
|
-
#
|
98
|
+
# List account balances
|
99
99
|
result = SnapTrade::AccountInformation.get_user_account_balance(
|
100
100
|
user_id: user_id,
|
101
101
|
user_secret: user_secret,
|
@@ -117,7 +117,7 @@ user_secret = "USERSECRET123"
|
|
117
117
|
account_id = "accountId_example"
|
118
118
|
|
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
122
|
user_id: user_id,
|
123
123
|
user_secret: user_secret,
|
@@ -280,7 +280,7 @@ end
|
|
280
280
|
|
281
281
|
## get_user_account_positions
|
282
282
|
|
283
|
-
|
283
|
+
List account positions
|
284
284
|
|
285
285
|
### Example
|
286
286
|
|
@@ -295,7 +295,7 @@ user_secret = "USERSECRET123"
|
|
295
295
|
account_id = "accountId_example"
|
296
296
|
|
297
297
|
begin
|
298
|
-
#
|
298
|
+
# List account positions
|
299
299
|
result = SnapTrade::AccountInformation.get_user_account_positions(
|
300
300
|
user_id: user_id,
|
301
301
|
user_secret: user_secret,
|
@@ -317,7 +317,7 @@ user_secret = "USERSECRET123"
|
|
317
317
|
account_id = "accountId_example"
|
318
318
|
|
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
322
|
user_id: user_id,
|
323
323
|
user_secret: user_secret,
|
@@ -410,7 +410,7 @@ end
|
|
410
410
|
|
411
411
|
## list_user_accounts
|
412
412
|
|
413
|
-
List
|
413
|
+
List accounts
|
414
414
|
|
415
415
|
### Example
|
416
416
|
|
@@ -424,7 +424,7 @@ user_id = "John.doe@snaptrade.com"
|
|
424
424
|
user_secret = "USERSECRET123"
|
425
425
|
|
426
426
|
begin
|
427
|
-
# List
|
427
|
+
# List accounts
|
428
428
|
result = SnapTrade::AccountInformation.list_user_accounts(
|
429
429
|
user_id: user_id,
|
430
430
|
user_secret: user_secret,
|
@@ -444,7 +444,7 @@ user_id = "John.doe@snaptrade.com"
|
|
444
444
|
user_secret = "USERSECRET123"
|
445
445
|
|
446
446
|
begin
|
447
|
-
# List
|
447
|
+
# List accounts
|
448
448
|
data, status_code, headers, response = SnapTrade::AccountInformation.list_user_accounts_with_http_info(
|
449
449
|
user_id: user_id,
|
450
450
|
user_secret: user_secret,
|
data/docs/AuthenticationApi.md
CHANGED
@@ -4,15 +4,15 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**delete_snap_trade_user**](AuthenticationApi.md#delete_snap_trade_user) | **DELETE** /snapTrade/deleteUser | Delete
|
8
|
-
| [**get_user_jwt**](AuthenticationApi.md#get_user_jwt) | **GET** /snapTrade/encryptedJWT |
|
9
|
-
| [**list_snap_trade_users**](AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers |
|
10
|
-
| [**login_snap_trade_user**](AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login |
|
11
|
-
| [**register_snap_trade_user**](AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser |
|
7
|
+
| [**delete_snap_trade_user**](AuthenticationApi.md#delete_snap_trade_user) | **DELETE** /snapTrade/deleteUser | Delete SnapTrade user |
|
8
|
+
| [**get_user_jwt**](AuthenticationApi.md#get_user_jwt) | **GET** /snapTrade/encryptedJWT | Generate encrypted JWT token |
|
9
|
+
| [**list_snap_trade_users**](AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers | List SnapTrade users |
|
10
|
+
| [**login_snap_trade_user**](AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login | Login user & generate connection link |
|
11
|
+
| [**register_snap_trade_user**](AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser | Create SnapTrade user |
|
12
12
|
|
13
13
|
## delete_snap_trade_user
|
14
14
|
|
15
|
-
Delete
|
15
|
+
Delete SnapTrade user
|
16
16
|
|
17
17
|
### Example
|
18
18
|
|
@@ -25,7 +25,7 @@ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
25
25
|
user_id = "John.doe@snaptrade.com"
|
26
26
|
|
27
27
|
begin
|
28
|
-
# Delete
|
28
|
+
# Delete SnapTrade user
|
29
29
|
result = SnapTrade::Authentication.delete_snap_trade_user(
|
30
30
|
user_id: user_id,
|
31
31
|
)
|
@@ -43,7 +43,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
43
43
|
user_id = "John.doe@snaptrade.com"
|
44
44
|
|
45
45
|
begin
|
46
|
-
# Delete
|
46
|
+
# Delete SnapTrade user
|
47
47
|
data, status_code, headers, response = SnapTrade::Authentication.delete_snap_trade_user_with_http_info(
|
48
48
|
user_id: user_id,
|
49
49
|
)
|
@@ -67,7 +67,7 @@ end
|
|
67
67
|
|
68
68
|
## get_user_jwt
|
69
69
|
|
70
|
-
|
70
|
+
Generate encrypted JWT token
|
71
71
|
|
72
72
|
### Example
|
73
73
|
|
@@ -81,7 +81,7 @@ user_id = "John.doe@snaptrade.com"
|
|
81
81
|
user_secret = "USERSECRET123"
|
82
82
|
|
83
83
|
begin
|
84
|
-
#
|
84
|
+
# Generate encrypted JWT token
|
85
85
|
result = SnapTrade::Authentication.get_user_jwt(
|
86
86
|
user_id: user_id,
|
87
87
|
user_secret: user_secret,
|
@@ -101,7 +101,7 @@ user_id = "John.doe@snaptrade.com"
|
|
101
101
|
user_secret = "USERSECRET123"
|
102
102
|
|
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
106
|
user_id: user_id,
|
107
107
|
user_secret: user_secret,
|
@@ -127,7 +127,7 @@ end
|
|
127
127
|
|
128
128
|
## list_snap_trade_users
|
129
129
|
|
130
|
-
|
130
|
+
List SnapTrade users
|
131
131
|
|
132
132
|
### Example
|
133
133
|
|
@@ -139,7 +139,7 @@ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
139
139
|
|
140
140
|
|
141
141
|
begin
|
142
|
-
#
|
142
|
+
# List SnapTrade users
|
143
143
|
result = SnapTrade::Authentication.list_snap_trade_users
|
144
144
|
p result
|
145
145
|
rescue SnapTrade::ApiError => e
|
@@ -154,7 +154,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
154
154
|
```ruby
|
155
155
|
|
156
156
|
begin
|
157
|
-
#
|
157
|
+
# List SnapTrade users
|
158
158
|
data, status_code, headers, response = SnapTrade::Authentication.list_snap_trade_users_with_http_info
|
159
159
|
p status_code # => 2xx
|
160
160
|
p headers # => { ... }
|
@@ -174,7 +174,7 @@ This endpoint does not need any parameter.
|
|
174
174
|
|
175
175
|
## login_snap_trade_user
|
176
176
|
|
177
|
-
|
177
|
+
Login user & generate connection link
|
178
178
|
|
179
179
|
### Example
|
180
180
|
|
@@ -193,7 +193,7 @@ reconnect = "8b5f262d-4bb9-365d-888a-202bd3b15fa1"
|
|
193
193
|
connection_type = "read"
|
194
194
|
|
195
195
|
begin
|
196
|
-
#
|
196
|
+
# Login user & generate connection link
|
197
197
|
result = SnapTrade::Authentication.login_snap_trade_user(
|
198
198
|
user_id: user_id,
|
199
199
|
user_secret: user_secret,
|
@@ -223,7 +223,7 @@ reconnect = "8b5f262d-4bb9-365d-888a-202bd3b15fa1"
|
|
223
223
|
connection_type = "read"
|
224
224
|
|
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
228
|
user_id: user_id,
|
229
229
|
user_secret: user_secret,
|
@@ -255,7 +255,7 @@ end
|
|
255
255
|
|
256
256
|
## register_snap_trade_user
|
257
257
|
|
258
|
-
|
258
|
+
Create SnapTrade user
|
259
259
|
|
260
260
|
### Example
|
261
261
|
|
@@ -269,7 +269,7 @@ user_id = "snaptrade-user-123"
|
|
269
269
|
rsa_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcpnkO3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1QWPdspTBKcxeFbccDw=="
|
270
270
|
|
271
271
|
begin
|
272
|
-
#
|
272
|
+
# Create SnapTrade user
|
273
273
|
result = SnapTrade::Authentication.register_snap_trade_user(
|
274
274
|
user_id: user_id,
|
275
275
|
rsa_public_key: rsa_public_key,
|
@@ -289,7 +289,7 @@ user_id = "snaptrade-user-123"
|
|
289
289
|
rsa_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcpnkO3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1QWPdspTBKcxeFbccDw=="
|
290
290
|
|
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
294
|
user_id: user_id,
|
295
295
|
rsa_public_key: rsa_public_key,
|
data/docs/OptionsApi.md
CHANGED
@@ -287,7 +287,7 @@ begin
|
|
287
287
|
)
|
288
288
|
p status_code # => 2xx
|
289
289
|
p headers # => { ... }
|
290
|
-
p data # => Array<
|
290
|
+
p data # => Array<OptionsPosition>
|
291
291
|
rescue SnapTrade::ApiError => e
|
292
292
|
puts "Exception when calling SnapTrade::Options.list_option_holdings: #{e}"
|
293
293
|
end
|
@@ -303,7 +303,7 @@ end
|
|
303
303
|
|
304
304
|
### Return type
|
305
305
|
|
306
|
-
[**Array<
|
306
|
+
[**Array<OptionsPosition>**](OptionsPosition.md)
|
307
307
|
|
308
308
|
## place_option_strategy
|
309
309
|
|
data/docs/ReferenceDataApi.md
CHANGED
@@ -7,14 +7,14 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
7
7
|
| [**get_currency_exchange_rate_pair**](ReferenceDataApi.md#get_currency_exchange_rate_pair) | **GET** /currencies/rates/{currencyPair} | Return the exchange rate of a currency pair |
|
8
8
|
| [**get_partner_info**](ReferenceDataApi.md#get_partner_info) | **GET** /snapTrade/partners | Get metadata related to Snaptrade partner |
|
9
9
|
| [**get_security_types**](ReferenceDataApi.md#get_security_types) | **GET** /securityTypes | List of all security types. |
|
10
|
-
| [**get_stock_exchanges**](ReferenceDataApi.md#get_stock_exchanges) | **GET** /exchanges |
|
10
|
+
| [**get_stock_exchanges**](ReferenceDataApi.md#get_stock_exchanges) | **GET** /exchanges | List exchanges |
|
11
11
|
| [**get_symbols**](ReferenceDataApi.md#get_symbols) | **POST** /symbols | Search for symbols |
|
12
12
|
| [**get_symbols_by_ticker**](ReferenceDataApi.md#get_symbols_by_ticker) | **GET** /symbols/{ticker} | Get details of a symbol by the ticker |
|
13
13
|
| [**list_all_brokerage_authorization_type**](ReferenceDataApi.md#list_all_brokerage_authorization_type) | **GET** /brokerageAuthorizationTypes | List of all brokerage authorization types |
|
14
|
-
| [**list_all_brokerages**](ReferenceDataApi.md#list_all_brokerages) | **GET** /brokerages | List
|
15
|
-
| [**list_all_currencies**](ReferenceDataApi.md#list_all_currencies) | **GET** /currencies | List
|
16
|
-
| [**list_all_currencies_rates**](ReferenceDataApi.md#list_all_currencies_rates) | **GET** /currencies/rates |
|
17
|
-
| [**symbol_search_user_account**](ReferenceDataApi.md#symbol_search_user_account) | **POST** /accounts/{accountId}/symbols | Search for symbols
|
14
|
+
| [**list_all_brokerages**](ReferenceDataApi.md#list_all_brokerages) | **GET** /brokerages | List brokerages |
|
15
|
+
| [**list_all_currencies**](ReferenceDataApi.md#list_all_currencies) | **GET** /currencies | List currencies |
|
16
|
+
| [**list_all_currencies_rates**](ReferenceDataApi.md#list_all_currencies_rates) | **GET** /currencies/rates | List currency exchange rates |
|
17
|
+
| [**symbol_search_user_account**](ReferenceDataApi.md#symbol_search_user_account) | **POST** /accounts/{accountId}/symbols | Search for symbols available in an account |
|
18
18
|
|
19
19
|
## get_currency_exchange_rate_pair
|
20
20
|
|
@@ -167,7 +167,7 @@ This endpoint does not need any parameter.
|
|
167
167
|
|
168
168
|
## get_stock_exchanges
|
169
169
|
|
170
|
-
|
170
|
+
List exchanges
|
171
171
|
|
172
172
|
### Example
|
173
173
|
|
@@ -179,7 +179,7 @@ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
179
179
|
|
180
180
|
|
181
181
|
begin
|
182
|
-
#
|
182
|
+
# List exchanges
|
183
183
|
result = SnapTrade::ReferenceData.get_stock_exchanges
|
184
184
|
p result
|
185
185
|
rescue SnapTrade::ApiError => e
|
@@ -194,7 +194,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
194
194
|
```ruby
|
195
195
|
|
196
196
|
begin
|
197
|
-
#
|
197
|
+
# List exchanges
|
198
198
|
data, status_code, headers, response = SnapTrade::ReferenceData.get_stock_exchanges_with_http_info
|
199
199
|
p status_code # => 2xx
|
200
200
|
p headers # => { ... }
|
@@ -384,7 +384,7 @@ end
|
|
384
384
|
|
385
385
|
## list_all_brokerages
|
386
386
|
|
387
|
-
List
|
387
|
+
List brokerages
|
388
388
|
|
389
389
|
### Example
|
390
390
|
|
@@ -396,7 +396,7 @@ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
396
396
|
|
397
397
|
|
398
398
|
begin
|
399
|
-
# List
|
399
|
+
# List brokerages
|
400
400
|
result = SnapTrade::ReferenceData.list_all_brokerages
|
401
401
|
p result
|
402
402
|
rescue SnapTrade::ApiError => e
|
@@ -411,7 +411,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
411
411
|
```ruby
|
412
412
|
|
413
413
|
begin
|
414
|
-
# List
|
414
|
+
# List brokerages
|
415
415
|
data, status_code, headers, response = SnapTrade::ReferenceData.list_all_brokerages_with_http_info
|
416
416
|
p status_code # => 2xx
|
417
417
|
p headers # => { ... }
|
@@ -431,7 +431,7 @@ This endpoint does not need any parameter.
|
|
431
431
|
|
432
432
|
## list_all_currencies
|
433
433
|
|
434
|
-
List
|
434
|
+
List currencies
|
435
435
|
|
436
436
|
### Example
|
437
437
|
|
@@ -443,7 +443,7 @@ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
443
443
|
|
444
444
|
|
445
445
|
begin
|
446
|
-
# List
|
446
|
+
# List currencies
|
447
447
|
result = SnapTrade::ReferenceData.list_all_currencies
|
448
448
|
p result
|
449
449
|
rescue SnapTrade::ApiError => e
|
@@ -458,7 +458,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
458
458
|
```ruby
|
459
459
|
|
460
460
|
begin
|
461
|
-
# List
|
461
|
+
# List currencies
|
462
462
|
data, status_code, headers, response = SnapTrade::ReferenceData.list_all_currencies_with_http_info
|
463
463
|
p status_code # => 2xx
|
464
464
|
p headers # => { ... }
|
@@ -478,7 +478,7 @@ This endpoint does not need any parameter.
|
|
478
478
|
|
479
479
|
## list_all_currencies_rates
|
480
480
|
|
481
|
-
|
481
|
+
List currency exchange rates
|
482
482
|
|
483
483
|
### Example
|
484
484
|
|
@@ -490,7 +490,7 @@ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
|
|
490
490
|
|
491
491
|
|
492
492
|
begin
|
493
|
-
#
|
493
|
+
# List currency exchange rates
|
494
494
|
result = SnapTrade::ReferenceData.list_all_currencies_rates
|
495
495
|
p result
|
496
496
|
rescue SnapTrade::ApiError => e
|
@@ -505,7 +505,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
505
505
|
```ruby
|
506
506
|
|
507
507
|
begin
|
508
|
-
#
|
508
|
+
# List currency exchange rates
|
509
509
|
data, status_code, headers, response = SnapTrade::ReferenceData.list_all_currencies_rates_with_http_info
|
510
510
|
p status_code # => 2xx
|
511
511
|
p headers # => { ... }
|
@@ -525,7 +525,7 @@ This endpoint does not need any parameter.
|
|
525
525
|
|
526
526
|
## symbol_search_user_account
|
527
527
|
|
528
|
-
Search for symbols
|
528
|
+
Search for symbols available in an account
|
529
529
|
|
530
530
|
### Example
|
531
531
|
|
@@ -541,7 +541,7 @@ account_id = "accountId_example"
|
|
541
541
|
substring = "apple"
|
542
542
|
|
543
543
|
begin
|
544
|
-
# Search for symbols
|
544
|
+
# Search for symbols available in an account
|
545
545
|
result = SnapTrade::ReferenceData.symbol_search_user_account(
|
546
546
|
user_id: user_id,
|
547
547
|
user_secret: user_secret,
|
@@ -565,7 +565,7 @@ account_id = "accountId_example"
|
|
565
565
|
substring = "apple"
|
566
566
|
|
567
567
|
begin
|
568
|
-
# Search for symbols
|
568
|
+
# Search for symbols available in an account
|
569
569
|
data, status_code, headers, response = SnapTrade::ReferenceData.symbol_search_user_account_with_http_info(
|
570
570
|
user_id: user_id,
|
571
571
|
user_secret: user_secret,
|
@@ -18,7 +18,7 @@ module SnapTrade
|
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
20
|
|
21
|
-
# List all accounts for the user, plus balances and
|
21
|
+
# List all accounts for the user, plus balances, positions, and orders for each account.
|
22
22
|
# @param user_id [String]
|
23
23
|
# @param user_secret [String]
|
24
24
|
# @param brokerage_authorizations [String] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
@@ -30,7 +30,7 @@ module SnapTrade
|
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
# List all accounts for the user, plus balances and
|
33
|
+
# List all accounts for the user, plus balances, positions, and orders for each account.
|
34
34
|
# @param user_id [String]
|
35
35
|
# @param user_secret [String]
|
36
36
|
# @param brokerage_authorizations [String] Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
|
@@ -41,7 +41,7 @@ module SnapTrade
|
|
41
41
|
get_all_user_holdings_with_http_info_impl(user_id, user_secret, extra)
|
42
42
|
end
|
43
43
|
|
44
|
-
# List all accounts for the user, plus balances and
|
44
|
+
# List all accounts for the user, plus balances, positions, and orders for each account.
|
45
45
|
# @param user_id [String]
|
46
46
|
# @param user_secret [String]
|
47
47
|
# @param [Hash] opts the optional parameters
|
@@ -52,7 +52,7 @@ module SnapTrade
|
|
52
52
|
data
|
53
53
|
end
|
54
54
|
|
55
|
-
# List all accounts for the user, plus balances and
|
55
|
+
# List all accounts for the user, plus balances, positions, and orders for each account.
|
56
56
|
# @param user_id [String]
|
57
57
|
# @param user_secret [String]
|
58
58
|
# @param [Hash] opts the optional parameters
|
@@ -114,7 +114,7 @@ module SnapTrade
|
|
114
114
|
end
|
115
115
|
|
116
116
|
|
117
|
-
#
|
117
|
+
# List account balances
|
118
118
|
# @param user_id [String]
|
119
119
|
# @param user_secret [String]
|
120
120
|
# @param account_id [String] The ID of the account get positions.
|
@@ -125,7 +125,7 @@ module SnapTrade
|
|
125
125
|
data
|
126
126
|
end
|
127
127
|
|
128
|
-
#
|
128
|
+
# List account balances
|
129
129
|
# @param user_id [String]
|
130
130
|
# @param user_secret [String]
|
131
131
|
# @param account_id [String] The ID of the account get positions.
|
@@ -135,7 +135,7 @@ module SnapTrade
|
|
135
135
|
get_user_account_balance_with_http_info_impl(user_id, user_secret, account_id, extra)
|
136
136
|
end
|
137
137
|
|
138
|
-
#
|
138
|
+
# List account balances
|
139
139
|
# @param user_id [String]
|
140
140
|
# @param user_secret [String]
|
141
141
|
# @param account_id [String] The ID of the account get positions.
|
@@ -146,7 +146,7 @@ module SnapTrade
|
|
146
146
|
data
|
147
147
|
end
|
148
148
|
|
149
|
-
#
|
149
|
+
# List account balances
|
150
150
|
# @param user_id [String]
|
151
151
|
# @param user_secret [String]
|
152
152
|
# @param account_id [String] The ID of the account get positions.
|
@@ -416,7 +416,7 @@ module SnapTrade
|
|
416
416
|
end
|
417
417
|
|
418
418
|
|
419
|
-
#
|
419
|
+
# List account positions
|
420
420
|
# @param user_id [String]
|
421
421
|
# @param user_secret [String]
|
422
422
|
# @param account_id [String] The ID of the account get positions.
|
@@ -427,7 +427,7 @@ module SnapTrade
|
|
427
427
|
data
|
428
428
|
end
|
429
429
|
|
430
|
-
#
|
430
|
+
# List account positions
|
431
431
|
# @param user_id [String]
|
432
432
|
# @param user_secret [String]
|
433
433
|
# @param account_id [String] The ID of the account get positions.
|
@@ -437,7 +437,7 @@ module SnapTrade
|
|
437
437
|
get_user_account_positions_with_http_info_impl(user_id, user_secret, account_id, extra)
|
438
438
|
end
|
439
439
|
|
440
|
-
#
|
440
|
+
# List account positions
|
441
441
|
# @param user_id [String]
|
442
442
|
# @param user_secret [String]
|
443
443
|
# @param account_id [String] The ID of the account get positions.
|
@@ -448,7 +448,7 @@ module SnapTrade
|
|
448
448
|
data
|
449
449
|
end
|
450
450
|
|
451
|
-
#
|
451
|
+
# List account positions
|
452
452
|
# @param user_id [String]
|
453
453
|
# @param user_secret [String]
|
454
454
|
# @param account_id [String] The ID of the account get positions.
|
@@ -610,7 +610,7 @@ module SnapTrade
|
|
610
610
|
end
|
611
611
|
|
612
612
|
|
613
|
-
# List
|
613
|
+
# List accounts
|
614
614
|
# @param user_id [String]
|
615
615
|
# @param user_secret [String]
|
616
616
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -620,7 +620,7 @@ module SnapTrade
|
|
620
620
|
data
|
621
621
|
end
|
622
622
|
|
623
|
-
# List
|
623
|
+
# List accounts
|
624
624
|
# @param user_id [String]
|
625
625
|
# @param user_secret [String]
|
626
626
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -629,7 +629,7 @@ module SnapTrade
|
|
629
629
|
list_user_accounts_with_http_info_impl(user_id, user_secret, extra)
|
630
630
|
end
|
631
631
|
|
632
|
-
# List
|
632
|
+
# List accounts
|
633
633
|
# @param user_id [String]
|
634
634
|
# @param user_secret [String]
|
635
635
|
# @param [Hash] opts the optional parameters
|
@@ -639,7 +639,7 @@ module SnapTrade
|
|
639
639
|
data
|
640
640
|
end
|
641
641
|
|
642
|
-
# List
|
642
|
+
# List accounts
|
643
643
|
# @param user_id [String]
|
644
644
|
# @param user_secret [String]
|
645
645
|
# @param [Hash] opts the optional parameters
|
@@ -18,7 +18,7 @@ module SnapTrade
|
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
20
|
|
21
|
-
# Delete
|
21
|
+
# Delete SnapTrade user
|
22
22
|
# @param user_id [String]
|
23
23
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
24
24
|
def delete_snap_trade_user(user_id:, extra: {})
|
@@ -27,7 +27,7 @@ module SnapTrade
|
|
27
27
|
data
|
28
28
|
end
|
29
29
|
|
30
|
-
# Delete
|
30
|
+
# Delete SnapTrade user
|
31
31
|
# @param user_id [String]
|
32
32
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
33
33
|
def delete_snap_trade_user_with_http_info(user_id:, extra: {})
|
@@ -35,7 +35,7 @@ module SnapTrade
|
|
35
35
|
delete_snap_trade_user_with_http_info_impl(user_id, extra)
|
36
36
|
end
|
37
37
|
|
38
|
-
# Delete
|
38
|
+
# Delete SnapTrade user
|
39
39
|
# @param user_id [String]
|
40
40
|
# @param [Hash] opts the optional parameters
|
41
41
|
# @return [DeleteUserResponse]
|
@@ -44,7 +44,7 @@ module SnapTrade
|
|
44
44
|
data
|
45
45
|
end
|
46
46
|
|
47
|
-
# Delete
|
47
|
+
# Delete SnapTrade user
|
48
48
|
# @param user_id [String]
|
49
49
|
# @param [Hash] opts the optional parameters
|
50
50
|
# @return [Array<(DeleteUserResponse, Integer, Hash)>] DeleteUserResponse data, response status code and response headers
|
@@ -98,7 +98,7 @@ module SnapTrade
|
|
98
98
|
end
|
99
99
|
|
100
100
|
|
101
|
-
#
|
101
|
+
# Generate encrypted JWT token
|
102
102
|
# @param user_id [String]
|
103
103
|
# @param user_secret [String]
|
104
104
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -108,7 +108,7 @@ module SnapTrade
|
|
108
108
|
data
|
109
109
|
end
|
110
110
|
|
111
|
-
#
|
111
|
+
# Generate encrypted JWT token
|
112
112
|
# @param user_id [String]
|
113
113
|
# @param user_secret [String]
|
114
114
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -117,7 +117,7 @@ module SnapTrade
|
|
117
117
|
get_user_jwt_with_http_info_impl(user_id, user_secret, extra)
|
118
118
|
end
|
119
119
|
|
120
|
-
#
|
120
|
+
# Generate encrypted JWT token
|
121
121
|
# @param user_id [String]
|
122
122
|
# @param user_secret [String]
|
123
123
|
# @param [Hash] opts the optional parameters
|
@@ -127,7 +127,7 @@ module SnapTrade
|
|
127
127
|
data
|
128
128
|
end
|
129
129
|
|
130
|
-
#
|
130
|
+
# Generate encrypted JWT token
|
131
131
|
# @param user_id [String]
|
132
132
|
# @param user_secret [String]
|
133
133
|
# @param [Hash] opts the optional parameters
|
@@ -187,7 +187,7 @@ module SnapTrade
|
|
187
187
|
end
|
188
188
|
|
189
189
|
|
190
|
-
#
|
190
|
+
# List SnapTrade users
|
191
191
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
192
192
|
def list_snap_trade_users(extra: {})
|
193
193
|
|
@@ -195,14 +195,14 @@ module SnapTrade
|
|
195
195
|
data
|
196
196
|
end
|
197
197
|
|
198
|
-
#
|
198
|
+
# List SnapTrade users
|
199
199
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
200
200
|
def list_snap_trade_users_with_http_info(extra: {})
|
201
201
|
|
202
202
|
list_snap_trade_users_with_http_info_impl(extra)
|
203
203
|
end
|
204
204
|
|
205
|
-
#
|
205
|
+
# List SnapTrade users
|
206
206
|
# @param [Hash] opts the optional parameters
|
207
207
|
# @return [Array<String>]
|
208
208
|
def list_snap_trade_users_impl(opts = {})
|
@@ -210,7 +210,7 @@ module SnapTrade
|
|
210
210
|
data
|
211
211
|
end
|
212
212
|
|
213
|
-
#
|
213
|
+
# List SnapTrade users
|
214
214
|
# @param [Hash] opts the optional parameters
|
215
215
|
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
216
216
|
def list_snap_trade_users_with_http_info_impl(opts = {})
|
@@ -258,7 +258,7 @@ module SnapTrade
|
|
258
258
|
end
|
259
259
|
|
260
260
|
|
261
|
-
#
|
261
|
+
# Login user & generate connection link
|
262
262
|
# @param user_id [String]
|
263
263
|
# @param user_secret [String]
|
264
264
|
# @param broker [String]
|
@@ -281,7 +281,7 @@ module SnapTrade
|
|
281
281
|
data
|
282
282
|
end
|
283
283
|
|
284
|
-
#
|
284
|
+
# Login user & generate connection link
|
285
285
|
# @param user_id [String]
|
286
286
|
# @param user_secret [String]
|
287
287
|
# @param broker [String]
|
@@ -303,7 +303,7 @@ module SnapTrade
|
|
303
303
|
login_snap_trade_user_with_http_info_impl(user_id, user_secret, extra)
|
304
304
|
end
|
305
305
|
|
306
|
-
#
|
306
|
+
# Login user & generate connection link
|
307
307
|
# @param user_id [String]
|
308
308
|
# @param user_secret [String]
|
309
309
|
# @param [Hash] opts the optional parameters
|
@@ -314,7 +314,7 @@ module SnapTrade
|
|
314
314
|
data
|
315
315
|
end
|
316
316
|
|
317
|
-
#
|
317
|
+
# Login user & generate connection link
|
318
318
|
# @param user_id [String]
|
319
319
|
# @param user_secret [String]
|
320
320
|
# @param [Hash] opts the optional parameters
|
@@ -380,7 +380,7 @@ module SnapTrade
|
|
380
380
|
end
|
381
381
|
|
382
382
|
|
383
|
-
#
|
383
|
+
# Create SnapTrade user
|
384
384
|
# @param user_id [String] SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it's unique to a user
|
385
385
|
# @param rsa_public_key [String] Open SSH RSA public key
|
386
386
|
# @param body [SnapTradeRegisterUserRequestBody]
|
@@ -395,7 +395,7 @@ module SnapTrade
|
|
395
395
|
data
|
396
396
|
end
|
397
397
|
|
398
|
-
#
|
398
|
+
# Create SnapTrade user
|
399
399
|
# @param user_id [String] SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it's unique to a user
|
400
400
|
# @param rsa_public_key [String] Open SSH RSA public key
|
401
401
|
# @param body [SnapTradeRegisterUserRequestBody]
|
@@ -409,7 +409,7 @@ module SnapTrade
|
|
409
409
|
register_snap_trade_user_with_http_info_impl(snap_trade_register_user_request_body, extra)
|
410
410
|
end
|
411
411
|
|
412
|
-
#
|
412
|
+
# Create SnapTrade user
|
413
413
|
# @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
|
414
414
|
# @param [Hash] opts the optional parameters
|
415
415
|
# @return [UserIDandSecret]
|
@@ -418,7 +418,7 @@ module SnapTrade
|
|
418
418
|
data
|
419
419
|
end
|
420
420
|
|
421
|
-
#
|
421
|
+
# Create SnapTrade user
|
422
422
|
# @param snap_trade_register_user_request_body [SnapTradeRegisterUserRequestBody]
|
423
423
|
# @param [Hash] opts the optional parameters
|
424
424
|
# @return [Array<(UserIDandSecret, Integer, Hash)>] UserIDandSecret data, response status code and response headers
|
@@ -381,7 +381,7 @@ module SnapTrade
|
|
381
381
|
# @param user_secret [String]
|
382
382
|
# @param account_id [String] The ID of the account get positions.
|
383
383
|
# @param [Hash] opts the optional parameters
|
384
|
-
# @return [Array<
|
384
|
+
# @return [Array<OptionsPosition>]
|
385
385
|
def list_option_holdings_impl(user_id, user_secret, account_id, opts = {})
|
386
386
|
data, _status_code, _headers = list_option_holdings_with_http_info(user_id, user_secret, account_id, opts)
|
387
387
|
data
|
@@ -392,7 +392,7 @@ module SnapTrade
|
|
392
392
|
# @param user_secret [String]
|
393
393
|
# @param account_id [String] The ID of the account get positions.
|
394
394
|
# @param [Hash] opts the optional parameters
|
395
|
-
# @return [Array<(Array<
|
395
|
+
# @return [Array<(Array<OptionsPosition>, Integer, Hash)>] Array<OptionsPosition> data, response status code and response headers
|
396
396
|
def list_option_holdings_with_http_info_impl(user_id, user_secret, account_id, opts = {})
|
397
397
|
if @api_client.config.debugging
|
398
398
|
@api_client.config.logger.debug 'Calling API: OptionsApi.list_option_holdings ...'
|
@@ -429,7 +429,7 @@ module SnapTrade
|
|
429
429
|
post_body = opts[:debug_body]
|
430
430
|
|
431
431
|
# return_type
|
432
|
-
return_type = opts[:debug_return_type] || 'Array<
|
432
|
+
return_type = opts[:debug_return_type] || 'Array<OptionsPosition>'
|
433
433
|
|
434
434
|
# auth_names
|
435
435
|
auth_names = opts[:debug_auth_names] || ['PartnerClientId', 'PartnerSignature', 'PartnerTimestamp']
|
@@ -239,7 +239,7 @@ module SnapTrade
|
|
239
239
|
end
|
240
240
|
|
241
241
|
|
242
|
-
#
|
242
|
+
# List exchanges
|
243
243
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
244
244
|
def get_stock_exchanges(extra: {})
|
245
245
|
|
@@ -247,14 +247,14 @@ module SnapTrade
|
|
247
247
|
data
|
248
248
|
end
|
249
249
|
|
250
|
-
#
|
250
|
+
# List exchanges
|
251
251
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
252
252
|
def get_stock_exchanges_with_http_info(extra: {})
|
253
253
|
|
254
254
|
get_stock_exchanges_with_http_info_impl(extra)
|
255
255
|
end
|
256
256
|
|
257
|
-
#
|
257
|
+
# List exchanges
|
258
258
|
# @param [Hash] opts the optional parameters
|
259
259
|
# @return [Array<Exchange>]
|
260
260
|
def get_stock_exchanges_impl(opts = {})
|
@@ -262,7 +262,7 @@ module SnapTrade
|
|
262
262
|
data
|
263
263
|
end
|
264
264
|
|
265
|
-
#
|
265
|
+
# List exchanges
|
266
266
|
# @param [Hash] opts the optional parameters
|
267
267
|
# @return [Array<(Array<Exchange>, Integer, Hash)>] Array<Exchange> data, response status code and response headers
|
268
268
|
def get_stock_exchanges_with_http_info_impl(opts = {})
|
@@ -562,7 +562,7 @@ module SnapTrade
|
|
562
562
|
end
|
563
563
|
|
564
564
|
|
565
|
-
# List
|
565
|
+
# List brokerages
|
566
566
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
567
567
|
def list_all_brokerages(extra: {})
|
568
568
|
|
@@ -570,14 +570,14 @@ module SnapTrade
|
|
570
570
|
data
|
571
571
|
end
|
572
572
|
|
573
|
-
# List
|
573
|
+
# List brokerages
|
574
574
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
575
575
|
def list_all_brokerages_with_http_info(extra: {})
|
576
576
|
|
577
577
|
list_all_brokerages_with_http_info_impl(extra)
|
578
578
|
end
|
579
579
|
|
580
|
-
# List
|
580
|
+
# List brokerages
|
581
581
|
# @param [Hash] opts the optional parameters
|
582
582
|
# @return [Array<Brokerage>]
|
583
583
|
def list_all_brokerages_impl(opts = {})
|
@@ -585,7 +585,7 @@ module SnapTrade
|
|
585
585
|
data
|
586
586
|
end
|
587
587
|
|
588
|
-
# List
|
588
|
+
# List brokerages
|
589
589
|
# @param [Hash] opts the optional parameters
|
590
590
|
# @return [Array<(Array<Brokerage>, Integer, Hash)>] Array<Brokerage> data, response status code and response headers
|
591
591
|
def list_all_brokerages_with_http_info_impl(opts = {})
|
@@ -633,7 +633,7 @@ module SnapTrade
|
|
633
633
|
end
|
634
634
|
|
635
635
|
|
636
|
-
# List
|
636
|
+
# List currencies
|
637
637
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
638
638
|
def list_all_currencies(extra: {})
|
639
639
|
|
@@ -641,14 +641,14 @@ module SnapTrade
|
|
641
641
|
data
|
642
642
|
end
|
643
643
|
|
644
|
-
# List
|
644
|
+
# List currencies
|
645
645
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
646
646
|
def list_all_currencies_with_http_info(extra: {})
|
647
647
|
|
648
648
|
list_all_currencies_with_http_info_impl(extra)
|
649
649
|
end
|
650
650
|
|
651
|
-
# List
|
651
|
+
# List currencies
|
652
652
|
# @param [Hash] opts the optional parameters
|
653
653
|
# @return [Array<Currency>]
|
654
654
|
def list_all_currencies_impl(opts = {})
|
@@ -656,7 +656,7 @@ module SnapTrade
|
|
656
656
|
data
|
657
657
|
end
|
658
658
|
|
659
|
-
# List
|
659
|
+
# List currencies
|
660
660
|
# @param [Hash] opts the optional parameters
|
661
661
|
# @return [Array<(Array<Currency>, Integer, Hash)>] Array<Currency> data, response status code and response headers
|
662
662
|
def list_all_currencies_with_http_info_impl(opts = {})
|
@@ -704,7 +704,7 @@ module SnapTrade
|
|
704
704
|
end
|
705
705
|
|
706
706
|
|
707
|
-
#
|
707
|
+
# List currency exchange rates
|
708
708
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
709
709
|
def list_all_currencies_rates(extra: {})
|
710
710
|
|
@@ -712,14 +712,14 @@ module SnapTrade
|
|
712
712
|
data
|
713
713
|
end
|
714
714
|
|
715
|
-
#
|
715
|
+
# List currency exchange rates
|
716
716
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
717
717
|
def list_all_currencies_rates_with_http_info(extra: {})
|
718
718
|
|
719
719
|
list_all_currencies_rates_with_http_info_impl(extra)
|
720
720
|
end
|
721
721
|
|
722
|
-
#
|
722
|
+
# List currency exchange rates
|
723
723
|
# @param [Hash] opts the optional parameters
|
724
724
|
# @return [Array<ExchangeRatePairs>]
|
725
725
|
def list_all_currencies_rates_impl(opts = {})
|
@@ -727,7 +727,7 @@ module SnapTrade
|
|
727
727
|
data
|
728
728
|
end
|
729
729
|
|
730
|
-
#
|
730
|
+
# List currency exchange rates
|
731
731
|
# @param [Hash] opts the optional parameters
|
732
732
|
# @return [Array<(Array<ExchangeRatePairs>, Integer, Hash)>] Array<ExchangeRatePairs> data, response status code and response headers
|
733
733
|
def list_all_currencies_rates_with_http_info_impl(opts = {})
|
@@ -775,7 +775,7 @@ module SnapTrade
|
|
775
775
|
end
|
776
776
|
|
777
777
|
|
778
|
-
# Search for symbols
|
778
|
+
# Search for symbols available in an account
|
779
779
|
# @param user_id [String]
|
780
780
|
# @param user_secret [String]
|
781
781
|
# @param account_id [String] The ID of the account get positions.
|
@@ -791,7 +791,7 @@ module SnapTrade
|
|
791
791
|
data
|
792
792
|
end
|
793
793
|
|
794
|
-
# Search for symbols
|
794
|
+
# Search for symbols available in an account
|
795
795
|
# @param user_id [String]
|
796
796
|
# @param user_secret [String]
|
797
797
|
# @param account_id [String] The ID of the account get positions.
|
@@ -806,7 +806,7 @@ module SnapTrade
|
|
806
806
|
symbol_search_user_account_with_http_info_impl(user_id, user_secret, account_id, extra)
|
807
807
|
end
|
808
808
|
|
809
|
-
# Search for symbols
|
809
|
+
# Search for symbols available in an account
|
810
810
|
# @param user_id [String]
|
811
811
|
# @param user_secret [String]
|
812
812
|
# @param account_id [String] The ID of the account get positions.
|
@@ -818,7 +818,7 @@ module SnapTrade
|
|
818
818
|
data
|
819
819
|
end
|
820
820
|
|
821
|
-
# Search for symbols
|
821
|
+
# Search for symbols available in an account
|
822
822
|
# @param user_id [String]
|
823
823
|
# @param user_secret [String]
|
824
824
|
# @param account_id [String] The ID of the account get positions.
|
data/lib/snaptrade/version.rb
CHANGED
@@ -29,7 +29,7 @@ describe 'AccountInformationApi' do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# unit tests for get_all_user_holdings
|
32
|
-
# List all accounts for the user, plus balances and
|
32
|
+
# List all accounts for the user, plus balances, positions, and orders for each account.
|
33
33
|
# @param user_id
|
34
34
|
# @param user_secret
|
35
35
|
# @param [Hash] opts the optional parameters
|
@@ -42,7 +42,7 @@ describe 'AccountInformationApi' do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# unit tests for get_user_account_balance
|
45
|
-
#
|
45
|
+
# List account balances
|
46
46
|
# @param user_id
|
47
47
|
# @param user_secret
|
48
48
|
# @param account_id The ID of the account get positions.
|
@@ -82,7 +82,7 @@ describe 'AccountInformationApi' do
|
|
82
82
|
end
|
83
83
|
|
84
84
|
# unit tests for get_user_account_positions
|
85
|
-
#
|
85
|
+
# List account positions
|
86
86
|
# @param user_id
|
87
87
|
# @param user_secret
|
88
88
|
# @param account_id The ID of the account get positions.
|
@@ -108,7 +108,7 @@ describe 'AccountInformationApi' do
|
|
108
108
|
end
|
109
109
|
|
110
110
|
# unit tests for list_user_accounts
|
111
|
-
# List
|
111
|
+
# List accounts
|
112
112
|
# @param user_id
|
113
113
|
# @param user_secret
|
114
114
|
# @param [Hash] opts the optional parameters
|
@@ -29,7 +29,7 @@ describe 'AuthenticationApi' do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# unit tests for delete_snap_trade_user
|
32
|
-
# Delete
|
32
|
+
# Delete SnapTrade user
|
33
33
|
# @param user_id
|
34
34
|
# @param [Hash] opts the optional parameters
|
35
35
|
# @return [DeleteUserResponse]
|
@@ -40,7 +40,7 @@ describe 'AuthenticationApi' do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# unit tests for get_user_jwt
|
43
|
-
#
|
43
|
+
# Generate encrypted JWT token
|
44
44
|
# @param user_id
|
45
45
|
# @param user_secret
|
46
46
|
# @param [Hash] opts the optional parameters
|
@@ -52,7 +52,7 @@ describe 'AuthenticationApi' do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# unit tests for list_snap_trade_users
|
55
|
-
#
|
55
|
+
# List SnapTrade users
|
56
56
|
# @param [Hash] opts the optional parameters
|
57
57
|
# @return [Array<String>]
|
58
58
|
describe 'list_snap_trade_users test' do
|
@@ -62,7 +62,7 @@ describe 'AuthenticationApi' do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
# unit tests for login_snap_trade_user
|
65
|
-
#
|
65
|
+
# Login user & generate connection link
|
66
66
|
# @param user_id
|
67
67
|
# @param user_secret
|
68
68
|
# @param [Hash] opts the optional parameters
|
@@ -75,7 +75,7 @@ describe 'AuthenticationApi' do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
# unit tests for register_snap_trade_user
|
78
|
-
#
|
78
|
+
# Create SnapTrade user
|
79
79
|
# @param snap_trade_register_user_request_body
|
80
80
|
# @param [Hash] opts the optional parameters
|
81
81
|
# @return [UserIDandSecret]
|
@@ -76,7 +76,7 @@ describe 'OptionsApi' do
|
|
76
76
|
# @param user_secret
|
77
77
|
# @param account_id The ID of the account get positions.
|
78
78
|
# @param [Hash] opts the optional parameters
|
79
|
-
# @return [Array<
|
79
|
+
# @return [Array<OptionsPosition>]
|
80
80
|
describe 'list_option_holdings test' do
|
81
81
|
it 'should work' do
|
82
82
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -60,7 +60,7 @@ describe 'ReferenceDataApi' do
|
|
60
60
|
end
|
61
61
|
|
62
62
|
# unit tests for get_stock_exchanges
|
63
|
-
#
|
63
|
+
# List exchanges
|
64
64
|
# @param [Hash] opts the optional parameters
|
65
65
|
# @return [Array<Exchange>]
|
66
66
|
describe 'get_stock_exchanges test' do
|
@@ -104,7 +104,7 @@ describe 'ReferenceDataApi' do
|
|
104
104
|
end
|
105
105
|
|
106
106
|
# unit tests for list_all_brokerages
|
107
|
-
# List
|
107
|
+
# List brokerages
|
108
108
|
# @param [Hash] opts the optional parameters
|
109
109
|
# @return [Array<Brokerage>]
|
110
110
|
describe 'list_all_brokerages test' do
|
@@ -114,7 +114,7 @@ describe 'ReferenceDataApi' do
|
|
114
114
|
end
|
115
115
|
|
116
116
|
# unit tests for list_all_currencies
|
117
|
-
# List
|
117
|
+
# List currencies
|
118
118
|
# @param [Hash] opts the optional parameters
|
119
119
|
# @return [Array<Currency>]
|
120
120
|
describe 'list_all_currencies test' do
|
@@ -124,7 +124,7 @@ describe 'ReferenceDataApi' do
|
|
124
124
|
end
|
125
125
|
|
126
126
|
# unit tests for list_all_currencies_rates
|
127
|
-
#
|
127
|
+
# List currency exchange rates
|
128
128
|
# @param [Hash] opts the optional parameters
|
129
129
|
# @return [Array<ExchangeRatePairs>]
|
130
130
|
describe 'list_all_currencies_rates test' do
|
@@ -134,7 +134,7 @@ describe 'ReferenceDataApi' do
|
|
134
134
|
end
|
135
135
|
|
136
136
|
# unit tests for symbol_search_user_account
|
137
|
-
# Search for symbols
|
137
|
+
# Search for symbols available in an account
|
138
138
|
# @param user_id
|
139
139
|
# @param user_secret
|
140
140
|
# @param account_id The ID of the account get positions.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snaptrade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SnapTrade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|