iex-ruby-client 1.2.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env.sample +2 -0
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +0 -8
- data/CHANGELOG.md +27 -0
- data/Gemfile +1 -0
- data/README.md +237 -18
- data/RELEASING.md +3 -3
- data/lib/iex/api.rb +8 -1
- data/lib/iex/api/client.rb +15 -2
- data/lib/iex/api/config/client.rb +52 -0
- data/lib/iex/api/config/logger.rb +35 -0
- data/lib/iex/cloud/connection.rb +2 -1
- data/lib/iex/endpoints/advanced_stats.rb +11 -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 +6 -1
- data/lib/iex/errors.rb +3 -1
- data/lib/iex/errors/invalid_symbols_list.rb +14 -0
- data/lib/iex/errors/stat_not_found_error.rb +13 -0
- data/lib/iex/resources.rb +5 -0
- data/lib/iex/resources/advanced_stats.rb +84 -0
- 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 +12 -0
- data/lib/iex/version.rb +1 -1
- data/script/console +9 -0
- data/spec/fixtures/iex/advanced_stats/invalid.yml +50 -0
- data/spec/fixtures/iex/advanced_stats/msft.yml +57 -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/client_spec.rb +91 -13
- data/spec/iex/config/client_spec.rb +49 -0
- data/spec/iex/config/logger_spec.rb +46 -0
- data/spec/iex/endpoints/advanced_stats_spec.rb +110 -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 +57 -12
- data/spec/iex/resources/resource_spec.rb +36 -0
- data/spec/spec_helper.rb +3 -3
- metadata +78 -6
- data/lib/iex/api/config.rb +0 -47
- data/spec/iex/config_spec.rb +0 -22
@@ -0,0 +1,43 @@
|
|
1
|
+
module IEX
|
2
|
+
module Resources
|
3
|
+
class CashFlow < Resource
|
4
|
+
property 'report_date', from: 'reportDate'
|
5
|
+
property 'fiscal_date', from: 'fiscalDate'
|
6
|
+
property 'currency'
|
7
|
+
property 'net_income', from: 'netIncome'
|
8
|
+
property 'net_income_dollar', from: 'netIncome', with: ->(v) { to_dollar(amount: v) }
|
9
|
+
property 'depreciation'
|
10
|
+
property 'depreciation_dollar', from: 'depreciation', with: ->(v) { to_dollar(amount: v) }
|
11
|
+
property 'changes_in_receivables', from: 'changesInReceivables'
|
12
|
+
property 'changes_in_receivables_dollar', from: 'changesInReceivables', with: ->(v) { to_dollar(amount: v) }
|
13
|
+
property 'changes_in_inventories', from: 'changesInInventories'
|
14
|
+
property 'changes_in_inventories_dollar', from: 'changesInInventories', with: ->(v) { to_dollar(amount: v) }
|
15
|
+
property 'cash_change', from: 'cashChange'
|
16
|
+
property 'cash_change_dollar', from: 'cashChange', with: ->(v) { to_dollar(amount: v) }
|
17
|
+
property 'cash_flow', from: 'cashFlow'
|
18
|
+
property 'cash_flow_dollar', from: 'cashFlow', with: ->(v) { to_dollar(amount: v) }
|
19
|
+
property 'capital_expenditures', from: 'capitalExpenditures'
|
20
|
+
property 'capital_expenditures_dollar', from: 'capitalExpenditures', with: ->(v) { to_dollar(amount: v) }
|
21
|
+
property 'investments'
|
22
|
+
property 'investments_dollar', from: 'investments', with: ->(v) { to_dollar(amount: v) }
|
23
|
+
property 'investing_activity_other', from: 'investingActivityOther'
|
24
|
+
property 'investing_activity_other_dollar', from: 'investingActivityOther', with: ->(v) { to_dollar(amount: v) }
|
25
|
+
property 'total_investing_cash_flows', from: 'totalInvestingCashFlows'
|
26
|
+
property 'total_investing_cash_flows_dollar', from: 'totalInvestingCashFlows', with: ->(v) { to_dollar(amount: v) }
|
27
|
+
property 'dividends_paid', from: 'dividendsPaid'
|
28
|
+
property 'dividends_paid_dollar', from: 'dividendsPaid', with: ->(v) { to_dollar(amount: v) }
|
29
|
+
property 'net_borrowings', from: 'netBorrowings'
|
30
|
+
property 'net_borrowings_dollar', from: 'netBorrowings', with: ->(v) { to_dollar(amount: v) }
|
31
|
+
property 'other_financing_cash_flows', from: 'otherFinancingCashFlows'
|
32
|
+
property 'other_financing_cash_flows_dollar', from: 'otherFinancingCashFlows', with: ->(v) { to_dollar(amount: v) }
|
33
|
+
property 'cash_flow_financing', from: 'cashFlowFinancing'
|
34
|
+
property 'cash_flow_financing_dollar', from: 'cashFlowFinancing', with: ->(v) { to_dollar(amount: v) }
|
35
|
+
property 'exchange_rate_effect', from: 'exchangeRateEffect'
|
36
|
+
property 'exchange_rate_effect_dollar', from: 'exchangeRateEffect', with: ->(v) { to_dollar(amount: v) }
|
37
|
+
|
38
|
+
def initialize(data = {})
|
39
|
+
super
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module IEX
|
2
|
+
module Resources
|
3
|
+
class HistorialPrices < Resource
|
4
|
+
property 'date'
|
5
|
+
property 'open'
|
6
|
+
property 'open_dollar', from: 'open', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
7
|
+
property 'close'
|
8
|
+
property 'close_dollar', from: 'close', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
9
|
+
property 'high'
|
10
|
+
property 'high_dollar', from: 'high', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
11
|
+
property 'low'
|
12
|
+
property 'low_dollar', from: 'low', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
13
|
+
property 'volume'
|
14
|
+
property 'u_open', from: 'uOpen'
|
15
|
+
property 'u_open_dollar', from: 'uOpen', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
16
|
+
property 'u_close', from: 'uClose'
|
17
|
+
property 'u_close_dollar', from: 'uClose', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
18
|
+
property 'u_low', from: 'uLow'
|
19
|
+
property 'u_low_dollar', from: 'uLow', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
20
|
+
property 'u_high', from: 'uHigh'
|
21
|
+
property 'u_high_dollar', from: 'uHigh', with: ->(v) { to_dollar(amount: v, ignore_cents: false) }
|
22
|
+
property 'u_volume', from: 'uVolume'
|
23
|
+
property 'change'
|
24
|
+
property 'change_percent', from: 'changePercent'
|
25
|
+
property 'change_percent_s', from: 'changePercent', with: ->(v) { percentage_to_string(v) }
|
26
|
+
property 'label'
|
27
|
+
property 'change_over_time', from: 'changeOverTime'
|
28
|
+
property 'change_over_time_s', from: 'changeOverTime', with: ->(v) { percentage_to_string(v) }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/iex/resources/income.rb
CHANGED
@@ -2,6 +2,8 @@ module IEX
|
|
2
2
|
module Resources
|
3
3
|
class Income < Resource
|
4
4
|
property 'report_date', from: 'reportDate'
|
5
|
+
property 'fiscal_date', from: 'fiscalDate'
|
6
|
+
property 'currency'
|
5
7
|
property 'total_revenue', from: 'totalRevenue'
|
6
8
|
property 'total_revenue_dollar', from: 'totalRevenue', with: ->(v) { to_dollar(amount: v) }
|
7
9
|
property 'cost_of_revenue', from: 'costOfRevenue'
|
data/lib/iex/resources/news.rb
CHANGED
@@ -6,7 +6,10 @@ module IEX
|
|
6
6
|
property 'source'
|
7
7
|
property 'url'
|
8
8
|
property 'summary'
|
9
|
+
property 'image'
|
9
10
|
property 'related', transform_with: ->(v) { v.split(',') if v.is_a?(String) }
|
11
|
+
property 'paywalled', from: 'hasPaywall'
|
12
|
+
property 'language', from: 'lang'
|
10
13
|
end
|
11
14
|
end
|
12
15
|
end
|
@@ -14,6 +14,18 @@ module IEX
|
|
14
14
|
].join
|
15
15
|
end
|
16
16
|
|
17
|
+
# Useful for values that are already a percent but we want to convert into a 2 decimal place string
|
18
|
+
def self.percentage_to_string(float_percent)
|
19
|
+
return unless float_percent.is_a? Numeric
|
20
|
+
return '+0.00%' if float_percent.zero?
|
21
|
+
|
22
|
+
[
|
23
|
+
float_percent.positive? ? '+' : '',
|
24
|
+
format('%.2f', float_percent),
|
25
|
+
'%'
|
26
|
+
].join
|
27
|
+
end
|
28
|
+
|
17
29
|
def self.to_dollar(amount:, ignore_cents: true)
|
18
30
|
MoneyHelper.money_to_text(amount, 'USD', nil, no_cents: ignore_cents)
|
19
31
|
end
|
data/lib/iex/version.rb
CHANGED
data/script/console
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/INVALID/advanced-stats?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.2.1
|
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
|
+
- Tue, 20 Oct 2020 23:57:05 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=aa7b4e3cbfee43e0a6d8075ad7d24f32; Max-Age=43200; Path=/; Expires=Wed,
|
35
|
+
21 Oct 2020 11:57:05 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: Tue, 20 Oct 2020 23:57:05 GMT
|
50
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/MSFT/advanced-stats?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.2.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
|
+
- Tue, 20 Oct 2020 23:57:04 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=767762d0898c40be8baf5aaf659ee42b; Max-Age=43200; Path=/; Expires=Wed,
|
35
|
+
21 Oct 2020 11:57:04 GMT
|
36
|
+
Iexcloud-Messages-Used:
|
37
|
+
- '3005'
|
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: '{"week52change":0.533539,"week52high":232.86,"week52low":132.52,"marketcap":1621141983000,"employees":163000,"day200MovingAvg":187.72,"day50MovingAvg":212.09,"float":7454581741,"avg10Volume":26989991,"avg30Volume":31404571.1,"ttmEPS":5.8207,"ttmDividendRate":2.04,"companyName":"Microsoft
|
55
|
+
Corp.","sharesOutstanding":7567650000,"maxChangePercent":7.1248,"year5ChangePercent":3.3093,"year2ChangePercent":1.0108,"year1ChangePercent":0.572482,"ytdChangePercent":0.367576,"month6ChangePercent":0.229899,"month3ChangePercent":0.082709,"month1ChangePercent":0.082549,"day30ChangePercent":0.025251,"day5ChangePercent":-0.007859,"nextDividendDate":"2020-11-18","dividendYield":0.009522920362244423,"nextEarningsDate":"2020-10-27","exDividendDate":"2020-08-19","peRatio":36.88,"beta":1.1472751624864646,"totalCash":136527000000,"currentDebt":5905000000,"revenue":143015000000,"grossProfit":96937000000,"totalRevenue":143015000000,"EBITDA":65259000000,"revenuePerShare":18.9,"revenuePerEmployee":877392.64,"debtToEquity":0.69,"profitMargin":0.3096248645247002,"enterpriseValue":1607892999000,"enterpriseValueToRevenue":11.24,"priceToSales":11.62,"priceToBook":13.703188252299162,"forwardPERatio":null,"pegRatio":5.6,"peHigh":40.49739130434783,"peLow":23.046956521739133,"week52highDate":"2020-09-02","week52lowDate":"2020-03-23","putCallRatio":0.36251766583920975}'
|
56
|
+
recorded_at: Tue, 20 Oct 2020 23:57:04 GMT
|
57
|
+
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/balance-sheet?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: 404
|
21
|
+
message: Not Found
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Sat, 07 Nov 2020 17:58:55 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=0250f7135874468e9c6d193d526f671f; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 05:58:55 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: Sat, 07 Nov 2020 17:58:55 GMT
|
50
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/MSFT/balance-sheet?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 17:58:54 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=3f205ff8735442119f697085c8de5813; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 05:58:54 GMT
|
36
|
+
Iexcloud-Messages-Used:
|
37
|
+
- '3000'
|
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","balancesheet":[{"reportDate":"2020-09-30","fiscalDate":"2020-09-30","currency":"USD","currentCash":17205000000,"shortTermInvestments":120772000000,"receivables":22851000000,"inventory":2705000000,"otherCurrentAssets":13544000000,"currentAssets":177077000000,"longTermInvestments":3196000000,"propertyPlantEquipment":56974000000,"goodwill":43890000000,"intangibleAssets":6923000000,"otherAssets":12941000000,"totalAssets":301001000000,"accountsPayable":12509000000,"currentLongTermDebt":7093000000,"otherCurrentLiabilities":46326000000,"totalCurrentLiabilities":70056000000,"longTermDebt":74379000000,"otherLiabilities":32987000000,"minorityInterest":0,"totalLiabilities":177609000000,"commonStock":7564000000,"retainedEarnings":39193000000,"treasuryStock":null,"capitalSurplus":null,"shareholderEquity":123392000000,"netTangibleAssets":17585000000}]}'
|
55
|
+
recorded_at: Sat, 07 Nov 2020 17:58:54 GMT
|
56
|
+
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/cash-flow?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: 404
|
21
|
+
message: Not Found
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Sat, 07 Nov 2020 18:09:52 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=7497e12ee379404295b0122ab7a15dde; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 06:09:52 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: Sat, 07 Nov 2020 18:09:52 GMT
|
50
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/MSFT/cash-flow?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 18:09:52 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=4b186c1ab1c44b9b8033cd2fba1a6749; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 06:09:52 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","cashflow":[{"reportDate":"2020-09-30","fiscalDate":"2020-09-30","currency":"USD","netIncome":13893000000,"depreciation":2645000000,"changesInReceivables":9160000000,"changesInInventories":-808000000,"cashChange":3629000000,"cashFlow":19335000000,"capitalExpenditures":-4907000000,"investments":2100000000,"investingActivityOther":-2083000000,"totalInvestingCashFlows":-5371000000,"dividendsPaid":-3856000000,"netBorrowings":null,"otherFinancingCashFlows":-235000000,"cashFlowFinancing":-10289000000,"exchangeRateEffect":-46000000}]}'
|
55
|
+
recorded_at: Sat, 07 Nov 2020 18:09:52 GMT
|
56
|
+
recorded_with: VCR 6.0.0
|