Phase 1.1: Add exchange configuration

- Add exchange constants to shared/constants.json:
  - eurTradeMin: 100, eurTradeMax: 3000, eurTradeIncrement: 20
  - premiumPercentage: 5
  - priceRefreshSeconds: 60, priceStalenessSeconds: 300
- Add exchangeStatuses and tradeDirections to shared constants
- Add ExchangeStatus and TradeDirection enums to models.py
- Update shared_constants.py to export new exchange constants
- Update validate_constants.py to validate new enums and fields
This commit is contained in:
counterweight 2025-12-22 18:16:35 +01:00
parent c89e0312fa
commit 30e5d0828e
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 84 additions and 1 deletions

View file

@ -11,3 +11,11 @@ SLOT_DURATION_MINUTES: int = _constants["booking"]["slotDurationMinutes"]
MIN_ADVANCE_DAYS: int = _constants["booking"]["minAdvanceDays"]
MAX_ADVANCE_DAYS: int = _constants["booking"]["maxAdvanceDays"]
NOTE_MAX_LENGTH: int = _constants["booking"]["noteMaxLength"]
# Exchange constants
EUR_TRADE_MIN: int = _constants["exchange"]["eurTradeMin"]
EUR_TRADE_MAX: int = _constants["exchange"]["eurTradeMax"]
EUR_TRADE_INCREMENT: int = _constants["exchange"]["eurTradeIncrement"]
PREMIUM_PERCENTAGE: int = _constants["exchange"]["premiumPercentage"]
PRICE_REFRESH_SECONDS: int = _constants["exchange"]["priceRefreshSeconds"]
PRICE_STALENESS_SECONDS: int = _constants["exchange"]["priceStalenessSeconds"]