pyqqq 0.12.173__tar.gz → 0.12.174__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyqqq might be problematic. Click here for more details.
- {pyqqq-0.12.173 → pyqqq-0.12.174}/PKG-INFO +1 -1
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyproject.toml +1 -1
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/broker.py +10 -1
- {pyqqq-0.12.173 → pyqqq-0.12.174}/README.md +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/ai/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/ai/daily.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/ai/domestic.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/ai/market_schedule.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/ai/minute.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/environment.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/logger.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/positionprovider.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/strategy.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/utils.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/backtest/wallclock.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/ebest/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/ebest/domestic_stock.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/ebest/oauth.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/ebest/simple.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/ebest/tr_client.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/helper.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/domestic_stock.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/oauth.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/overseas_stock.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/simple.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/simple_overseas.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/kis/tr_client.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/multiprocess_tracker.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/brokerage/tracker.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/config.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/daily.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/domestic.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/index.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/minutes.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/overseas.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/realtime.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/ticks.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/data/us_stocks.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/datatypes.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/executors/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/executors/hook.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/__init__.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/api_client.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/array.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/casting.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/compute.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/copycat.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/daily_tickers.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/display.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/kvstore.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/limiter.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/local_cache.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/logger.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/market_schedule.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/mock_api.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/position_classifier.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/retry.py +0 -0
- {pyqqq-0.12.173 → pyqqq-0.12.174}/pyqqq/utils/singleton.py +0 -0
|
@@ -339,7 +339,7 @@ class TradingBroker(BaseBroker):
|
|
|
339
339
|
exchanges: List[OrderExchange] = [OrderExchange.KRX],
|
|
340
340
|
) -> StockOrder | None:
|
|
341
341
|
orders = self.get_pending_orders(exchanges=exchanges)
|
|
342
|
-
return next((o for o in orders if o
|
|
342
|
+
return next((o for o in orders if o.order_no == order_no), None)
|
|
343
343
|
|
|
344
344
|
def get_positions(self):
|
|
345
345
|
"""
|
|
@@ -373,7 +373,16 @@ class TradingBroker(BaseBroker):
|
|
|
373
373
|
return self.trading_api.cancel_order(order.asset_code, order_no, quantity)
|
|
374
374
|
else:
|
|
375
375
|
raise ValueError(f"order not found: {order_no}")
|
|
376
|
+
|
|
377
|
+
elif isinstance(self.trading_api, KISSimpleDomesticStock):
|
|
378
|
+
order = self._get_pending_order(order_no, exchanges=[OrderExchange.KRX, OrderExchange.NXT, OrderExchange.SOR])
|
|
379
|
+
if order is not None:
|
|
380
|
+
self.logger.debug(f"cancel_order: {order_no} {quantity} {order.exchange}")
|
|
381
|
+
return self.trading_api.cancel_order(org_order_no=order_no, quantity=quantity, exchange=order.exchange)
|
|
382
|
+
else:
|
|
383
|
+
raise ValueError(f"order not found: {order_no}")
|
|
376
384
|
else:
|
|
385
|
+
# ebest simple에서는 exchange를 사용하지 않음
|
|
377
386
|
self.logger.debug(f"cancel_order: {order_no} {quantity}")
|
|
378
387
|
return self.trading_api.cancel_order(order_no, quantity)
|
|
379
388
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|