File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import statistics
1111import logging
1212import json
13+ from abc import ABC , abstractmethod
1314from pathlib import Path
1415import pandas as pd
1516from decimal import Decimal , getcontext
2526
2627__version__ = "0.1.0-gsoc2026"
2728__all__ = [
29+ "IOracleProvider" ,
2830 "auto_pilot_mode" ,
2931 "VaultConfig" ,
3032 "CircuitBreaker" ,
4648)
4749logger = logging .getLogger (__name__ )
4850
51+ # ==========================================
52+ # ARCHITECTURAL INTERFACES (GSoC 2026 Strategy)
53+ # ==========================================
54+ class IOracleProvider (ABC ):
55+ """
56+ Abstract Base Class for all price providers.
57+ """
58+ @abstractmethod
59+ async def fetch_price (self ) -> Decimal :
60+ """Fetches the current ticker price, returning a strict Decimal."""
61+ pass
62+
63+ @abstractmethod
64+ async def is_healthy (self ) -> bool :
65+ """Checks if the exchange API is responsive within the timeout."""
66+ pass
67+
4968@dataclass (frozen = True )
5069class VaultConfig :
5170 mock_mode : bool
You can’t perform that action at this time.
0 commit comments