pyqqq 0.12.172__tar.gz → 0.12.173__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.172 → pyqqq-0.12.173}/PKG-INFO +1 -1
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyproject.toml +1 -1
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/broker.py +16 -7
- {pyqqq-0.12.172 → pyqqq-0.12.173}/README.md +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/ai/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/ai/daily.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/ai/domestic.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/ai/market_schedule.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/ai/minute.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/environment.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/logger.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/positionprovider.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/strategy.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/utils.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/backtest/wallclock.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/ebest/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/ebest/domestic_stock.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/ebest/oauth.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/ebest/simple.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/ebest/tr_client.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/helper.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/domestic_stock.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/oauth.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/overseas_stock.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/simple.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/simple_overseas.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/kis/tr_client.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/multiprocess_tracker.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/brokerage/tracker.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/config.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/daily.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/domestic.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/index.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/minutes.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/overseas.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/realtime.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/ticks.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/data/us_stocks.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/datatypes.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/executors/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/executors/hook.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/__init__.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/api_client.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/array.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/casting.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/compute.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/copycat.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/daily_tickers.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/display.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/kvstore.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/limiter.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/local_cache.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/logger.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/market_schedule.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/mock_api.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/position_classifier.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/retry.py +0 -0
- {pyqqq-0.12.172 → pyqqq-0.12.173}/pyqqq/utils/singleton.py +0 -0
|
@@ -121,9 +121,13 @@ class BaseBroker(ABC):
|
|
|
121
121
|
raise NotImplementedError
|
|
122
122
|
|
|
123
123
|
@abstractmethod
|
|
124
|
-
def get_pending_orders(
|
|
124
|
+
def get_pending_orders(
|
|
125
|
+
self,
|
|
126
|
+
exchanges: List[OrderExchange] = [OrderExchange.KRX]
|
|
127
|
+
) -> List[StockOrder]:
|
|
125
128
|
"""미체결된 모든 주문을 조회합니다.
|
|
126
|
-
|
|
129
|
+
Args:
|
|
130
|
+
exchanges (List[OrderExchange], optional): 조회할 거래소 리스트 (기본값: [OrderExchange.KRX])
|
|
127
131
|
Returns:
|
|
128
132
|
List[StockOrder]: 미체결 주문 객체 리스트
|
|
129
133
|
|
|
@@ -326,11 +330,15 @@ class TradingBroker(BaseBroker):
|
|
|
326
330
|
result = self.data_api.get_orderbook(code, data_exchange=DataExchange.KRX)
|
|
327
331
|
return result
|
|
328
332
|
|
|
329
|
-
def get_pending_orders(self):
|
|
330
|
-
return self.trading_api.get_pending_orders()
|
|
333
|
+
def get_pending_orders(self, exchanges: List[OrderExchange] = [OrderExchange.KRX]):
|
|
334
|
+
return self.trading_api.get_pending_orders(exchanges)
|
|
331
335
|
|
|
332
|
-
def _get_pending_order(
|
|
333
|
-
|
|
336
|
+
def _get_pending_order(
|
|
337
|
+
self,
|
|
338
|
+
order_no: str,
|
|
339
|
+
exchanges: List[OrderExchange] = [OrderExchange.KRX],
|
|
340
|
+
) -> StockOrder | None:
|
|
341
|
+
orders = self.get_pending_orders(exchanges=exchanges)
|
|
334
342
|
return next((o for o in orders if o["order_no"] == order_no), None)
|
|
335
343
|
|
|
336
344
|
def get_positions(self):
|
|
@@ -765,7 +773,8 @@ class MockBroker(BaseBroker):
|
|
|
765
773
|
df = _exclude_today(df)
|
|
766
774
|
return df
|
|
767
775
|
|
|
768
|
-
def get_pending_orders(self):
|
|
776
|
+
def get_pending_orders(self, exchanges: List[OrderExchange] = [OrderExchange.KRX]):
|
|
777
|
+
# MockBroker 에서는 SOR, NXT 주문을 현재 구분하지 않음.
|
|
769
778
|
return self.pending_orders
|
|
770
779
|
|
|
771
780
|
def get_positions(self):
|
|
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
|