go-yfinance v1.0.0 Update
Released go-yfinance v1.0.0.
ยท 4 min read
ranaroussi/yfinance v1.0.0 Update #
On December 23rd (KST), ranaroussi/yfinance was updated to v1.0.0.

The update introduces Calendars, a new feature for querying market-wide events, and Lookup, which expands ticker search capabilities. Additionally, Sector, Industry, and Market features have been added, enabling analysis by sector, industry, and market.
v1.0.0 Major Changes #
| Change | Description |
|---|---|
| Calendars Module (New) | Query market-wide calendar events |
| Config Module (New) | Global configuration management (yf.config) |
| Network Retry | Automatic retry on network errors |
Feature Comparison: go-yfinance vs. ranaroussi/yfinance v1.0.0 #
| Feature | Python v1.0.0 | Go | Note |
|---|---|---|---|
| Ticker (Basic) | โ | โ | Identical |
| History (Price Data) | โ | โ | Identical |
| Info (Company Info) | โ | โ | Identical |
| Financials | โ | โ | Identical |
| Options | โ | โ | Identical |
| Holders | โ | โ | Identical |
| Analysis | โ | โ | Identical |
| Calendar (Per Ticker) | โ | โ | Identical |
| News | โ | โ | Identical |
| WebSocket (Real-time) | โ | โ | Identical |
| Search | โ | โ | Identical |
| Screener | โ | โ | Identical |
| Multi/Download | โ | โ | Identical |
| Lookup | โ | โ | Not Implemented |
| Sector/Industry/Market | โ | โ | Not Implemented |
| Calendars (Global) | โ | โ | New in v1.0.0 |
| Config (Global) | โ | ๐ถ | Partially Implemented |
- All existing features are identical; however, four features from v1.0.0 were missing in
go-yfinance.
Analysis of Unimplemented Modules #
Lookup #
API Analysis
| Item | Details |
|---|---|
| Endpoint | GET /v1/finance/lookup |
| go-yfinance | LookupURL already defined โ |
| Python Impl | yfinance/lookup.py (221 lines) |
Usage (Python)
yf.Lookup(query="AAPL") # Search ticker by ISIN, CUSIP, etc.Request Parameters
- query: Search term (Required)
- type: all, equity, mutualfund, etf, index, future, currency, cryptocurrency
- count: Number of results (Default 25)
- start: Pagination
- formatted: false
- fetchPricingData: true
- lang: en-US
- region: US
Response Structure
{
"finance": {
"result": [{
"documents": [
{"symbol": "AAPL", "name": "Apple Inc.", "exchange": "NMS", ...}
]
}]
}
}Implementation Plan
- Model Definition:
pkg/models/lookup.go - Implementation:
pkg/lookup/lookup.go - Testing:
pkg/lookup/lookup_test.go - Estimated Workload: ~300 lines
Calendars #
API Analysis
| Item | Details |
|---|---|
| Endpoint | POST /v1/finance/visualization |
| go-yfinance | Definition Needed โ |
| Python Impl | yfinance/calendars.py (547 lines) |
go-yfinance’sCalendar()only supports calendars for individual Tickers.- Python’s
Calendarssupports querying market-wide calendar events.
Usage (Python)
calendars = yf.Calendars(start="2025-01-01", end="2025-01-07")
calendars.get_earnings_calendar() # Earnings schedule
calendars.get_ipo_info_calendar() # IPO schedule
calendars.get_economic_events_calendar() # Economic events
calendars.get_splits_calendar() # Stock splits scheduleRequest Structure (POST Body)
{
"sortType": "DESC",
"entityIdType": "sp_earnings|ipo_info|economic_event|splits",
"sortField": "intradaymarketcap|startdatetime",
"includeFields": ["ticker", "companyshortname", ...],
"size": 100,
"offset": 0,
"query": {
"operator": "AND",
"operands": [
{"operator": "eq", "operands": ["region", "us"]},
{"operator": "gte", "operands": ["startdatetime", "2025-01-01"]}
]
}
}Supported Calendar Types
| Type | Description | Fields |
|---|---|---|
| sp_earnings | Earnings | ticker, companyshortname, epsestimate, epsactual, … |
| ipo_info | IPO Info | ticker, filingdate, pricefrom, priceto, shares, … |
| economic_event | Economic Events | econ_release, country_code, consensus_estimate, … |
| splits | Splits | ticker, startdatetime, old_share_worth, share_worth |
Implementation Plan
- Model Definition:
pkg/models/calendar_market.go - Query Builder:
pkg/calendars/query.go - Implementation:
pkg/calendars/calendars.go - Testing:
pkg/calendars/calendars_test.go - Estimated Workload: ~700 lines
Domain (Sector/Industry/Market) #
Usage (Python)
yf.Sector("technology") # Sector info
yf.Industry("software") # Industry info
yf.Market("us_market") # Market infoSector
| Item | Details |
|---|---|
| Endpoint | GET /v1/finance/sectors/{key} |
| go-yfinance | Definition Needed โ |
| Python Impl | yfinance/domain/sector.py (153 lines) |
Provided Data:
- name, symbol, overview (market cap, company count, industry count, etc.)
- top_companies
- top_etfs, top_mutual_funds
- industries (list of included industries)
- research_reports
Industry
| Item | Details |
|---|---|
| Endpoint | GET /v1/finance/industries/{key} |
| go-yfinance | Definition Needed โ |
| Python Impl | yfinance/domain/industry.py (154 lines) |
Provided Data:
- name, symbol, overview
- sector_key, sector_name (Parent Sector)
- top_companies, top_performing_companies, top_growth_companies
- research_reports
Market
| Item | Details |
|---|---|
| Endpoint | GET /v6/finance/quote/marketSummary, GET /v6/finance/markettime |
| go-yfinance | MarketSummaryURL defined โ |
| Python Impl | yfinance/domain/market.py (108 lines) |
Provided Data:
- status (market state, open/close times, timezone)
- summary (price and change rate by major index)
Implementation Plan
- Models: pkg/models/domain.go
- Common Interface: pkg/domain/domain.go
- Sector: pkg/domain/sector.go
- Industry: pkg/domain/industry.go
- Market: pkg/domain/market.go
- Testing: pkg/domain/*_test.go
- Estimated Workload: ~920 lines
Config #
go-yfinance already implements a richer Config than Python v1.0.0.
| Setting | Python v1.0.0 | go-yfinance |
|---|---|---|
| Proxy | โ | โ |
| Retries | โ | โ |
| Debug/Logging | โ | โ |
| Timeout | โ | โ |
| UserAgent | โ | โ |
| JA3 Fingerprint | โ | โ |
| Retry Delay | โ | โ |
| Max Concurrent | โ | โ |
| Cache TTL | โ | โ |
Due to language characteristics, Python uses a nested style (config.network.proxy), while Go uses a method chain style (SetProxy()) in its API. However, since Config is set once at application startup and only read thereafter, I determined that there is no practical performance difference, so no changes are necessary.
Performance Comparison
| Item | Nested Style | Method Chain |
|---|---|---|
| Memory | Slightly more | Efficient |
| Runtime Overhead | Dynamic lookup | Direct call |
| Compile-time Check | โ Impossible | โ Possible |
Issues Resolved #
Calendars Earnings API 500 Error
- Cause: Query structure issue - date queries were wrapped in a nested AND.
- Resolution: Added
buildDateQueries()to pass GTE/LTE as individual operands.
// Before (Error)
Operands: []interface{}{
query{Operator: "EQ", ...},
query{Operator: "AND", Operands: [GTE, LTE]}, // Nested AND
}
// After (Success)
Operands: []interface{}{
query{Operator: "EQ", ...},
gteQuery, // Included directly
lteQuery, // Included directly
}SplitEvent Type Conflict
- Cause:
SplitEventwas already defined inpkg/models/response.go. - Resolution: Renamed to
CalendarSplitEvent.
Post Method Signature Mismatch
- Cause:
client.Postacceptedmap[string]string, but Calendars requiredmap[string]interface{}. - Resolution: Used
client.PostJSON+json.Marshalfor body serialization.