Yahoo's v7 (`/v7/quote`) and v10 (`/quoteSummary`) endpoints accept `lang` and `region` parameters and return localized fields (`longName`, `shortName`, ...) when the ticker has been translated for that locale — e.g. 1810.HK returns '小米集團-W' under `lang=zh-Hant-HK`, GAZP.ME returns 'Публичное акционерное общество Газпром' under `lang=ru-RU`. Previously these params were not exposed and `Ticker.info["longName"]` always came back in U.S. English. Surfaced as global config (`YfConfig.locale.lang` / `YfConfig.locale.region`) rather than per-Ticker constructor params: a typical user wants the same locale for every call in their session, and the config approach also covers the v10 calendar/earnings endpoint in `_fetch_history_metadata` without threading kwargs through three layers. - Add `YfConfig.locale.lang` (default `"en-US"`) and `YfConfig.locale.region` (default `"US"`). - `Quote._fetch` (v10/quoteSummary) and `Quote._fetch_additional_info` (v7/quote) read the locale from `YfConfig` on every call. - `_fetch_history_metadata` (v1 calendar) reads the same locale, replacing a hardcoded `lang=en-US, region=US`. - The `v8/chart` endpoint ignores `lang` server-side, so we don't forward there — would only generate noise. - Verified live for Latin/diacritics (it-IT), CJK (zh-Hant-HK, ja-JP), Cyrillic (ru-RU); Apple under ja-JP correctly stays "Apple Inc." since it's a U.S. listing. Closes #2582
Download market data from Yahoo! Finance's API
yfinance offers a Pythonic way to fetch financial & market data from Yahoo!Ⓡ finance.
Important
Yahoo!, Y!Finance, and Yahoo! finance are registered trademarks of Yahoo, Inc.
yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's an open-source tool that uses Yahoo's publicly available APIs, and is intended for research and educational purposes.
You should refer to Yahoo!'s terms of use (here, here, and here) **for details on your rights to use the actual data downloaded.
Remember - the Yahoo! finance API is intended for personal use only.**
Tip
THE NEW DOCUMENTATION WEBSITE IS NOW LIVE! 🤘
Main components
Ticker: single ticker dataTickers: multiple tickers' datadownload: download market data for multiple tickersMarket: get information about a marketWebSocketandAsyncWebSocket: live streaming dataSearch: quotes and news from searchSectorandIndustry: sector and industry informationEquityQueryandScreener: build query to screen market
Installation
Install yfinance from PYPI using pip:
$ pip install yfinance
yfinance relies on the community to investigate bugs and contribute code. Here's how you can help.
Legal Stuff
yfinance is distributed under the Apache Software License. See the LICENSE.txt file in the release for details.
AGAIN - yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's an open-source tool that uses Yahoo's publicly available APIs, and is intended for research and educational purposes. You should refer to Yahoo!'s terms of use (here, here, and here) for details on your rights to use the actual data downloaded.
P.S.
Please drop me a note with any feedback you have.
Ran Aroussi