contango.trading.execution.engine.fills.fill_rule
contango.trading.execution.engine.fills.fill_rule
FillRule
Bases: ABC, Generic[T]
A single rule for validation when attempting to fill an order.
reason
abstractmethod
property
reason: str
Returns the reason displayed upon the rule failing.
validate
abstractmethod
validate(context: T) -> bool
Validates the state of the given rule for a policy.
Returns:
| Type | Description |
|---|---|
bool
|
Whether or not the rule passed validation. |
Source code in src\contango\trading\execution\engine\fills\fill_rule.py
22 23 24 25 26 27 28 29 30 | |