You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
768 B

"""Some errors to catch."""
class TradingException(Exception):
"""An error connected to the trading logic."""
message: str
def __init__(self, message):
self.message = message
class OrderException(TradingException):
"""An order execution was unsuccessfull."""
class UnknowOrder(OrderException):
"""The exectuor can't process this order."""
class OrderFails(OrderException):
"""The order placement failed."""
class PTFException(TradingException):
"""An error occur inside the PTF."""
class StrategyError(TradingException):
"""An error linked to a strategy was encountered."""
class StrategyInitError(StrategyError):
"""An error occurred during the strategy initialization."""