Split websocket package in multiple sub-package. Split handlers.py in public_channels_handler.py and authenticated_channels_handler.py. Rename files attaining to new conventions.

This commit is contained in:
Davide Casale
2023-02-13 19:09:38 +01:00
parent 6a7577f98b
commit f0f150cec2
11 changed files with 117 additions and 91 deletions

View File

@@ -1,6 +1,8 @@
from typing import TypedDict, Optional
from typing import TypedDict, Union, Optional
__all__ = [
"Subscription",
"Ticker",
"Trades",
"Book",
@@ -8,6 +10,10 @@ __all__ = [
"Status"
]
_Header = TypedDict("_Header", { "event": str, "channel": str, "subId": str })
Subscription = Union["Ticker", "Trades", "Book", "Candles", "Status"]
class Ticker(TypedDict):
chanId: int; symbol: str
pair: Optional[str]