iex-ruby-client 1.3.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +21 -0
- data/README.md +202 -16
- data/RELEASING.md +3 -3
- data/UPGRADING.md +8 -0
- data/iex-ruby-client.gemspec +1 -1
- data/lib/iex/api/client.rb +5 -0
- data/lib/iex/api.rb +5 -0
- data/lib/iex/endpoints/balance_sheet.rb +13 -0
- data/lib/iex/endpoints/cash_flow.rb +13 -0
- data/lib/iex/endpoints/fx.rb +13 -0
- data/lib/iex/endpoints/historial_prices.rb +30 -0
- data/lib/iex/endpoints/key_stat.rb +14 -0
- data/lib/iex/endpoints/ref_data.rb +5 -0
- data/lib/iex/errors/invalid_symbols_list.rb +14 -0
- data/lib/iex/errors/stat_not_found_error.rb +13 -0
- data/lib/iex/errors.rb +3 -1
- data/lib/iex/resources/advanced_stats.rb +43 -1
- data/lib/iex/resources/balance_sheet.rb +60 -0
- data/lib/iex/resources/cash_flow.rb +43 -0
- data/lib/iex/resources/currency_rate.rb +9 -0
- data/lib/iex/resources/historical_prices.rb +31 -0
- data/lib/iex/resources/income.rb +2 -0
- data/lib/iex/resources/news.rb +3 -0
- data/lib/iex/resources/resource.rb +17 -1
- data/lib/iex/resources.rb +4 -0
- data/lib/iex/version.rb +1 -1
- data/lib/iex-ruby-client.rb +1 -1
- data/script/console +9 -0
- data/spec/fixtures/iex/balance_sheet/invalid.yml +50 -0
- data/spec/fixtures/iex/balance_sheet/msft.yml +56 -0
- data/spec/fixtures/iex/cash_flow/invalid.yml +50 -0
- data/spec/fixtures/iex/cash_flow/msft.yml +56 -0
- data/spec/fixtures/iex/fx/invalid.yml +83 -0
- data/spec/fixtures/iex/fx/latest.yml +85 -0
- data/spec/fixtures/iex/fx/latest_one_symbol.yml +85 -0
- data/spec/fixtures/iex/historical_prices/abcd.yml +56 -0
- data/spec/fixtures/iex/historical_prices/invalid.yml +50 -0
- data/spec/fixtures/iex/historical_prices/invalid_date.yml +50 -0
- data/spec/fixtures/iex/historical_prices/invalid_range.yml +47 -0
- data/spec/fixtures/iex/historical_prices/msft.yml +79 -0
- data/spec/fixtures/iex/historical_prices/msft_5d.yml +61 -0
- data/spec/fixtures/iex/historical_prices/msft_date_and_chart_by_day.yml +57 -0
- data/spec/fixtures/iex/historical_prices/msft_specific_date_trimmed.yml +445 -0
- data/spec/fixtures/iex/income/msft.yml +54 -51
- data/spec/fixtures/iex/key_stat/individual.yml +60 -0
- data/spec/fixtures/iex/key_stat/invalid_stat.yml +60 -0
- data/spec/fixtures/iex/key_stat/invalid_symbol.yml +50 -0
- data/spec/fixtures/iex/ref-data/exchange_symbols.yml +1926 -0
- data/spec/iex/endpoints/advanced_stats_spec.rb +56 -0
- data/spec/iex/endpoints/balance_sheet_spec.rb +80 -0
- data/spec/iex/endpoints/cash_flow_spec.rb +59 -0
- data/spec/iex/endpoints/fx_spec.rb +48 -0
- data/spec/iex/endpoints/historical_prices_spec.rb +206 -0
- data/spec/iex/endpoints/income_spec.rb +31 -29
- data/spec/iex/endpoints/key_stat_spec.rb +43 -0
- data/spec/iex/endpoints/news_spec.rb +3 -0
- data/spec/iex/endpoints/ref_data_spec.rb +44 -9
- data/spec/iex/resources/resource_spec.rb +36 -0
- metadata +68 -8
@@ -1,53 +1,56 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/MSFT/income?token=test-iex-api-publishable-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
Content-Type:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
User-Agent:
|
15
|
+
- IEX Ruby Client/1.3.1
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Sat, 07 Nov 2020 21:59:07 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- ctoken=88f9e21273b94c5683bb6f7214f0ad64; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 09:59:07 GMT
|
36
|
+
Iexcloud-Messages-Used:
|
37
|
+
- '1000'
|
38
|
+
Iexcloud-Premium-Messages-Used:
|
39
|
+
- '0'
|
40
|
+
X-Content-Type-Options:
|
41
|
+
- nosniff
|
42
|
+
Strict-Transport-Security:
|
43
|
+
- max-age=15768000
|
44
|
+
Access-Control-Allow-Origin:
|
45
|
+
- "*"
|
46
|
+
Access-Control-Allow-Credentials:
|
47
|
+
- 'true'
|
48
|
+
Access-Control-Allow-Methods:
|
49
|
+
- GET, OPTIONS
|
50
|
+
Access-Control-Allow-Headers:
|
51
|
+
- Origin, X-Requested-With, Content-Type, Accept, Request-Source
|
52
|
+
body:
|
53
|
+
encoding: ASCII-8BIT
|
54
|
+
string: '{"symbol":"MSFT","income":[{"reportDate":"2020-09-30","fiscalDate":"2020-09-30","currency":"USD","totalRevenue":37154000000,"costOfRevenue":11002000000,"grossProfit":26152000000,"researchAndDevelopment":4926000000,"sellingGeneralAndAdmin":5350000000,"operatingExpense":21278000000,"operatingIncome":15876000000,"otherIncomeExpenseNet":248000000,"ebit":15876000000,"interestIncome":589000000,"pretaxIncome":16124000000,"incomeTax":2231000000,"minorityInterest":0,"netIncome":13893000000,"netIncomeBasic":13893000000}]}'
|
55
|
+
recorded_at: Sat, 07 Nov 2020 21:59:07 GMT
|
56
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/VTI/stats/ttmDividendRate?token=test-iex-api-publishable-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
Content-Type:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
User-Agent:
|
15
|
+
- IEX Ruby Client/1.4.2
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Thu, 12 Aug 2021 20:04:24 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '18'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- ctoken=8df9fdfb440744638edd9bfdc8e0d27b; Max-Age=43200; Path=/; Expires=Fri,
|
35
|
+
13 Aug 2021 08:04:24 GMT
|
36
|
+
Iexcloud-Messages-Used:
|
37
|
+
- '2'
|
38
|
+
Iexcloud-Credits-Used:
|
39
|
+
- '2'
|
40
|
+
Iexcloud-Premium-Messages-Used:
|
41
|
+
- '0'
|
42
|
+
Iexcloud-Premium-Credits-Used:
|
43
|
+
- '0'
|
44
|
+
X-Content-Type-Options:
|
45
|
+
- nosniff
|
46
|
+
Strict-Transport-Security:
|
47
|
+
- max-age=15768000
|
48
|
+
Access-Control-Allow-Origin:
|
49
|
+
- "*"
|
50
|
+
Access-Control-Allow-Credentials:
|
51
|
+
- 'true'
|
52
|
+
Access-Control-Allow-Methods:
|
53
|
+
- GET, OPTIONS
|
54
|
+
Access-Control-Allow-Headers:
|
55
|
+
- Origin, X-Requested-With, Content-Type, Accept, Request-Source
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '2.7887693754001748'
|
59
|
+
recorded_at: Thu, 12 Aug 2021 20:04:24 GMT
|
60
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/VTI/stats/INVALID?token=test-iex-api-publishable-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
Content-Type:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
User-Agent:
|
15
|
+
- IEX Ruby Client/1.4.2
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 13 Aug 2021 17:45:21 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- ctoken=f9f32af4b36f4a1bac8e9b2ff9018275; Max-Age=43200; Path=/; Expires=Sat,
|
35
|
+
14 Aug 2021 05:45:21 GMT
|
36
|
+
Iexcloud-Messages-Used:
|
37
|
+
- '6'
|
38
|
+
Iexcloud-Credits-Used:
|
39
|
+
- '6'
|
40
|
+
Iexcloud-Premium-Messages-Used:
|
41
|
+
- '0'
|
42
|
+
Iexcloud-Premium-Credits-Used:
|
43
|
+
- '0'
|
44
|
+
X-Content-Type-Options:
|
45
|
+
- nosniff
|
46
|
+
Strict-Transport-Security:
|
47
|
+
- max-age=15768000
|
48
|
+
Access-Control-Allow-Origin:
|
49
|
+
- "*"
|
50
|
+
Access-Control-Allow-Credentials:
|
51
|
+
- 'true'
|
52
|
+
Access-Control-Allow-Methods:
|
53
|
+
- GET, OPTIONS
|
54
|
+
Access-Control-Allow-Headers:
|
55
|
+
- Origin, X-Requested-With, Content-Type, Accept, Request-Source
|
56
|
+
body:
|
57
|
+
encoding: ASCII-8BIT
|
58
|
+
string: '{"companyName":"Vanguard Group, Inc.","marketcap":260737447690,"week52high":230.02,"week52low":160.5,"week52highSplitAdjustOnly":230.02,"week52lowSplitAdjustOnly":162.85,"week52change":0.3645993202513256,"sharesOutstanding":1133542508,"float":0,"avg10Volume":2888645,"avg30Volume":3320395,"day200MovingAvg":213.89,"day50MovingAvg":225.73,"employees":0,"ttmEPS":0,"ttmDividendRate":2.788769375400175,"dividendYield":0.012124029977394032,"nextDividendDate":"","exDividendDate":"2021-06-24","nextEarningsDate":"","peRatio":0,"beta":1.0132372909433216,"maxChangePercent":3.578068183401369,"year5ChangePercent":1.249480952953752,"year2ChangePercent":0.6180018710916342,"year1ChangePercent":0.3635630717574918,"ytdChangePercent":0.1893429658290111,"month6ChangePercent":0.1156861042707178,"month3ChangePercent":0.10073637646122013,"month1ChangePercent":0.015496004591408763,"day30ChangePercent":0.021176470588235352,"day5ChangePercent":0.006255741720985197}'
|
59
|
+
recorded_at: Fri, 13 Aug 2021 17:45:21 GMT
|
60
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/INVALID/stats/ttmDividendRate?token=test-iex-api-publishable-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
Content-Type:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
User-Agent:
|
15
|
+
- IEX Ruby Client/1.4.2
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 404
|
21
|
+
message: Not Found
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 13 Aug 2021 17:45:20 GMT
|
27
|
+
Content-Type:
|
28
|
+
- text/html; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- ctoken=8e6f76d57e134a4ca1be468312f5f33c; Max-Age=43200; Path=/; Expires=Sat,
|
35
|
+
14 Aug 2021 05:45:20 GMT
|
36
|
+
Strict-Transport-Security:
|
37
|
+
- max-age=15768000
|
38
|
+
Access-Control-Allow-Origin:
|
39
|
+
- "*"
|
40
|
+
Access-Control-Allow-Credentials:
|
41
|
+
- 'true'
|
42
|
+
Access-Control-Allow-Methods:
|
43
|
+
- GET, OPTIONS
|
44
|
+
Access-Control-Allow-Headers:
|
45
|
+
- Origin, X-Requested-With, Content-Type, Accept, Request-Source
|
46
|
+
body:
|
47
|
+
encoding: ASCII-8BIT
|
48
|
+
string: Unknown symbol
|
49
|
+
recorded_at: Fri, 13 Aug 2021 17:45:20 GMT
|
50
|
+
recorded_with: VCR 6.0.0
|