yahoo_finance_client 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30839cb8e628ac9ed9d0f2b62b84c070deec2c0e34b2ebfa847e1f96ead57b66
4
- data.tar.gz: edf5c2cfd5da659d3d133970209beab1520172609ba5ef3e62103f8632b94580
3
+ metadata.gz: ec1a70f9b1a9927d6b36ea559dbaf4204f8c82ad37d70b2c2feab47864cd01ac
4
+ data.tar.gz: 3a91d7848dffe1d5ca1532e31c513f4465ad9147f93c8a6984dfabf320c65337
5
5
  SHA512:
6
- metadata.gz: 2a1b56270a9f16516c23aeeb68726e44597696f6decd6099feea133be43f812d2512955ad314de75423460ae45ff99ead67b649868037ec99c02c2bec9ad7f77
7
- data.tar.gz: 45f41b601b87201eb3dfe5af834826268806ece7b4ac572e095f6489168c3e8579134a030ebad89570317922e96a5b52cd526ce87d7b644f07fa0233ce100676
6
+ metadata.gz: b489b0a5689876b9f13e8876263ce54c2878a7aea9e4ad421114d9ee4434c50764c89d9cb6a19a0605bc0e4bc777f14ff641edbef314e57bdf4ddc365c9428ac
7
+ data.tar.gz: daffd51bf44af895b9741b94278ef5d81729f7bdc0b3250b91b0897009cfe30b069beedcd14c3d02a7f22bc40e01907eb8fab80655a5ea02c14e90e002d1a87c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.4.1] - 2026-02-13
4
+
5
+ - Add `fifty_two_week_high` and `fifty_two_week_low` fields to quote data
6
+
7
+ ## [0.4.0] - 2026-02-12
8
+
9
+ - Add dividend history fetching via chart API (`get_dividend_history`)
10
+ - Update README with bulk quotes, dividend history, and caching docs
11
+
12
+ ## [0.3.1] - 2026-02-12
13
+
14
+ - Add `ex_dividend_date` and `dividend_date` fields to quote data
15
+
16
+ ## [0.3.0] - 2026-02-10
17
+
18
+ - Add bulk quotes support with `get_quotes` method
19
+
20
+ ## [0.2.1] - 2026-01-29
21
+
22
+ - Add extended stock information fields (EPS, PE ratio, dividend data, moving averages)
23
+
24
+ ## [0.2.0] - 2026-01-27
25
+
26
+ - Add multi-strategy authentication with retry logic
27
+ - Add CLAUDE.md with project instructions
28
+
3
29
  ## [0.1.6] - 2025-02-18
4
30
 
5
31
  - Adding a simple cache
data/README.md CHANGED
@@ -32,11 +32,46 @@ gem install yahoo_finance_client
32
32
 
33
33
  ## Usage
34
34
 
35
- You should be able to get stock data by calling this method and passing a string with the stock ticker:
35
+ ### Single Quote
36
+
37
+ Fetch stock data by passing a ticker symbol:
36
38
  ```ruby
37
39
  YahooFinanceClient::Stock.get_quote("AAPL")
40
+ # => {
41
+ # symbol: "AAPL", name: "Apple Inc.", price: 182.52,
42
+ # change: 1.25, percent_change: 0.69, volume: 48123456,
43
+ # pe_ratio: 28.5, eps: 6.40,
44
+ # dividend: 0.96, dividend_yield: 0.53, payout_ratio: 15.0,
45
+ # ma50: 178.30, ma200: 172.15,
46
+ # ex_dividend_date: #<Date: 2025-02-07>, dividend_date: #<Date: 2025-02-15>
47
+ # }
48
+ ```
49
+
50
+ ### Bulk Quotes
51
+
52
+ Fetch multiple quotes at once (batched in groups of 50):
53
+ ```ruby
54
+ YahooFinanceClient::Stock.get_quotes(["AAPL", "MSFT", "GOOG"])
55
+ # => { "AAPL" => { symbol: "AAPL", ... }, "MSFT" => { ... }, "GOOG" => { ... } }
56
+ ```
57
+
58
+ ### Dividend History
59
+
60
+ Fetch historical dividend payments via the chart API:
61
+ ```ruby
62
+ YahooFinanceClient::Stock.get_dividend_history("AAPL")
63
+ # => [{ date: #<Date: 2024-02-09>, amount: 0.24 }, ...]
38
64
  ```
39
65
 
66
+ The default range is `"2y"`. You can pass a different range:
67
+ ```ruby
68
+ YahooFinanceClient::Stock.get_dividend_history("AAPL", range: "5y")
69
+ ```
70
+
71
+ ### Caching
72
+
73
+ All responses are cached for 5 minutes (300 seconds). The cache is shared across `get_quote`, `get_quotes`, and `get_dividend_history`.
74
+
40
75
  ## Development
41
76
 
42
77
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -152,6 +152,7 @@ module YahooFinanceClient
152
152
  dividend: dividend, dividend_yield: calculate_yield(dividend, price),
153
153
  payout_ratio: calculate_payout(dividend, eps),
154
154
  ma50: quote["fiftyDayAverage"], ma200: quote["twoHundredDayAverage"],
155
+ fifty_two_week_high: quote["fiftyTwoWeekHigh"], fifty_two_week_low: quote["fiftyTwoWeekLow"],
155
156
  ex_dividend_date: parse_unix_date(quote["exDividendDate"]),
156
157
  dividend_date: parse_unix_date(quote["dividendDate"])
157
158
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YahooFinanceClient
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_finance_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesc Leveque