snaptrade 1.15.0 → 1.16.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 +2 -2
- data/docs/AccountInformationApi.md +4 -4
- data/docs/UniversalActivity.md +2 -0
- data/lib/snaptrade/api/account_information_api.rb +4 -4
- data/lib/snaptrade/models/universal_activity.rb +12 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +1 -1
- data/spec/models/universal_activity_spec.rb +6 -0
- 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: 66efbd22c5142befa0a2988eca9c54f59bba7beaf50b40cfa89a652666d98d1b
|
4
|
+
data.tar.gz: c477f1fc485265cf76abd8300fdf8bec60d9cae766e3ab05327c398bb235e688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f65cf6485c1403e25e03d7b63daff0773f04b41eae32310907d75a49bd0aa505d01e9b38597b6d8e1afbce416db1151125449f8af6c2568cfee68619a5af8c3
|
7
|
+
data.tar.gz: 27a214593021f3c1a4b6072889fca143dae46706a7845c750a1d6f7176a6c620eadc9a408581f08988d3bcbb628d22fc1cce98e1907f3636de8cebcfd5accc2c
|
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.16.0'
|
13
13
|
```
|
14
14
|
|
15
15
|
## Getting Started
|
@@ -46,7 +46,7 @@ Class | Method | HTTP request | Description
|
|
46
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
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
|
-
*SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get
|
49
|
+
*SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get history of orders placed in account
|
50
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
52
|
*SnapTrade::AccountInformationApi* | [**list_user_accounts**](docs/AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts
|
@@ -7,7 +7,7 @@ All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
7
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
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
|
-
| [**get_user_account_orders**](AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get
|
10
|
+
| [**get_user_account_orders**](AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get history of orders placed in account |
|
11
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
13
|
| [**list_user_accounts**](AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts |
|
@@ -210,7 +210,7 @@ end
|
|
210
210
|
|
211
211
|
## get_user_account_orders
|
212
212
|
|
213
|
-
Get
|
213
|
+
Get history of orders placed in account
|
214
214
|
|
215
215
|
### Example
|
216
216
|
|
@@ -226,7 +226,7 @@ account_id = "accountId_example"
|
|
226
226
|
state = "all"
|
227
227
|
|
228
228
|
begin
|
229
|
-
# Get
|
229
|
+
# Get history of orders placed in account
|
230
230
|
result = SnapTrade::AccountInformation.get_user_account_orders(
|
231
231
|
user_id: user_id,
|
232
232
|
user_secret: user_secret,
|
@@ -250,7 +250,7 @@ account_id = "accountId_example"
|
|
250
250
|
state = "all"
|
251
251
|
|
252
252
|
begin
|
253
|
-
# Get
|
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
255
|
user_id: user_id,
|
256
256
|
user_secret: user_secret,
|
data/docs/UniversalActivity.md
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
11
11
|
| **description** | **String** | | [optional] |
|
12
12
|
| **fee** | **Float** | | [optional] |
|
13
|
+
| **fx_rate** | **Float** | The forex conversion rate involved in the transaction if provided by the brokerage | [optional] |
|
13
14
|
| **institution** | **String** | | [optional] |
|
14
15
|
| **option_type** | **String** | If an option transaction, then it's type (BUY_TO_OPEN, SELL_TO_CLOSE, etc), otherwise empty string | [optional] |
|
15
16
|
| **price** | **Float** | | [optional] |
|
@@ -33,6 +34,7 @@ instance = SnapTrade::UniversalActivity.new(
|
|
33
34
|
currency: null,
|
34
35
|
description: WALT DISNEY UNIT DIST ON 21 SHS REC 12/31/21 PAY 01/06/22,
|
35
36
|
fee: 0,
|
37
|
+
fx_rate: 1.032,
|
36
38
|
institution: SnapTrade Investr,
|
37
39
|
option_type: BUY_TO_OPEN,
|
38
40
|
price: 0.4,
|
@@ -308,7 +308,7 @@ module SnapTrade
|
|
308
308
|
end
|
309
309
|
|
310
310
|
|
311
|
-
# Get
|
311
|
+
# Get history of orders placed in account
|
312
312
|
# @param user_id [String]
|
313
313
|
# @param user_secret [String]
|
314
314
|
# @param account_id [String] The ID of the account get positions.
|
@@ -321,7 +321,7 @@ module SnapTrade
|
|
321
321
|
data
|
322
322
|
end
|
323
323
|
|
324
|
-
# Get
|
324
|
+
# Get history of orders placed in account
|
325
325
|
# @param user_id [String]
|
326
326
|
# @param user_secret [String]
|
327
327
|
# @param account_id [String] The ID of the account get positions.
|
@@ -333,7 +333,7 @@ module SnapTrade
|
|
333
333
|
get_user_account_orders_with_http_info_impl(user_id, user_secret, account_id, extra)
|
334
334
|
end
|
335
335
|
|
336
|
-
# Get
|
336
|
+
# Get history of orders placed in account
|
337
337
|
# @param user_id [String]
|
338
338
|
# @param user_secret [String]
|
339
339
|
# @param account_id [String] The ID of the account get positions.
|
@@ -345,7 +345,7 @@ module SnapTrade
|
|
345
345
|
data
|
346
346
|
end
|
347
347
|
|
348
|
-
# Get
|
348
|
+
# Get history of orders placed in account
|
349
349
|
# @param user_id [String]
|
350
350
|
# @param user_secret [String]
|
351
351
|
# @param account_id [String] The ID of the account get positions.
|
@@ -26,6 +26,9 @@ module SnapTrade
|
|
26
26
|
|
27
27
|
attr_accessor :fee
|
28
28
|
|
29
|
+
# The forex conversion rate involved in the transaction if provided by the brokerage
|
30
|
+
attr_accessor :fx_rate
|
31
|
+
|
29
32
|
attr_accessor :institution
|
30
33
|
|
31
34
|
# If an option transaction, then it's type (BUY_TO_OPEN, SELL_TO_CLOSE, etc), otherwise empty string
|
@@ -59,6 +62,7 @@ module SnapTrade
|
|
59
62
|
:'currency' => :'currency',
|
60
63
|
:'description' => :'description',
|
61
64
|
:'fee' => :'fee',
|
65
|
+
:'fx_rate' => :'fx_rate',
|
62
66
|
:'institution' => :'institution',
|
63
67
|
:'option_type' => :'option_type',
|
64
68
|
:'price' => :'price',
|
@@ -86,6 +90,7 @@ module SnapTrade
|
|
86
90
|
:'currency' => :'Currency',
|
87
91
|
:'description' => :'String',
|
88
92
|
:'fee' => :'Float',
|
93
|
+
:'fx_rate' => :'Float',
|
89
94
|
:'institution' => :'String',
|
90
95
|
:'option_type' => :'String',
|
91
96
|
:'price' => :'Float',
|
@@ -103,6 +108,7 @@ module SnapTrade
|
|
103
108
|
def self.openapi_nullable
|
104
109
|
Set.new([
|
105
110
|
:'amount',
|
111
|
+
:'fx_rate',
|
106
112
|
:'external_reference_id',
|
107
113
|
:'trade_date',
|
108
114
|
])
|
@@ -147,6 +153,10 @@ module SnapTrade
|
|
147
153
|
self.fee = attributes[:'fee']
|
148
154
|
end
|
149
155
|
|
156
|
+
if attributes.key?(:'fx_rate')
|
157
|
+
self.fx_rate = attributes[:'fx_rate']
|
158
|
+
end
|
159
|
+
|
150
160
|
if attributes.key?(:'institution')
|
151
161
|
self.institution = attributes[:'institution']
|
152
162
|
end
|
@@ -212,6 +222,7 @@ module SnapTrade
|
|
212
222
|
currency == o.currency &&
|
213
223
|
description == o.description &&
|
214
224
|
fee == o.fee &&
|
225
|
+
fx_rate == o.fx_rate &&
|
215
226
|
institution == o.institution &&
|
216
227
|
option_type == o.option_type &&
|
217
228
|
price == o.price &&
|
@@ -233,7 +244,7 @@ module SnapTrade
|
|
233
244
|
# Calculates hash code according to all attributes.
|
234
245
|
# @return [Integer] Hash code
|
235
246
|
def hash
|
236
|
-
[id, account, amount, currency, description, fee, institution, option_type, price, settlement_date, external_reference_id, symbol, option_symbol, trade_date, type, units].hash
|
247
|
+
[id, account, amount, currency, description, fee, fx_rate, institution, option_type, price, settlement_date, external_reference_id, symbol, option_symbol, trade_date, type, units].hash
|
237
248
|
end
|
238
249
|
|
239
250
|
# Builds the object from hash
|
data/lib/snaptrade/version.rb
CHANGED
@@ -68,7 +68,7 @@ describe 'AccountInformationApi' do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
# unit tests for get_user_account_orders
|
71
|
-
# Get
|
71
|
+
# Get history of orders placed in account
|
72
72
|
# @param user_id
|
73
73
|
# @param user_secret
|
74
74
|
# @param account_id The ID of the account get positions.
|
@@ -57,6 +57,12 @@ describe SnapTrade::UniversalActivity do
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
describe 'test attribute "fx_rate"' do
|
61
|
+
it 'should work' do
|
62
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
60
66
|
describe 'test attribute "institution"' do
|
61
67
|
it 'should work' do
|
62
68
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.16.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-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|