intelligent-trading-bot/common/types.py

30 lines
794 B
Python
Raw Permalink Normal View History

2025-04-17 13:08:21 +01:00
from decimal import Decimal
2025-04-17 13:43:47 +01:00
from enum import Enum
2025-04-17 07:39:05 +01:00
2025-04-17 14:21:17 +01:00
class Venue(Enum):
YAHOO = "yahoo"
2025-04-17 14:21:17 +01:00
BINANCE = "binance"
MT5 = "mt5"
2025-04-17 07:39:05 +01:00
class AccountBalances:
"""
Available assets for trade
"""
# Can be set by the sync/recover function or updated by the trading algorithm
base_quantity = "0.04108219" # BTC owned (on account, already bought, available for trade)
quote_quantity = "1000.0" # USDT owned (on account, available for trade)
2025-04-17 13:08:21 +01:00
# mt5.AccountInfo
2025-04-17 14:21:17 +01:00
class MT5AccountInfo:
2025-04-17 13:08:21 +01:00
balance: Decimal = "10000"
2025-04-17 14:21:17 +01:00
equity: Decimal = "10000"
margin: Decimal = "0"
margin_free: Decimal = "10000"
margin_level: Decimal = "10000"
profit: Decimal = "0"
login: int = 0
currency: str = "USD"
name: str = ""
server: str = ""
leverage: int = 1