{"id":27823,"library":"ghostfolio","title":"Ghostfolio Python Client","description":"Python API client for Ghostfolio, an open-source personal finance dashboard. Current version 0.8.0 enables portfolio management, holdings, activities, and admin operations. Release cadence is irregular.","status":"active","version":"0.8.0","language":"python","source_language":"en","source_url":"https://github.com/ms32035/ghostfolio-py","tags":["ghostfolio","portfolio","finance","api-client"],"install":[{"cmd":"pip install ghostfolio","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false}],"imports":[{"note":"Public API is at top-level; internal module path may change.","wrong":"from ghostfolio.client import GhostfolioClient","symbol":"GhostfolioClient","correct":"from ghostfolio import GhostfolioClient"}],"quickstart":{"code":"from ghostfolio import GhostfolioClient\n\nclient = GhostfolioClient(\n    base_url=os.environ.get('GHOSTFOLIO_URL', 'http://localhost:3000'),\n    access_token=os.environ.get('GHOSTFOLIO_ACCESS_TOKEN', '')\n)\n# Fetch all holdings\nholdings = client.get_holdings()\nprint(holdings)","lang":"python","description":"Initialize client with base URL and access token, then fetch holdings."},"warnings":[{"fix":"Use `get_holdings()` instead of `get_positions()`.","message":"In version 0.4.0, the method `get_positions` was renamed to `get_holdings`. Old code will fail.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Ensure token is passed as header (handled by library). If passing token in URL, update by removing that pattern.","message":"Authentication via `access_token` query parameter is deprecated; use header-based authentication (Authorization: Bearer <token>) which is the only supported method as of 0.8.0.","severity":"deprecated","affected_versions":">=0.8.0"},{"fix":"Perform a dummy API call (e.g., `client.get_health()`) immediately after init to check connectivity and authentication.","message":"Client does not validate credentials on initialization; invalid tokens or URLs raise exceptions only on first API call. This can mask configuration errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with `pip install ghostfolio` and check Python version (>=3.10).","cause":"Package not installed or required Python >=3.10 not met.","error":"ModuleNotFoundError: No module named 'ghostfolio'"},{"fix":"Use `client.get_holdings()` instead.","cause":"Method renamed in 0.4.0.","error":"AttributeError: 'GhostfolioClient' object has no attribute 'get_positions'"},{"fix":"Set the environment variable `GHOSTFOLIO_ACCESS_TOKEN` or pass a valid token to `GhostfolioClient`.","cause":"Invalid or missing access token.","error":"ghostfolio.exceptions.UnauthorizedException: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}