iex-ruby-client 0.4.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +6 -0
  3. data/.rubocop_todo.yml +8 -36
  4. data/CHANGELOG.md +5 -0
  5. data/LICENSE.md +1 -1
  6. data/README.md +113 -160
  7. data/UPGRADING.md +55 -3
  8. data/iex-ruby-client.gemspec +1 -1
  9. data/lib/iex-ruby-client.rb +2 -0
  10. data/lib/iex/api.rb +15 -31
  11. data/lib/iex/api/client.rb +30 -0
  12. data/lib/iex/api/config.rb +45 -0
  13. data/lib/iex/cloud.rb +3 -0
  14. data/lib/iex/cloud/connection.rb +37 -0
  15. data/lib/iex/cloud/request.rb +38 -0
  16. data/lib/iex/cloud/response.rb +20 -0
  17. data/lib/iex/endpoints/chart.rb +39 -0
  18. data/lib/iex/endpoints/company.rb +11 -0
  19. data/lib/iex/endpoints/crypto.rb +11 -0
  20. data/lib/iex/endpoints/dividends.rb +18 -0
  21. data/lib/iex/endpoints/earnings.rb +13 -0
  22. data/lib/iex/endpoints/key_stats.rb +11 -0
  23. data/lib/iex/endpoints/largest_trades.rb +13 -0
  24. data/lib/iex/endpoints/logo.rb +11 -0
  25. data/lib/iex/endpoints/news.rb +19 -0
  26. data/lib/iex/endpoints/ohlc.rb +17 -0
  27. data/lib/iex/endpoints/price.rb +11 -0
  28. data/lib/iex/endpoints/quote.rb +11 -0
  29. data/lib/iex/endpoints/sectors.rb +17 -0
  30. data/lib/iex/errors.rb +1 -0
  31. data/lib/iex/errors/client_error.rb +13 -1
  32. data/lib/iex/errors/permission_denied_error.rb +5 -0
  33. data/lib/iex/logger.rb +13 -0
  34. data/lib/iex/resources.rb +0 -1
  35. data/lib/iex/resources/chart.rb +38 -21
  36. data/lib/iex/resources/company.rb +2 -8
  37. data/lib/iex/resources/crypto.rb +10 -18
  38. data/lib/iex/resources/dividends.rb +5 -15
  39. data/lib/iex/resources/earnings.rb +1 -15
  40. data/lib/iex/resources/key_stats.rb +11 -57
  41. data/lib/iex/resources/largest_trades.rb +0 -10
  42. data/lib/iex/resources/logo.rb +0 -8
  43. data/lib/iex/resources/news.rb +1 -11
  44. data/lib/iex/resources/ohlc.rb +8 -16
  45. data/lib/iex/resources/quote.rb +0 -8
  46. data/lib/iex/resources/resource.rb +19 -2
  47. data/lib/iex/resources/sectors.rb +0 -10
  48. data/lib/iex/version.rb +1 -1
  49. data/spec/fixtures/iex/chart/1d.yml +472 -444
  50. data/spec/fixtures/iex/chart/20190306.yml +475 -0
  51. data/spec/fixtures/iex/chart/bad_option.yml +80 -62
  52. data/spec/fixtures/iex/chart/chartInterval.yml +121 -98
  53. data/spec/fixtures/iex/chart/dynamic/1m.yml +106 -81
  54. data/spec/fixtures/iex/chart/invalid.yml +80 -58
  55. data/spec/fixtures/iex/chart/msft.yml +106 -81
  56. data/spec/fixtures/iex/client/access_denied.yml +49 -0
  57. data/spec/fixtures/iex/company/invalid.yml +80 -58
  58. data/spec/fixtures/iex/company/msft.yml +87 -65
  59. data/spec/fixtures/iex/crypto/btcusdt.yml +87 -0
  60. data/spec/fixtures/iex/dividends/invalid.yml +80 -62
  61. data/spec/fixtures/iex/dividends/msft.yml +88 -66
  62. data/spec/fixtures/iex/dividends/msft_1y.yml +92 -68
  63. data/spec/fixtures/iex/dividends/msft_default_range.yml +85 -65
  64. data/spec/fixtures/iex/dividends/msft_invalid_range.yml +82 -64
  65. data/spec/fixtures/iex/earnings/invalid.yml +80 -62
  66. data/spec/fixtures/iex/earnings/msft.yml +84 -68
  67. data/spec/fixtures/iex/key_stats/invalid.yml +80 -62
  68. data/spec/fixtures/iex/key_stats/msft.yml +84 -65
  69. data/spec/fixtures/iex/largest-trades/aapl.yml +91 -73
  70. data/spec/fixtures/iex/largest-trades/invalid.yml +80 -62
  71. data/spec/fixtures/iex/logo/msft.yml +82 -64
  72. data/spec/fixtures/iex/news/invalid.yml +80 -58
  73. data/spec/fixtures/iex/news/msft.yml +83 -61
  74. data/spec/fixtures/iex/news/msft_7.yml +83 -61
  75. data/spec/fixtures/iex/ohlc/market.yml +82 -65
  76. data/spec/fixtures/iex/ohlc/msft.yml +82 -64
  77. data/spec/fixtures/iex/price/invalid.yml +80 -58
  78. data/spec/fixtures/iex/price/msft.yml +82 -60
  79. data/spec/fixtures/iex/quote/invalid.yml +80 -62
  80. data/spec/fixtures/iex/quote/msft.yml +84 -66
  81. data/spec/fixtures/iex/sectors/invalid.yml +80 -62
  82. data/spec/fixtures/iex/sectors/sectors-performance.yml +88 -69
  83. data/spec/iex/client_spec.rb +138 -0
  84. data/spec/iex/config_spec.rb +22 -0
  85. data/spec/iex/{resources → endpoints}/chart_spec.rb +23 -21
  86. data/spec/iex/{resources → endpoints}/company_spec.rb +11 -7
  87. data/spec/iex/endpoints/crypto_spec.rb +66 -0
  88. data/spec/iex/{resources → endpoints}/dividends_spec.rb +17 -14
  89. data/spec/iex/endpoints/earnings_spec.rb +36 -0
  90. data/spec/iex/endpoints/key_stats_spec.rb +62 -0
  91. data/spec/iex/{resources → endpoints}/largest_trades_spec.rb +8 -6
  92. data/spec/iex/{resources → endpoints}/logo_spec.rb +3 -1
  93. data/spec/iex/endpoints/news_spec.rb +36 -0
  94. data/spec/iex/{resources → endpoints}/ohlc_spec.rb +15 -13
  95. data/spec/iex/{resources → endpoints}/price_spec.rb +6 -4
  96. data/spec/iex/endpoints/quote_spec.rb +38 -0
  97. data/spec/iex/{resources → endpoints}/sectors_spec.rb +7 -6
  98. data/spec/iex/resources/{base_spec.rb → resource_spec.rb} +6 -6
  99. data/spec/spec_helper.rb +2 -0
  100. data/spec/support/client.rb +6 -0
  101. metadata +66 -59
  102. data/lib/iex/api/chart.rb +0 -24
  103. data/lib/iex/api/company.rb +0 -13
  104. data/lib/iex/api/crypto.rb +0 -13
  105. data/lib/iex/api/dividends.rb +0 -17
  106. data/lib/iex/api/earnings.rb +0 -13
  107. data/lib/iex/api/key_stats.rb +0 -13
  108. data/lib/iex/api/largest_trades.rb +0 -13
  109. data/lib/iex/api/logo.rb +0 -13
  110. data/lib/iex/api/news.rb +0 -18
  111. data/lib/iex/api/ohlc.rb +0 -17
  112. data/lib/iex/api/price.rb +0 -13
  113. data/lib/iex/api/quote.rb +0 -13
  114. data/lib/iex/api/sectors.rb +0 -16
  115. data/lib/iex/resources/base.rb +0 -27
  116. data/lib/iex/resources/chart/base.rb +0 -14
  117. data/lib/iex/resources/chart/default.rb +0 -21
  118. data/lib/iex/resources/chart/one_day.rb +0 -20
  119. data/lib/iex/resources/ohlc/base.rb +0 -14
  120. data/lib/iex/resources/ohlc/timed_price.rb +0 -12
  121. data/lib/iex/resources/price.rb +0 -13
  122. data/spec/fixtures/iex/chart/20180227.yml +0 -452
  123. data/spec/fixtures/iex/crypto.yml +0 -101
  124. data/spec/fixtures/iex/news/market.yml +0 -64
  125. data/spec/iex/resources/crypto_spec.rb +0 -65
  126. data/spec/iex/resources/earnings_spec.rb +0 -38
  127. data/spec/iex/resources/key_stats_spec.rb +0 -94
  128. data/spec/iex/resources/news_spec.rb +0 -44
  129. data/spec/iex/resources/quote_spec.rb +0 -38
@@ -1,61 +1,83 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.iextrading.com/1.0/stock/INVALID/chart
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.14.0
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
- - Wed, 28 Mar 2018 02:07:58 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=2c5e09124bd64941a4540d20c379d9bc; Domain=.iextrading.com; Path=/; Expires=Wed,
33
- 28 Mar 2018 14:07:58 GMT; Secure
34
- Content-Security-Policy:
35
- - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
36
- 'unsafe-inline'; font-src data:; connect-src 'self' https://auth.iextrading.com
37
- wss://iextrading.com wss://tops.iextrading.com; script-src 'self';
38
- X-Content-Security-Policy:
39
- - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
40
- 'unsafe-inline'; font-src data:; connect-src 'self' https://auth.iextrading.com
41
- wss://iextrading.com wss://tops.iextrading.com; script-src 'self';
42
- Frame-Options:
43
- - deny
44
- X-Frame-Options:
45
- - deny
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
56
- body:
57
- encoding: ASCII-8BIT
58
- string: Unknown symbol
59
- http_version:
60
- recorded_at: Wed, 28 Mar 2018 02:07:58 GMT
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
+ 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
+ - Mon, 08 Apr 2019 11:43:28 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=99ca74dafa2f455989990d8aedc3f633; Max-Age=43200; Path=/; Expires=Mon,
33
+ 08 Apr 2019 23:43:28 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: Mon, 08 Apr 2019 11:43:28 GMT
61
83
  recorded_with: VCR 4.0.0
@@ -1,84 +1,109 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.iextrading.com/1.0/stock/MSFT/chart
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.14.0
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
- - Wed, 28 Mar 2018 02:05:06 GMT
25
- Content-Type:
26
- - application/json; charset=utf-8
27
- Content-Length:
28
- - '4731'
29
- Connection:
30
- - keep-alive
31
- Set-Cookie:
32
- - ctoken=f9e06af4657e469c9aeb97f9e22be56b; Domain=.iextrading.com; Path=/; Expires=Wed,
33
- 28 Mar 2018 14:05:06 GMT; Secure
34
- Content-Security-Policy:
35
- - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
36
- 'unsafe-inline'; font-src data:; connect-src 'self' https://auth.iextrading.com
37
- wss://iextrading.com wss://tops.iextrading.com; script-src 'self';
38
- X-Content-Security-Policy:
39
- - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
40
- 'unsafe-inline'; font-src data:; connect-src 'self' https://auth.iextrading.com
41
- wss://iextrading.com wss://tops.iextrading.com; script-src 'self';
42
- Frame-Options:
43
- - deny
44
- X-Frame-Options:
45
- - deny
46
- X-Content-Type-Options:
47
- - nosniff
48
- Strict-Transport-Security:
49
- - max-age=15768000
50
- Access-Control-Allow-Origin:
51
- - "*"
52
- Access-Control-Allow-Credentials:
53
- - 'true'
54
- Access-Control-Allow-Methods:
55
- - GET, OPTIONS
56
- Access-Control-Allow-Headers:
57
- - Origin, X-Requested-With, Content-Type, Accept
58
- body:
59
- encoding: UTF-8
60
- string: '[{"date":"2018-02-26","open":94.4,"high":95.45,"low":94.25,"close":95.42,"volume":30199846,"unadjustedVolume":30199846,"change":1.36,"changePercent":1.446,"vwap":95.0439,"label":"Feb
61
- 26","changeOverTime":0},{"date":"2018-02-27","open":95.74,"high":95.84,"low":94.2,"close":94.2,"volume":25869119,"unadjustedVolume":25869119,"change":-1.22,"changePercent":-1.279,"vwap":95.0159,"label":"Feb
62
- 27","changeOverTime":-0.012785579543072719},{"date":"2018-02-28","open":94.84,"high":95.705,"low":93.63,"close":93.77,"volume":31167338,"unadjustedVolume":31167338,"change":-0.43,"changePercent":-0.456,"vwap":94.6005,"label":"Feb
63
- 28","changeOverTime":-0.017291972332844328},{"date":"2018-03-01","open":93.99,"high":94.57,"low":91.84,"close":92.85,"volume":37135561,"unadjustedVolume":37135561,"change":-0.92,"changePercent":-0.981,"vwap":92.8725,"label":"Mar
64
- 1","changeOverTime":-0.026933556906309025},{"date":"2018-03-02","open":91.58,"high":93.15,"low":90.86,"close":93.05,"volume":32830389,"unadjustedVolume":32830389,"change":0.2,"changePercent":0.215,"vwap":92.1025,"label":"Mar
65
- 2","changeOverTime":-0.02483756025990363},{"date":"2018-03-05","open":92.34,"high":94.27,"low":92.26,"close":93.64,"volume":23901578,"unadjustedVolume":23901578,"change":0.59,"changePercent":0.634,"vwap":93.3993,"label":"Mar
66
- 5","changeOverTime":-0.018654370153007766},{"date":"2018-03-06","open":94.34,"high":94.49,"low":92.941,"close":93.32,"volume":22175776,"unadjustedVolume":22175776,"change":-0.32,"changePercent":-0.342,"vwap":93.4811,"label":"Mar
67
- 6","changeOverTime":-0.022007964787256428},{"date":"2018-03-07","open":93.16,"high":93.9406,"low":92.43,"close":93.86,"volume":26716127,"unadjustedVolume":26716127,"change":0.54,"changePercent":0.579,"vwap":93.3396,"label":"Mar
68
- 7","changeOverTime":-0.016348773841961876},{"date":"2018-03-08","open":94.27,"high":95.1,"low":93.765,"close":94.43,"volume":25887828,"unadjustedVolume":25887828,"change":0.57,"changePercent":0.607,"vwap":94.4376,"label":"Mar
69
- 8","changeOverTime":-0.010375183399706507},{"date":"2018-03-09","open":95.29,"high":96.54,"low":95,"close":96.54,"volume":36937254,"unadjustedVolume":36937254,"change":2.11,"changePercent":2.234,"vwap":96.0072,"label":"Mar
70
- 9","changeOverTime":0.011737581219870096},{"date":"2018-03-12","open":96.5,"high":97.21,"low":96.04,"close":96.77,"volume":26073742,"unadjustedVolume":26073742,"change":0.23,"changePercent":0.238,"vwap":96.6893,"label":"Mar
71
- 12","changeOverTime":0.014147977363236159},{"date":"2018-03-13","open":97,"high":97.24,"low":93.97,"close":94.41,"volume":35387817,"unadjustedVolume":35387817,"change":-2.36,"changePercent":-2.439,"vwap":95.1757,"label":"Mar
72
- 13","changeOverTime":-0.010584783064347151},{"date":"2018-03-14","open":95.12,"high":95.41,"low":93.5,"close":93.85,"volume":32131981,"unadjustedVolume":32131981,"change":-0.56,"changePercent":-0.593,"vwap":94.3105,"label":"Mar
73
- 14","changeOverTime":-0.0164535736742822},{"date":"2018-03-15","open":93.53,"high":94.58,"low":92.83,"close":94.18,"volume":27610998,"unadjustedVolume":27610998,"change":0.33,"changePercent":0.352,"vwap":93.9895,"label":"Mar
74
- 15","changeOverTime":-0.012995179207713214},{"date":"2018-03-16","open":94.68,"high":95.38,"low":93.92,"close":94.6,"volume":49081279,"unadjustedVolume":49081279,"change":0.42,"changePercent":0.446,"vwap":94.5295,"label":"Mar
75
- 16","changeOverTime":-0.008593586250262077},{"date":"2018-03-19","open":93.74,"high":93.9,"low":92.11,"close":92.89,"volume":33344085,"unadjustedVolume":33344085,"change":-1.71,"changePercent":-1.808,"vwap":92.841,"label":"Mar
76
- 19","changeOverTime":-0.02651435757702789},{"date":"2018-03-20","open":93.05,"high":93.77,"low":93,"close":93.13,"volume":23075240,"unadjustedVolume":23075240,"change":0.24,"changePercent":0.258,"vwap":93.3411,"label":"Mar
77
- 20","changeOverTime":-0.023999161601341502},{"date":"2018-03-21","open":92.93,"high":94.05,"low":92.21,"close":92.48,"volume":24457082,"unadjustedVolume":24457082,"change":-0.65,"changePercent":-0.698,"vwap":92.9449,"label":"Mar
78
- 21","changeOverTime":-0.03081115070215885},{"date":"2018-03-22","open":91.265,"high":91.75,"low":89.66,"close":89.79,"volume":38604715,"unadjustedVolume":38604715,"change":-2.69,"changePercent":-2.909,"vwap":90.6126,"label":"Mar
79
- 22","changeOverTime":-0.059002305596311},{"date":"2018-03-23","open":89.5,"high":90.46,"low":87.08,"close":87.18,"volume":44068949,"unadjustedVolume":44068949,"change":-2.61,"changePercent":-2.907,"vwap":88.8312,"label":"Mar
80
- 23","changeOverTime":-0.08635506183190102},{"date":"2018-03-26","open":90.61,"high":94,"low":90.4,"close":93.78,"volume":56396780,"unadjustedVolume":56396780,"change":6.6,"changePercent":7.571,"vwap":92.6083,"label":"Mar
81
- 26","changeOverTime":-0.017187172500524005}]'
82
- http_version:
83
- recorded_at: Wed, 28 Mar 2018 02:05:06 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://cloud.iexapis.com/v1/stock/MSFT/chart?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
+ - Mon, 08 Apr 2019 11:43:23 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - ctoken=ec78cac959d1450894d0541dafd14e13; Max-Age=43200; Path=/; Expires=Mon,
33
+ 08 Apr 2019 23:43:23 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:
83
+ '[{"date":"2019-03-06","open":111.87,"close":111.75,"high":112.66,"low":111.43,"volume":17686996,"uOpen":111.87,"uClose":111.75,"uHigh":112.66,"uLow":111.43,"uVolume":17686996,"change":0,"changePercent":0,"label":"Mar
84
+ 6","changeOverTime":0},{"date":"2019-03-07","open":111.4,"close":110.39,"high":111.55,"low":109.86,"volume":25338954,"uOpen":111.4,"uClose":110.39,"uHigh":111.55,"uLow":109.86,"uVolume":25338954,"change":-1.36,"changePercent":-1.217,"label":"Mar
85
+ 7","changeOverTime":-0.01217},{"date":"2019-03-08","open":109.16,"close":110.51,"high":110.71,"low":108.8,"volume":22818430,"uOpen":109.16,"uClose":110.51,"uHigh":110.71,"uLow":108.8,"uVolume":22818430,"change":0.12,"changePercent":0.1087,"label":"Mar
86
+ 8","changeOverTime":-0.011096},{"date":"2019-03-11","open":110.99,"close":112.83,"high":112.95,"low":110.98,"volume":26491618,"uOpen":110.99,"uClose":112.83,"uHigh":112.95,"uLow":110.98,"uVolume":26491618,"change":2.32,"changePercent":2.0994,"label":"Mar
87
+ 11","changeOverTime":0.009664},{"date":"2019-03-12","open":112.82,"close":113.62,"high":113.99,"low":112.65,"volume":26132717,"uOpen":112.82,"uClose":113.62,"uHigh":113.99,"uLow":112.65,"uVolume":26132717,"change":0.79,"changePercent":0.7002,"label":"Mar
88
+ 12","changeOverTime":0.016734},{"date":"2019-03-13","open":114.13,"close":114.5,"high":115,"low":113.78,"volume":35513771,"uOpen":114.13,"uClose":114.5,"uHigh":115,"uLow":113.78,"uVolume":35513771,"change":0.88,"changePercent":0.7745,"label":"Mar
89
+ 13","changeOverTime":0.024609},{"date":"2019-03-14","open":114.54,"close":114.59,"high":115.2,"low":114.33,"volume":30763367,"uOpen":114.54,"uClose":114.59,"uHigh":115.2,"uLow":114.33,"uVolume":30763367,"change":0.09,"changePercent":0.0786,"label":"Mar
90
+ 14","changeOverTime":0.025414},{"date":"2019-03-15","open":115.34,"close":115.91,"high":117.25,"low":114.59,"volume":54630661,"uOpen":115.34,"uClose":115.91,"uHigh":117.25,"uLow":114.59,"uVolume":54630661,"change":1.32,"changePercent":1.1519,"label":"Mar
91
+ 15","changeOverTime":0.037226},{"date":"2019-03-18","open":116.17,"close":117.57,"high":117.61,"low":116.05,"volume":31207596,"uOpen":116.17,"uClose":117.57,"uHigh":117.61,"uLow":116.05,"uVolume":31207596,"change":1.66,"changePercent":1.4321,"label":"Mar
92
+ 18","changeOverTime":0.052081},{"date":"2019-03-19","open":118.09,"close":117.65,"high":118.44,"low":116.99,"volume":37588697,"uOpen":118.09,"uClose":117.65,"uHigh":118.44,"uLow":116.99,"uVolume":37588697,"change":0.08,"changePercent":0.068,"label":"Mar
93
+ 19","changeOverTime":0.052796},{"date":"2019-03-20","open":117.39,"close":117.52,"high":118.75,"low":116.71,"volume":28113343,"uOpen":117.39,"uClose":117.52,"uHigh":118.75,"uLow":116.71,"uVolume":28113343,"change":-0.13,"changePercent":-0.1105,"label":"Mar
94
+ 20","changeOverTime":0.051633},{"date":"2019-03-21","open":117.14,"close":120.22,"high":120.82,"low":117.09,"volume":29854446,"uOpen":117.14,"uClose":120.22,"uHigh":120.82,"uLow":117.09,"uVolume":29854446,"change":2.7,"changePercent":2.2975,"label":"Mar
95
+ 21","changeOverTime":0.075794},{"date":"2019-03-22","open":119.5,"close":117.05,"high":119.59,"low":117.04,"volume":33624528,"uOpen":119.5,"uClose":117.05,"uHigh":119.59,"uLow":117.04,"uVolume":33624528,"change":-3.17,"changePercent":-2.6368,"label":"Mar
96
+ 22","changeOverTime":0.047427},{"date":"2019-03-25","open":116.56,"close":117.66,"high":118.01,"low":116.32,"volume":27067117,"uOpen":116.56,"uClose":117.66,"uHigh":118.01,"uLow":116.32,"uVolume":27067117,"change":0.61,"changePercent":0.5211,"label":"Mar
97
+ 25","changeOverTime":0.052886},{"date":"2019-03-26","open":118.62,"close":117.91,"high":118.7,"low":116.85,"volume":26097665,"uOpen":118.62,"uClose":117.91,"uHigh":118.7,"uLow":116.85,"uVolume":26097665,"change":0.25,"changePercent":0.2125,"label":"Mar
98
+ 26","changeOverTime":0.055123},{"date":"2019-03-27","open":117.88,"close":116.77,"high":118.21,"low":115.52,"volume":22733427,"uOpen":117.88,"uClose":116.77,"uHigh":118.21,"uLow":115.52,"uVolume":22733427,"change":-1.14,"changePercent":-0.9668,"label":"Mar
99
+ 27","changeOverTime":0.044922},{"date":"2019-03-28","open":117.44,"close":116.93,"high":117.58,"low":116.13,"volume":18334755,"uOpen":117.44,"uClose":116.93,"uHigh":117.58,"uLow":116.13,"uVolume":18334755,"change":0.16,"changePercent":0.137,"label":"Mar
100
+ 28","changeOverTime":0.046353},{"date":"2019-03-29","open":118.07,"close":117.94,"high":118.32,"low":116.96,"volume":25399752,"uOpen":118.07,"uClose":117.94,"uHigh":118.32,"uLow":116.96,"uVolume":25399752,"change":1.01,"changePercent":0.8638,"label":"Mar
101
+ 29","changeOverTime":0.055391},{"date":"2019-04-01","open":118.95,"close":119.02,"high":119.11,"low":118.1,"volume":22789103,"uOpen":118.95,"uClose":119.02,"uHigh":119.11,"uLow":118.1,"uVolume":22789103,"change":1.08,"changePercent":0.9157,"label":"Apr
102
+ 1","changeOverTime":0.065056},{"date":"2019-04-02","open":119.06,"close":119.19,"high":119.48,"low":118.52,"volume":18142297,"uOpen":119.06,"uClose":119.19,"uHigh":119.48,"uLow":118.52,"uVolume":18142297,"change":0.17,"changePercent":0.1428,"label":"Apr
103
+ 2","changeOverTime":0.066577},{"date":"2019-04-03","open":119.86,"close":119.97,"high":120.43,"low":119.15,"volume":22860744,"uOpen":119.86,"uClose":119.97,"uHigh":120.43,"uLow":119.15,"uVolume":22860744,"change":0.78,"changePercent":0.6544,"label":"Apr
104
+ 3","changeOverTime":0.073557},{"date":"2019-04-04","open":120.1,"close":119.36,"high":120.23,"low":118.38,"volume":20112848,"uOpen":120.1,"uClose":119.36,"uHigh":120.23,"uLow":118.38,"uVolume":20112848,"change":-0.61,"changePercent":-0.5085,"label":"Apr
105
+ 4","changeOverTime":0.068098},{"date":"2019-04-05","open":119.39,"close":119.89,"high":120.23,"low":119.37,"volume":15826245,"uOpen":119.39,"uClose":119.89,"uHigh":120.23,"uLow":119.37,"uVolume":15826245,"change":0.53,"changePercent":0.444,"label":"Apr
106
+ 5","changeOverTime":0.072841}]'
107
+ http_version:
108
+ recorded_at: Mon, 08 Apr 2019 11:43:23 GMT
84
109
  recorded_with: VCR 4.0.0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://cloud.iexapis.com/v1//stock/msft/quote?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
+ User-Agent:
13
+ - IEX Ruby Client/1.0.0
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 403
19
+ message: Forbidden
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Fri, 19 Apr 2019 18:22:21 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=9276ad51186c44af86022b7f19720f57; Max-Age=43200; Path=/; Expires=Sat,
33
+ 20 Apr 2019 06:22:21 GMT
34
+ Strict-Transport-Security:
35
+ - max-age=15768000
36
+ Access-Control-Allow-Origin:
37
+ - "*"
38
+ Access-Control-Allow-Credentials:
39
+ - 'true'
40
+ Access-Control-Allow-Methods:
41
+ - GET, OPTIONS
42
+ Access-Control-Allow-Headers:
43
+ - Origin, X-Requested-With, Content-Type, Accept
44
+ body:
45
+ encoding: ASCII-8BIT
46
+ string: The API key provided is not valid.
47
+ http_version:
48
+ recorded_at: Fri, 19 Apr 2019 18:22:21 GMT
49
+ recorded_with: VCR 4.0.0
@@ -1,61 +1,83 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.iextrading.com/1.0/stock/INVALID/company
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.14.0
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
- - Mon, 26 Mar 2018 20:47:50 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=0397c9aa99f94e3bb4c858ac83fbdd2b; Domain=.iextrading.com; Path=/; Expires=Tue,
33
- 27 Mar 2018 08:47:50 GMT; Secure
34
- Content-Security-Policy:
35
- - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
36
- 'unsafe-inline'; font-src data:; connect-src 'self' https://auth.iextrading.com
37
- wss://iextrading.com wss://tops.iextrading.com; script-src 'self';
38
- X-Content-Security-Policy:
39
- - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
40
- 'unsafe-inline'; font-src data:; connect-src 'self' https://auth.iextrading.com
41
- wss://iextrading.com wss://tops.iextrading.com; script-src 'self';
42
- Frame-Options:
43
- - deny
44
- X-Frame-Options:
45
- - deny
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
56
- body:
57
- encoding: ASCII-8BIT
58
- string: Unknown symbol
59
- http_version:
60
- recorded_at: Mon, 26 Mar 2018 20:47:50 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://cloud.iexapis.com/v1/stock/INVALID/company?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
+ - Mon, 08 Apr 2019 11:36:57 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=b84bcedca0fb4409b3e3d08aafb795ca; Max-Age=43200; Path=/; Expires=Mon,
33
+ 08 Apr 2019 23:36:57 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: Mon, 08 Apr 2019 11:36:57 GMT
61
83
  recorded_with: VCR 4.0.0