wiz-trader 0.28.0__tar.gz → 0.29.0__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.
- {wiz_trader-0.28.0/src/wiz_trader.egg-info → wiz_trader-0.29.0}/PKG-INFO +1 -1
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/pyproject.toml +1 -1
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/setup.py +1 -1
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader/__init__.py +1 -1
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader/quotes/client.py +3 -2
- {wiz_trader-0.28.0 → wiz_trader-0.29.0/src/wiz_trader.egg-info}/PKG-INFO +1 -1
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/MANIFEST.in +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/README.md +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/setup.cfg +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader/apis/__init__.py +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader/apis/client.py +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader/quotes/__init__.py +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader.egg-info/SOURCES.txt +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader.egg-info/dependency_links.txt +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader.egg-info/requires.txt +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/src/wiz_trader.egg-info/top_level.txt +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/tests/test_apis.py +0 -0
- {wiz_trader-0.28.0 → wiz_trader-0.29.0}/tests/test_quotes.py +0 -0
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='wiz_trader',
|
5
|
-
version='0.
|
5
|
+
version='0.29.0',
|
6
6
|
description='A Python SDK for connecting to the Wizzer.',
|
7
7
|
long_description=open('README.md').read() if open('README.md') else "",
|
8
8
|
long_description_content_type='text/markdown',
|
@@ -7,6 +7,7 @@ from typing import Callable, List, Optional, Any, Iterator
|
|
7
7
|
|
8
8
|
import websockets
|
9
9
|
from websockets.exceptions import ConnectionClosed
|
10
|
+
from websockets.protocol import State
|
10
11
|
|
11
12
|
# Setup module‐level logger with a default handler if none exists.
|
12
13
|
logger = logging.getLogger(__name__)
|
@@ -210,7 +211,7 @@ class QuotesClient:
|
|
210
211
|
# -- Async core methods (for internal use) --
|
211
212
|
|
212
213
|
async def _subscribe_async(self, instruments: List[str], mode: str = MODE_TICKS) -> None:
|
213
|
-
if self.ws and self.ws.
|
214
|
+
if self.ws and self.ws.state == State.OPEN:
|
214
215
|
new = set(instruments) - self.subscribed_instruments
|
215
216
|
if new:
|
216
217
|
self.subscribed_instruments |= new
|
@@ -235,7 +236,7 @@ class QuotesClient:
|
|
235
236
|
self.subscription_modes[instrument] = mode
|
236
237
|
|
237
238
|
async def _unsubscribe_async(self, instruments: List[str]) -> None:
|
238
|
-
if self.ws and self.ws.
|
239
|
+
if self.ws and self.ws.state == State.OPEN:
|
239
240
|
to_remove = set(instruments) & self.subscribed_instruments
|
240
241
|
if to_remove:
|
241
242
|
self.subscribed_instruments -= to_remove
|
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
|