31ece2e99a
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
723 B
Python
27 lines
723 B
Python
from pathlib import Path
|
|
import sys
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
if str(ROOT) not in sys.path:
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from src.services.execution import ExecutionService
|
|
|
|
|
|
def main() -> None:
|
|
service = ExecutionService()
|
|
signal_id = 1
|
|
decision = service.prepare_execution(signal_id=signal_id, execution_mode="paper")
|
|
if decision is None:
|
|
print("Signal not found")
|
|
return
|
|
execution_id = service.create_execution(signal_id=signal_id, execution_mode="paper")
|
|
print(
|
|
f"Execution allowed: {decision.allowed}; status: {decision.status}; "
|
|
f"reasons: {decision.reasons}; execution_id: {execution_id}"
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|