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:
parent
c89e0312fa
commit
30e5d0828e
4 changed files with 84 additions and 1 deletions
|
|
@ -68,6 +68,23 @@ class AppointmentStatus(str, PyEnum):
|
|||
CANCELLED_BY_ADMIN = "cancelled_by_admin"
|
||||
|
||||
|
||||
class ExchangeStatus(str, PyEnum):
|
||||
"""Status of an exchange trade."""
|
||||
|
||||
BOOKED = "booked"
|
||||
COMPLETED = "completed"
|
||||
CANCELLED_BY_USER = "cancelled_by_user"
|
||||
CANCELLED_BY_ADMIN = "cancelled_by_admin"
|
||||
NO_SHOW = "no_show"
|
||||
|
||||
|
||||
class TradeDirection(str, PyEnum):
|
||||
"""Direction of a trade from the user's perspective."""
|
||||
|
||||
BUY = "buy" # User buys BTC, gives EUR
|
||||
SELL = "sell" # User sells BTC, gets EUR
|
||||
|
||||
|
||||
# Role name constants
|
||||
ROLE_ADMIN = "admin"
|
||||
ROLE_REGULAR = "regular"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue