fix: persist uncertain cancel outcomes
This commit is contained in:
@@ -4,7 +4,14 @@ from __future__ import annotations
|
||||
from uuid import UUID
|
||||
|
||||
from trex_core.adapters.persistence.in_memory_intent_store import InMemoryIntentStore
|
||||
from trex_core.application.broker_port import BalanceItem, FillStatus, OrderAck, OrderRequest
|
||||
from trex_core.application.broker_port import (
|
||||
BalanceItem,
|
||||
CancelOutcome,
|
||||
CancelState,
|
||||
FillStatus,
|
||||
OrderAck,
|
||||
OrderRequest,
|
||||
)
|
||||
from trex_core.application.execution import ExecutionService
|
||||
from trex_core.application.intents import BuyIntent, IntentService
|
||||
from trex_core.application.messaging import RpcRequest
|
||||
@@ -38,9 +45,9 @@ class RecordingBroker:
|
||||
symbol: str,
|
||||
qty: int,
|
||||
venue: str = "KRX",
|
||||
) -> bool:
|
||||
) -> CancelOutcome:
|
||||
self.cancel_venues.append(venue)
|
||||
return True
|
||||
return CancelOutcome(CancelState.REQUESTED)
|
||||
|
||||
def get_balance(self) -> list[BalanceItem]:
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user