{"id":52003306,"url":"https://github.com/stephanakkerman/ticker-price-data","last_synced_at":"2026-07-31T13:02:15.736Z","repository":{"id":365539749,"uuid":"1272523046","full_name":"StephanAkkerman/ticker-price-data","owner":"StephanAkkerman","description":"Efficiently get price data for a given ticker","archived":false,"fork":false,"pushed_at":"2026-06-17T18:59:42.000Z","size":49,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T20:27:19.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StephanAkkerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["StephanAkkerman"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2026-06-17T17:33:45.000Z","updated_at":"2026-06-17T19:00:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/StephanAkkerman/ticker-price-data","commit_stats":null,"previous_names":["stephanakkerman/ticker-price-data"],"tags_count":2,"template":false,"template_full_name":"StephanAkkerman/template","purl":"pkg:github/StephanAkkerman/ticker-price-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fticker-price-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fticker-price-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fticker-price-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fticker-price-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StephanAkkerman","download_url":"https://codeload.github.com/StephanAkkerman/ticker-price-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanAkkerman%2Fticker-price-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36118274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-31T02:00:06.731Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-31T13:02:14.616Z","updated_at":"2026-07-31T13:02:15.718Z","avatar_url":"https://github.com/StephanAkkerman.png","language":"Python","funding_links":["https://github.com/sponsors/StephanAkkerman"],"categories":[],"sub_categories":[],"readme":"# ticker-price-data\n\nUnified ticker price data from **Yahoo Finance** (stocks/indices/forex/futures),\n**CoinGecko** (crypto), and **TradingView** (universal fallback).\n\nOne normalized quote shape for every asset, with sensible fallbacks and built-in\ncaching.\n\n## Key Features 🔑\n\n- `get_price(ticker, asset_type)` — single entry point; `asset_type=\"auto\"` uses\n  [ticker-classifier](https://github.com/StephanAkkerman/ticker-classifier) to decide\n  stock vs crypto vs forex automatically.\n- `get_ticker(ticker)` — everything known about a symbol in one call: classification\n  metadata (sector, industry, market cap, company profile, ...) **plus** the live quote,\n  classifying only once.\n- `get_stock_info(ticker)` — Yahoo Finance, with a TradingView fallback.\n- `get_crypto_info(ticker)` — CoinGecko via the website `search_v2` endpoint (avoids the\n  public API's free-tier rate limits), with Yahoo → TradingView fallbacks.\n- `get_tradingview_quote(symbol, asset_hint)` — realtime websocket pool + scraper fallback.\n- In-memory caching, stale/negative caching, and concurrency limits built in.\n- Pre-market and after-hours data where available.\n\nAll helpers return `Optional[dict]`:\n\n```python\n{\n    \"price\": float,\n    \"change_percent\": float,\n    \"volume\": float,\n    \"website\": str,\n    \"source\": str,                      # \"yahoo\" | \"coingecko\" | \"tradingview\"\n    # stocks only:\n    \"last_close\": float | None,         # previous day's regular-session close\n    \"session\": str,                     # \"regular\" | \"pre-market\" | \"after-hours\" | \"closed\"\n    \"extended_price\": float,            # pre/after-hours price (omitted when session == \"regular\")\n    \"extended_change_percent\": float,   # (extended_price − price) / price × 100 (omitted when session == \"regular\")\n}\n```\n\n`extended_price` and `extended_change_percent` persist from the end of after-hours (8 pm ET) through weekends and holidays until pre-market opens (4 am ET) on the next trading day.\n\n## Installation ⚙️\n\n```bash\npip install ticker-price-data\n```\n\nor, for local development:\n\n```bash\npip install -e .\n```\n\n## Usage ⌨️\n\n```python\nimport asyncio\nfrom ticker_price_data import get_price, get_ticker, get_stock_info, get_crypto_info\n\nasync def main():\n    print(await get_stock_info(\"AAPL\"))     # Yahoo\n    print(await get_crypto_info(\"BTC\"))     # CoinGecko\n    print(await get_price(\"BTC\", \"auto\"))   # classified automatically\n    print(await get_ticker(\"AAPL\"))         # metadata (sector, industry, ...) + quote\n\nasyncio.run(main())\n```\n\n## License 📜\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanakkerman%2Fticker-price-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephanakkerman%2Fticker-price-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanakkerman%2Fticker-price-data/lists"}