iex-ruby-client 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +147 -2
- data/RELEASING.md +2 -2
- data/lib/iex/api.rb +3 -0
- data/lib/iex/api/client.rb +3 -0
- data/lib/iex/endpoints/balance_sheet.rb +13 -0
- data/lib/iex/endpoints/cash_flow.rb +13 -0
- data/lib/iex/endpoints/historial_prices.rb +30 -0
- data/lib/iex/resources.rb +3 -0
- 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/historical_prices.rb +31 -0
- data/lib/iex/resources/income.rb +2 -0
- data/lib/iex/resources/resource.rb +12 -0
- data/lib/iex/version.rb +1 -1
- 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/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/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/historical_prices_spec.rb +206 -0
- data/spec/iex/endpoints/income_spec.rb +31 -29
- data/spec/iex/resources/resource_spec.rb +36 -0
- metadata +39 -3
@@ -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'
|
@@ -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
@@ -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,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cloud.iexapis.com/v1/stock/abcd/chart?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 23:12:05 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Content-Length:
|
30
|
+
- '2'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- ctoken=23487c1b32cf446280ff47256c945ba4; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 11:12:05 GMT
|
36
|
+
Iexcloud-Messages-Used:
|
37
|
+
- '0'
|
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: UTF-8
|
54
|
+
string: "[]"
|
55
|
+
recorded_at: Sat, 07 Nov 2020 23:12:05 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/chart?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 23:11:01 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=296ba00f07cf4147bd7ef12924544864; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
08 Nov 2020 11:11:01 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 23:11:01 GMT
|
50
|
+
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/MSFT/chart/date/2020-11-10?chartByDay=true&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: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Sat, 14 Nov 2020 21:59:32 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=4c55e4d6e6624ae8b27dec54d9f314bd; Max-Age=43200; Path=/; Expires=Sun,
|
35
|
+
15 Nov 2020 09:59:32 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: UTF-8
|
48
|
+
string: You have supplied invalid values for this request
|
49
|
+
recorded_at: Sat, 14 Nov 2020 21:59:32 GMT
|
50
|
+
recorded_with: VCR 6.0.0
|