Implements React + TypeScript UI with Vite and Tailwind CSS. Features dashboard with real-time WebSocket updates, backtesting page, model management interface, trading controls, and settings. Includes state management with Zustand, API integration with Axios/TanStack Query, and interactive charts with Recharts.
66 lines
1.9 KiB
TypeScript
66 lines
1.9 KiB
TypeScript
import type { Region, Strategy, TradeType, BacktestStatus, ModelType, TrainingStatus, AlertType } from '@/services/types';
|
|
|
|
export const REGIONS: Region[] = ['FR', 'BE', 'DE', 'NL', 'UK'];
|
|
|
|
export const STRATEGIES: Strategy[] = ['fundamental', 'technical', 'ml', 'mining'];
|
|
|
|
export const TRADE_TYPES: TradeType[] = ['buy', 'sell', 'charge', 'discharge'];
|
|
|
|
export const BACKTEST_STATUSES: BacktestStatus[] = ['pending', 'running', 'completed', 'failed', 'cancelled'];
|
|
|
|
export const MODEL_TYPES: ModelType[] = ['price_prediction', 'rl_battery'];
|
|
|
|
export const TRAINING_STATUSES: TrainingStatus[] = ['pending', 'running', 'completed', 'failed'];
|
|
|
|
export const ALERT_TYPES: AlertType[] = ['price_spike', 'arbitrage_opportunity', 'battery_low', 'battery_full', 'strategy_error'];
|
|
|
|
export const REGION_LABELS: Record<Region, string> = {
|
|
FR: 'France',
|
|
BE: 'Belgium',
|
|
DE: 'Germany',
|
|
NL: 'Netherlands',
|
|
UK: 'United Kingdom',
|
|
};
|
|
|
|
export const STRATEGY_LABELS: Record<Strategy, string> = {
|
|
fundamental: 'Fundamental',
|
|
technical: 'Technical',
|
|
ml: 'ML Based',
|
|
mining: 'Mining',
|
|
};
|
|
|
|
export const TRADE_TYPE_LABELS: Record<TradeType, string> = {
|
|
buy: 'Buy',
|
|
sell: 'Sell',
|
|
charge: 'Charge',
|
|
discharge: 'Discharge',
|
|
};
|
|
|
|
export const BACKTEST_STATUS_LABELS: Record<BacktestStatus, string> = {
|
|
pending: 'Pending',
|
|
running: 'Running',
|
|
completed: 'Completed',
|
|
failed: 'Failed',
|
|
cancelled: 'Cancelled',
|
|
};
|
|
|
|
export const MODEL_TYPE_LABELS: Record<ModelType, string> = {
|
|
price_prediction: 'Price Prediction',
|
|
rl_battery: 'RL Battery',
|
|
};
|
|
|
|
export const TRAINING_STATUS_LABELS: Record<TrainingStatus, string> = {
|
|
pending: 'Pending',
|
|
running: 'Running',
|
|
completed: 'Completed',
|
|
failed: 'Failed',
|
|
};
|
|
|
|
export const ALERT_TYPE_LABELS: Record<AlertType, string> = {
|
|
price_spike: 'Price Spike',
|
|
arbitrage_opportunity: 'Arbitrage Opportunity',
|
|
battery_low: 'Battery Low',
|
|
battery_full: 'Battery Full',
|
|
strategy_error: 'Strategy Error',
|
|
};
|