Skip to content

Commit 0c1f7a5

Browse files
committed
example cleanup
1 parent a50bc3b commit 0c1f7a5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

examples/15_order_lifecycle_tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async def demonstrate_order_tracker() -> None:
100100
try:
101101
# Wait for any terminal status
102102
print("Waiting for order completion...")
103-
completed = await tracker.wait_for_status(2, timeout=5) # FILLED
103+
_completed = await tracker.wait_for_status(2, timeout=5) # FILLED
104104
print("✅ Order reached FILLED status")
105105

106106
except TimeoutError:

examples/15_risk_management.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ async def main() -> None:
140140
stop_loss=current_price - 50,
141141
take_profit=current_price + 100,
142142
)
143-
143+
144144
# Optional: Scale in if conditions are met
145145
if favorable_conditions:
146146
await trade.scale_in(additional_size=1)
147-
147+
148148
# Optional: Adjust stop to breakeven
149149
if price_moved_favorably:
150150
await trade.adjust_stop(new_stop_loss=entry_price)

examples/16_managed_trades.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,21 @@ async def advanced_trade_management(suite: TradingSuite) -> None:
9898
stop_loss=entry_price - 30, # $30 stop
9999
order_type=OrderType.LIMIT,
100100
)
101-
101+
102102
# Wait for fill
103103
await suite.wait_for(EventType.ORDER_FILLED, timeout=300)
104-
104+
105105
# Scale in if price dips
106106
if current_price < entry_price - 5:
107107
await trade.scale_in(
108108
additional_size=1,
109109
new_stop_loss=entry_price - 25, # Tighten stop
110110
)
111-
111+
112112
# Move stop to breakeven after profit
113113
if current_price > entry_price + 20:
114114
await trade.adjust_stop(new_stop_loss=entry_price)
115-
115+
116116
# Scale out partial position
117117
if current_price > entry_price + 40:
118118
await trade.scale_out(

src/project_x_py/realtime_data_manager/data_access.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
import polars as pl
9999

100100
if TYPE_CHECKING:
101-
from project_x_py.types import RealtimeDataManagerProtocol
101+
pass
102102

103103
logger = logging.getLogger(__name__)
104104

0 commit comments

Comments
 (0)