Prometheus exporter for Yahoo Finance stock data.
  • Python 65.7%
  • Makefile 22.8%
  • Dockerfile 11.5%
Find a file
2026-02-24 15:27:03 +01:00
.gitignore initial commit 2025-01-08 14:10:38 +01:00
Dockerfile chores(dependencies) 2025-05-22 17:18:25 +02:00
Makefile chore(docker): use YFINANCE_REGISTRY env var for push 2026-02-24 15:27:03 +01:00
poetry.lock feat(monitoring) introducing daemon-metrics 2025-06-30 10:59:55 +02:00
project_vars.mk initial commit 2025-01-08 14:10:38 +01:00
pyproject.toml feat(monitoring) introducing daemon-metrics 2025-06-30 10:59:55 +02:00
README.md initial commit 2025-01-08 14:10:38 +01:00
yfinance_exporter.py feat(monitoring) introducing daemon-metrics 2025-06-30 10:59:55 +02:00

PyPI - Version Docker Image Version

YFinance Exporter

Metrics served

{
    "stocks": [
        {"isin": "FR0000120073", "name": "AIR LIQUIDE", "ycode": "AI.PA"}
    ]
}

Running it

For the next few bits of code, we'll suppose you have a working configuration above in ~/.config/yfinance-exporter.json.

... with python:

pip install yfinance-exporter
python -m yfinance_exporter

... with docker:

 docker run -v ~/.config/:/etc/yfinance-exporter/:ro -p 9100:9100 yfinance-exporter:main

You'll then be able retrieve some values:

curl localhost:9100/metrics

# HELP yfinance_exporter
# TYPE yfinance_exporter gauge
yfinance_exporter{status="loop"} 1.0
yfinance_exporter{status="loop-time"} 10.179875
yfinance_exporter{status="ok-stock"} 45.0
yfinance_exporter{status="ko-stock"} 2.0
[...]