iex-ruby-client 1.3.0 → 1.6.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/.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
@@ -0,0 +1,60 @@
|
|
1
|
+
module IEX
|
2
|
+
module Resources
|
3
|
+
class BalanceSheet < Resource
|
4
|
+
property 'report_date', from: 'reportDate'
|
5
|
+
property 'fiscal_date', from: 'fiscalDate'
|
6
|
+
property 'currency'
|
7
|
+
property 'current_cash', from: 'currentCash'
|
8
|
+
property 'current_cash_dollar', from: 'currentCash', with: ->(v) { to_dollar(amount: v) }
|
9
|
+
property 'short_term_investments', from: 'shortTermInvestments'
|
10
|
+
property 'short_term_investments_dollar', from: 'shortTermInvestments', with: ->(v) { to_dollar(amount: v) }
|
11
|
+
property 'receivables'
|
12
|
+
property 'receivables_dollar', from: 'receivables', with: ->(v) { to_dollar(amount: v) }
|
13
|
+
property 'inventory'
|
14
|
+
property 'inventory_dollar', from: 'inventory', with: ->(v) { to_dollar(amount: v) }
|
15
|
+
property 'other_current_assets', from: 'otherCurrentAssets'
|
16
|
+
property 'other_current_assets_dollar', from: 'otherCurrentAssets', with: ->(v) { to_dollar(amount: v) }
|
17
|
+
property 'current_assets', from: 'currentAssets'
|
18
|
+
property 'current_assets_dollar', from: 'currentAssets', with: ->(v) { to_dollar(amount: v) }
|
19
|
+
property 'long_term_investments', from: 'longTermInvestments'
|
20
|
+
property 'long_term_investments_dollar', from: 'longTermInvestments', with: ->(v) { to_dollar(amount: v) }
|
21
|
+
property 'property_plant_equipment', from: 'propertyPlantEquipment'
|
22
|
+
property 'property_plant_equipment_dollar', from: 'propertyPlantEquipment', with: ->(v) { to_dollar(amount: v) }
|
23
|
+
property 'goodwill'
|
24
|
+
property 'goodwill_dollar', from: 'goodwill', with: ->(v) { to_dollar(amount: v) }
|
25
|
+
property 'intangible_assets', from: 'intangibleAssets'
|
26
|
+
property 'intangible_assets_dollar', from: 'intangibleAssets', with: ->(v) { to_dollar(amount: v) }
|
27
|
+
property 'other_assets', from: 'otherAssets'
|
28
|
+
property 'other_assets_dollar', from: 'otherAssets', with: ->(v) { to_dollar(amount: v) }
|
29
|
+
property 'total_assets', from: 'totalAssets'
|
30
|
+
property 'total_assets_dollar', from: 'totalAssets', with: ->(v) { to_dollar(amount: v) }
|
31
|
+
property 'accounts_payable', from: 'accountsPayable'
|
32
|
+
property 'accounts_payable_dollar', from: 'accountsPayable', with: ->(v) { to_dollar(amount: v) }
|
33
|
+
property 'current_long_term_debt', from: 'currentLongTermDebt'
|
34
|
+
property 'current_long_term_debt_dollar', from: 'currentLongTermDebt', with: ->(v) { to_dollar(amount: v) }
|
35
|
+
property 'other_current_liabilities', from: 'otherCurrentLiabilities'
|
36
|
+
property 'other_current_liabilities_dollar', from: 'otherCurrentLiabilities', with: ->(v) { to_dollar(amount: v) }
|
37
|
+
property 'total_current_liabilities', from: 'totalCurrentLiabilities'
|
38
|
+
property 'total_current_liabilities_dollar', from: 'totalCurrentLiabilities', with: ->(v) { to_dollar(amount: v) }
|
39
|
+
property 'long_term_debt', from: 'longTermDebt'
|
40
|
+
property 'long_term_debt_dollar', from: 'longTermDebt', with: ->(v) { to_dollar(amount: v) }
|
41
|
+
property 'other_liabilities', from: 'otherLiabilities'
|
42
|
+
property 'other_liabilities_dollar', from: 'otherLiabilities', with: ->(v) { to_dollar(amount: v) }
|
43
|
+
property 'minority_interest', from: 'minorityInterest'
|
44
|
+
property 'minority_interest_dollar', from: 'minorityInterest', with: ->(v) { to_dollar(amount: v) }
|
45
|
+
property 'total_liabilities', from: 'totalLiabilities'
|
46
|
+
property 'total_liabilities_dollar', from: 'totalLiabilities', with: ->(v) { to_dollar(amount: v) }
|
47
|
+
property 'common_stock', from: 'commonStock'
|
48
|
+
property 'retained_earnings', from: 'retainedEarnings'
|
49
|
+
property 'retained_earnings_dollar', from: 'retainedEarnings', with: ->(v) { to_dollar(amount: v) }
|
50
|
+
property 'treasury_stock', from: 'treasuryStock'
|
51
|
+
property 'treasury_stock_dollar', from: 'treasuryStock', with: ->(v) { to_dollar(amount: v) }
|
52
|
+
property 'capital_surplus', from: 'capitalSurplus'
|
53
|
+
property 'capital_surplus_dollar', from: 'capitalSurplus', with: ->(v) { to_dollar(amount: v) }
|
54
|
+
property 'shareholder_equity', from: 'shareholderEquity'
|
55
|
+
property 'shareholder_equity_dollar', from: 'shareholderEquity', with: ->(v) { to_dollar(amount: v) }
|
56
|
+
property 'net_tangible_assets', from: 'netTangibleAssets'
|
57
|
+
property 'net_tangible_assets_dollar', from: 'netTangibleAssets', with: ->(v) { to_dollar(amount: v) }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -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
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IEX
|
2
4
|
module Resources
|
3
5
|
class Resource < Hashie::Trash
|
@@ -14,8 +16,22 @@ module IEX
|
|
14
16
|
].join
|
15
17
|
end
|
16
18
|
|
19
|
+
# Useful for values that are already a percent but we want to convert into a 2 decimal place string
|
20
|
+
def self.percentage_to_string(float_percent)
|
21
|
+
return unless float_percent.is_a? Numeric
|
22
|
+
return '+0.00%' if float_percent.zero?
|
23
|
+
|
24
|
+
[
|
25
|
+
float_percent.positive? ? '+' : '',
|
26
|
+
format('%.2f', float_percent),
|
27
|
+
'%'
|
28
|
+
].join
|
29
|
+
end
|
30
|
+
|
17
31
|
def self.to_dollar(amount:, ignore_cents: true)
|
18
|
-
|
32
|
+
return nil unless amount
|
33
|
+
|
34
|
+
Money.new(amount * 100, 'USD').format(decimal_mark: '.', no_cents: ignore_cents, thousands_separator: ',')
|
19
35
|
end
|
20
36
|
end
|
21
37
|
end
|
data/lib/iex/resources.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
require_relative 'resources/resource'
|
2
2
|
|
3
3
|
require_relative 'resources/advanced_stats'
|
4
|
+
require_relative 'resources/balance_sheet'
|
5
|
+
require_relative 'resources/cash_flow'
|
4
6
|
require_relative 'resources/chart'
|
7
|
+
require_relative 'resources/currency_rate'
|
5
8
|
require_relative 'resources/company'
|
6
9
|
require_relative 'resources/dividends'
|
7
10
|
require_relative 'resources/earnings'
|
11
|
+
require_relative 'resources/historical_prices'
|
8
12
|
require_relative 'resources/income'
|
9
13
|
require_relative 'resources/key_stats'
|
10
14
|
require_relative 'resources/largest_trades'
|
data/lib/iex/version.rb
CHANGED
data/lib/iex-ruby-client.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/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
|
@@ -0,0 +1,83 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/fx/latest?symbols=INVALID&token=test-iex-api-publishable-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.15.4
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message: Not Found
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Fri, 05 Apr 2019 02:59:49 GMT
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- ctoken=333d7c703c954832b14c34cb8cca7b3a; Max-Age=43200; Path=/; Expires=Fri,
|
33
|
+
05 Apr 2019 14:59:49 GMT
|
34
|
+
Content-Security-Policy:
|
35
|
+
- "default-src 'self'; child-src 'none'; object-src 'self'; style-src
|
36
|
+
'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self'
|
37
|
+
https://js.intercomcdn.com/fonts/ https://fonts.gstatic.com; frame-src 'self'
|
38
|
+
https://portal.productboard.com/ https://js.stripe.com/; img-src 'self'
|
39
|
+
data: https://*.intercomcdn.com/ https://static.intercomassets.com/ https://www.google-analytics.com
|
40
|
+
https://downloads.intercomcdn.com/; connect-src 'self' https://auth.iexcloud.io
|
41
|
+
https://api.iexcloud.io https://api.iexcloud.io https://cloud.iexapis.com
|
42
|
+
wss://iexcloud.io wss://tops.iexcloud.io wss://api.iexcloud.io wss://iexcloud.io
|
43
|
+
https://api-iam.intercom.io/messenger/ https://nexus-websocket-a.intercom.io/
|
44
|
+
https://nexus-websocket-b.intercom.io/ wss://nexus-websocket-a.intercom.io/
|
45
|
+
wss://nexus-websocket-b.intercom.io/ https://www.google-analytics.com; script-src
|
46
|
+
'self' 'unsafe-inline' 'unsafe-eval' https://www.google.com/recaptcha/api.js
|
47
|
+
https://www.google-analytics.com https://js.stripe.com/v3/ https://widget.intercom.io/widget/lhos563b
|
48
|
+
https://js.intercomcdn.com/ https://www.googletagmanager.com;"
|
49
|
+
X-Content-Security-Policy:
|
50
|
+
- "default-src 'self'; child-src 'none'; object-src 'self'; style-src
|
51
|
+
'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self'
|
52
|
+
https://js.intercomcdn.com/fonts/ https://fonts.gstatic.com; frame-src 'self'
|
53
|
+
https://portal.productboard.com/ https://js.stripe.com/; img-src 'self'
|
54
|
+
data: https://*.intercomcdn.com/ https://static.intercomassets.com/ https://www.google-analytics.com
|
55
|
+
https://downloads.intercomcdn.com/; connect-src 'self' https://auth.iexcloud.io
|
56
|
+
https://api.iexcloud.io https://api.iexcloud.io https://cloud.iexapis.com
|
57
|
+
wss://iexcloud.io wss://tops.iexcloud.io wss://api.iexcloud.io wss://iexcloud.io
|
58
|
+
https://api-iam.intercom.io/messenger/ https://nexus-websocket-a.intercom.io/
|
59
|
+
https://nexus-websocket-b.intercom.io/ wss://nexus-websocket-a.intercom.io/
|
60
|
+
wss://nexus-websocket-b.intercom.io/ https://www.google-analytics.com; script-src
|
61
|
+
'self' 'unsafe-inline' 'unsafe-eval' https://www.google.com/recaptcha/api.js
|
62
|
+
https://www.google-analytics.com https://js.stripe.com/v3/ https://widget.intercom.io/widget/lhos563b
|
63
|
+
https://js.intercomcdn.com/ https://www.googletagmanager.com;"
|
64
|
+
Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
X-Frame-Options:
|
67
|
+
- SAMEORIGIN
|
68
|
+
Strict-Transport-Security:
|
69
|
+
- max-age=15768000
|
70
|
+
Access-Control-Allow-Origin:
|
71
|
+
- "*"
|
72
|
+
Access-Control-Allow-Credentials:
|
73
|
+
- "true"
|
74
|
+
Access-Control-Allow-Methods:
|
75
|
+
- GET, OPTIONS
|
76
|
+
Access-Control-Allow-Headers:
|
77
|
+
- Origin, X-Requested-With, Content-Type, Accept
|
78
|
+
body:
|
79
|
+
encoding: ASCII-8BIT
|
80
|
+
string: Unknown symbol
|
81
|
+
http_version:
|
82
|
+
recorded_at: Fri, 05 Apr 2019 02:59:49 GMT
|
83
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/fx/latest?symbols=USDCAD,USDGBP,USDJPY&token=test-iex-api-publishable-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.15.4
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Fri, 05 Apr 2019 02:59:48 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- "6"
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- ctoken=3859f7adf5e24bb0ac6a2283b1d2c588; Max-Age=43200; Path=/; Expires=Fri,
|
33
|
+
05 Apr 2019 14:59:48 GMT
|
34
|
+
Content-Security-Policy:
|
35
|
+
- "default-src 'self'; child-src 'none'; object-src 'self'; style-src
|
36
|
+
'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self'
|
37
|
+
https://js.intercomcdn.com/fonts/ https://fonts.gstatic.com; frame-src 'self'
|
38
|
+
https://portal.productboard.com/ https://js.stripe.com/; img-src 'self'
|
39
|
+
data: https://*.intercomcdn.com/ https://static.intercomassets.com/ https://www.google-analytics.com
|
40
|
+
https://downloads.intercomcdn.com/; connect-src 'self' https://auth.iexcloud.io
|
41
|
+
https://api.iexcloud.io https://api.iexcloud.io https://cloud.iexapis.com
|
42
|
+
wss://iexcloud.io wss://tops.iexcloud.io wss://api.iexcloud.io wss://iexcloud.io
|
43
|
+
https://api-iam.intercom.io/messenger/ https://nexus-websocket-a.intercom.io/
|
44
|
+
https://nexus-websocket-b.intercom.io/ wss://nexus-websocket-a.intercom.io/
|
45
|
+
wss://nexus-websocket-b.intercom.io/ https://www.google-analytics.com; script-src
|
46
|
+
'self' 'unsafe-inline' 'unsafe-eval' https://www.google.com/recaptcha/api.js
|
47
|
+
https://www.google-analytics.com https://js.stripe.com/v3/ https://widget.intercom.io/widget/lhos563b
|
48
|
+
https://js.intercomcdn.com/ https://www.googletagmanager.com;"
|
49
|
+
X-Content-Security-Policy:
|
50
|
+
- "default-src 'self'; child-src 'none'; object-src 'self'; style-src
|
51
|
+
'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self'
|
52
|
+
https://js.intercomcdn.com/fonts/ https://fonts.gstatic.com; frame-src 'self'
|
53
|
+
https://portal.productboard.com/ https://js.stripe.com/; img-src 'self'
|
54
|
+
data: https://*.intercomcdn.com/ https://static.intercomassets.com/ https://www.google-analytics.com
|
55
|
+
https://downloads.intercomcdn.com/; connect-src 'self' https://auth.iexcloud.io
|
56
|
+
https://api.iexcloud.io https://api.iexcloud.io https://cloud.iexapis.com
|
57
|
+
wss://iexcloud.io wss://tops.iexcloud.io wss://api.iexcloud.io wss://iexcloud.io
|
58
|
+
https://api-iam.intercom.io/messenger/ https://nexus-websocket-a.intercom.io/
|
59
|
+
https://nexus-websocket-b.intercom.io/ wss://nexus-websocket-a.intercom.io/
|
60
|
+
wss://nexus-websocket-b.intercom.io/ https://www.google-analytics.com; script-src
|
61
|
+
'self' 'unsafe-inline' 'unsafe-eval' https://www.google.com/recaptcha/api.js
|
62
|
+
https://www.google-analytics.com https://js.stripe.com/v3/ https://widget.intercom.io/widget/lhos563b
|
63
|
+
https://js.intercomcdn.com/ https://www.googletagmanager.com;"
|
64
|
+
Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
X-Frame-Options:
|
67
|
+
- SAMEORIGIN
|
68
|
+
X-Content-Type-Options:
|
69
|
+
- nosniff
|
70
|
+
Strict-Transport-Security:
|
71
|
+
- max-age=15768000
|
72
|
+
Access-Control-Allow-Origin:
|
73
|
+
- "*"
|
74
|
+
Access-Control-Allow-Credentials:
|
75
|
+
- "true"
|
76
|
+
Access-Control-Allow-Methods:
|
77
|
+
- GET, OPTIONS
|
78
|
+
Access-Control-Allow-Headers:
|
79
|
+
- Origin, X-Requested-With, Content-Type, Accept
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: '[{"symbol":"USDCAD","rate":1.25674,"timestamp":1627045829863,"isDerived":false},{"symbol":"USDGBP","rate":0.7262111386264443,"timestamp":1627045780863,"isDerived":false},{"symbol":"USDJPY","rate":110.426,"timestamp":1627045825365,"isDerived":false}]'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 05 Apr 2019 02:59:48 GMT
|
85
|
+
recorded_with: VCR 4.0.0
|