pyqqq 0.12.207__tar.gz → 0.12.208__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.
- {pyqqq-0.12.207 → pyqqq-0.12.208}/PKG-INFO +1 -1
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyproject.toml +1 -1
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/ebest/domestic_stock.py +1 -1
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/ebest/tr_client.py +7 -11
- {pyqqq-0.12.207 → pyqqq-0.12.208}/README.md +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/broker.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/environment.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/logger.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/positionprovider.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/strategy.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/utils.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/backtest/wallclock.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/ebest/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/ebest/oauth.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/ebest/simple.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/helper.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/domestic_stock.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/oauth.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/overseas_stock.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/simple.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/simple_overseas.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/kis/tr_client.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/multiprocess_tracker.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/brokerage/tracker.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/config.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/daily.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/domestic.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/index.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/minutes.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/overseas.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/realtime.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/ticks.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/data/us_stocks.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/datatypes.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/executors/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/executors/hook.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/__init__.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/api_client.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/array.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/backoff.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/casting.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/compute.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/copycat.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/daily_tickers.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/display.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/indicators.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/kvstore.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/limiter.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/local_cache.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/logger.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/market_schedule.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/mock_api.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/position_classifier.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/retry.py +0 -0
- {pyqqq-0.12.207 → pyqqq-0.12.208}/pyqqq/utils/singleton.py +0 -0
|
@@ -1248,7 +1248,7 @@ class EBestDomesticStock:
|
|
|
1248
1248
|
|
|
1249
1249
|
async def __on_connect(ws: websockets.WebSocketClientProtocol):
|
|
1250
1250
|
for asset_code in asset_codes:
|
|
1251
|
-
CallLimiter().wait_limit_rate(
|
|
1251
|
+
CallLimiter().wait_limit_rate(75, scope="ebest/listen_trade_event")
|
|
1252
1252
|
|
|
1253
1253
|
await ws.send(
|
|
1254
1254
|
json.dumps(
|
|
@@ -140,6 +140,7 @@ class EBestTRWebsocketClient:
|
|
|
140
140
|
dict: 실시간 데이터
|
|
141
141
|
|
|
142
142
|
"""
|
|
143
|
+
connected_count = 0
|
|
143
144
|
websocket_url = f"{self.auth.websocket_url}/websocket"
|
|
144
145
|
|
|
145
146
|
while not self.stop_event.is_set():
|
|
@@ -154,9 +155,11 @@ class EBestTRWebsocketClient:
|
|
|
154
155
|
continue
|
|
155
156
|
|
|
156
157
|
async with websockets.connect(websocket_url) as ws:
|
|
157
|
-
|
|
158
|
+
connected_count += 1
|
|
159
|
+
self.logger.warning(f"{self.session_id}: connected to websocket (count: {connected_count})")
|
|
158
160
|
if self.on_connect:
|
|
159
161
|
await self.on_connect(ws)
|
|
162
|
+
self.logger.info(f"{self.session_id}: on_connect callback done")
|
|
160
163
|
|
|
161
164
|
while not self.stop_event.is_set():
|
|
162
165
|
data = await self.recv_with_timeout(ws, timeout=1)
|
|
@@ -167,7 +170,7 @@ class EBestTRWebsocketClient:
|
|
|
167
170
|
|
|
168
171
|
else:
|
|
169
172
|
if json_data["header"]["rsp_cd"] != "00000":
|
|
170
|
-
self.logger.
|
|
173
|
+
self.logger.warning(f"{self.session_id}: {json_data}")
|
|
171
174
|
|
|
172
175
|
elif self.on_ask_keep_connection() == EBestTRWebsocketKeepConnectionStatus.CLOSE:
|
|
173
176
|
break
|
|
@@ -180,24 +183,17 @@ class EBestTRWebsocketClient:
|
|
|
180
183
|
continue
|
|
181
184
|
|
|
182
185
|
except websockets.ConnectionClosed as e:
|
|
186
|
+
self.logger.error(f"{self.session_id}: ConnectionClosed: {e}")
|
|
183
187
|
await asyncio.sleep(1)
|
|
184
|
-
self.logger.exception(e)
|
|
185
188
|
continue
|
|
186
189
|
|
|
187
190
|
except ssl.SSLZeroReturnError:
|
|
188
191
|
self.logger.error(f"{self.session_id}: SSLZeroReturnError")
|
|
189
|
-
|
|
190
|
-
if not hasattr(self, "_sslzero_exc_count"):
|
|
191
|
-
self._sslzero_exc_count = 0
|
|
192
|
-
if self._sslzero_exc_count < 3:
|
|
193
|
-
self._sslzero_exc_count += 1
|
|
194
|
-
traceback.print_exc()
|
|
195
|
-
|
|
196
192
|
await asyncio.sleep(random.uniform(1, 2))
|
|
197
193
|
continue
|
|
198
194
|
|
|
199
195
|
except TimeoutError as e:
|
|
200
|
-
self.logger.
|
|
196
|
+
self.logger.error(f"{self.session_id}: TimeoutError: {e}")
|
|
201
197
|
await asyncio.sleep(1)
|
|
202
198
|
continue
|
|
203
199
|
|
|
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
|