mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-13 02:56:39 +07:00
Track individual coins (identity + quantity) in a dedicated tab, backed by CoinGecko's Demo API (AURUM_COINGECKO_API_KEY). A holding is just another Asset under the hood (asset_class=crypto) with its value written as a regular AssetValuation — the existing Net Worth aggregation needs zero changes to pick it up. Prices never refresh in the background (no scheduler in this stack, same reasoning as recurring transactions): a "Refresh prices" button forces a sync, and GET /crypto/holdings lazily re-syncs at most once every 24h. CoinGecko outages leave existing values untouched (error_key: "unreachable") instead of failing the request. Backup/restore now carries CryptoHolding rows too, so a restore doesn't silently strip a holding's coin identity. Backend: 75/75 tests passing (9 new), including a real identity-map staleness bug the tests caught in the raw-Core-upsert + ORM re-read pattern, fixed via populate_existing=True. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01855PiW5Wd8n4aRW4n9kByY
27 lines
708 B
Python
27 lines
708 B
Python
from app.models.account import Account
|
|
from app.models.asset import Asset, AssetValuation
|
|
from app.models.budget import Budget
|
|
from app.models.category import Category
|
|
from app.models.crypto import CryptoHolding, CryptoSyncState
|
|
from app.models.goal import Goal, GoalContribution
|
|
from app.models.recurring import RecurringTransaction
|
|
from app.models.settings import AppSettings
|
|
from app.models.tag import Tag
|
|
from app.models.transaction import Transaction
|
|
|
|
__all__ = [
|
|
"Account",
|
|
"AppSettings",
|
|
"Asset",
|
|
"AssetValuation",
|
|
"Budget",
|
|
"Category",
|
|
"CryptoHolding",
|
|
"CryptoSyncState",
|
|
"Goal",
|
|
"GoalContribution",
|
|
"RecurringTransaction",
|
|
"Tag",
|
|
"Transaction",
|
|
]
|