Add FastAPI backend for energy trading system
Implements FastAPI backend with ML model support for energy trading, including price prediction models and RL-based battery trading policy. Features dashboard, trading, backtest, and settings API routes with WebSocket support for real-time updates.
This commit is contained in:
60
backend/app/models/enums.py
Normal file
60
backend/app/models/enums.py
Normal file
@@ -0,0 +1,60 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class RegionEnum(str, Enum):
|
||||
FR = "FR"
|
||||
BE = "BE"
|
||||
DE = "DE"
|
||||
NL = "NL"
|
||||
UK = "UK"
|
||||
|
||||
|
||||
class FuelTypeEnum(str, Enum):
|
||||
GAS = "gas"
|
||||
NUCLEAR = "nuclear"
|
||||
COAL = "coal"
|
||||
SOLAR = "solar"
|
||||
WIND = "wind"
|
||||
HYDRO = "hydro"
|
||||
|
||||
|
||||
class StrategyEnum(str, Enum):
|
||||
FUNDAMENTAL = "fundamental"
|
||||
TECHNICAL = "technical"
|
||||
ML = "ml"
|
||||
MINING = "mining"
|
||||
|
||||
|
||||
class TradeTypeEnum(str, Enum):
|
||||
BUY = "buy"
|
||||
SELL = "sell"
|
||||
CHARGE = "charge"
|
||||
DISCHARGE = "discharge"
|
||||
|
||||
|
||||
class BacktestStatusEnum(str, Enum):
|
||||
PENDING = "pending"
|
||||
RUNNING = "running"
|
||||
COMPLETED = "completed"
|
||||
FAILED = "failed"
|
||||
CANCELLED = "cancelled"
|
||||
|
||||
|
||||
class ModelType(str, Enum):
|
||||
PRICE_PREDICTION = "price_prediction"
|
||||
RL_BATTERY = "rl_battery"
|
||||
|
||||
|
||||
class AlertTypeEnum(str, Enum):
|
||||
PRICE_SPIKE = "price_spike"
|
||||
ARBITRAGE_OPPORTUNITY = "arbitrage_opportunity"
|
||||
BATTERY_LOW = "battery_low"
|
||||
BATTERY_FULL = "battery_full"
|
||||
STRATEGY_ERROR = "strategy_error"
|
||||
|
||||
|
||||
class TrainingStatusEnum(str, Enum):
|
||||
PENDING = "pending"
|
||||
RUNNING = "running"
|
||||
COMPLETED = "completed"
|
||||
FAILED = "failed"
|
||||
Reference in New Issue
Block a user