2222from kraken .spot .websocket import KrakenSpotWSClientBase
2323
2424
25- class KrakenSpotWSClient (KrakenSpotWSClientBase ):
25+ class KrakenSpotWSClientV1 (KrakenSpotWSClientBase ):
2626 """
2727 Class to access public and private/authenticated websocket connections.
2828
@@ -61,10 +61,10 @@ class KrakenSpotWSClient(KrakenSpotWSClientBase):
6161 :caption: HowTo: Use the Kraken Spot websocket client (v1)
6262
6363 import asyncio
64- from kraken.spot import KrakenSpotWSClient
64+ from kraken.spot import KrakenSpotWSClientV1
6565
6666
67- class Client(KrakenSpotWSClient ):
67+ class Client(KrakenSpotWSClientV1 ):
6868
6969 async def on_message(self, message):
7070 print(message)
@@ -99,14 +99,14 @@ async def main():
9999 :caption: HowTo: Use the websocket client (v1) as instance
100100
101101 import asyncio
102- from kraken.spot import KrakenSpotWSClient
102+ from kraken.spot import KrakenSpotWSClientV1
103103
104104
105105 async def main() -> None:
106106 async def on_message(message) -> None:
107107 print(message)
108108
109- client = KrakenSpotWSClient (callback=on_message)
109+ client = KrakenSpotWSClientV1 (callback=on_message)
110110 await client.subscribe(
111111 subscription={"name": "ticker"},
112112 pair=["XBT/USD"]
@@ -128,13 +128,13 @@ async def on_message(message) -> None:
128128 :caption: HowTo: Use the websocket client (v1) as context manager
129129
130130 import asyncio
131- from kraken.spot import KrakenSpotWSClient
131+ from kraken.spot import KrakenSpotWSClientV1
132132
133133 async def on_message(message):
134134 print(message)
135135
136136 async def main() -> None:
137- async with KrakenSpotWSClient (
137+ async with KrakenSpotWSClientV1 (
138138 key="api-key",
139139 secret="secret-key",
140140 callback=on_message
@@ -156,7 +156,7 @@ async def main() -> None:
156156 """
157157
158158 def __init__ (
159- self : KrakenSpotWSClient ,
159+ self : KrakenSpotWSClientV1 ,
160160 key : str = "" ,
161161 secret : str = "" ,
162162 callback : Optional [Callable ] = None ,
@@ -174,7 +174,7 @@ def __init__(
174174 )
175175
176176 async def send_message ( # pylint: disable=arguments-differ
177- self : KrakenSpotWSClient ,
177+ self : KrakenSpotWSClientV1 ,
178178 message : dict ,
179179 * ,
180180 private : bool = False ,
@@ -215,7 +215,7 @@ async def send_message( # pylint: disable=arguments-differ
215215 await socket .send (json .dumps (message ))
216216
217217 async def subscribe ( # pylint: disable=arguments-differ
218- self : KrakenSpotWSClient ,
218+ self : KrakenSpotWSClientV1 ,
219219 subscription : dict ,
220220 pair : Optional [list [str ]] = None ,
221221 ) -> None :
@@ -237,7 +237,7 @@ async def subscribe( # pylint: disable=arguments-differ
237237 :type pair: list[str], optional
238238
239239 Initialize your client as described in
240- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
240+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
241241
242242 .. code-block:: python
243243 :linenos:
@@ -287,7 +287,7 @@ async def subscribe( # pylint: disable=arguments-differ
287287 # await self.send_message(payload, private=False)
288288
289289 async def unsubscribe ( # pylint: disable=arguments-differ
290- self : KrakenSpotWSClient ,
290+ self : KrakenSpotWSClientV1 ,
291291 subscription : dict ,
292292 pair : Optional [list [str ]] = None ,
293293 ) -> None :
@@ -309,7 +309,7 @@ async def unsubscribe( # pylint: disable=arguments-differ
309309 :type pair: list[str], optional
310310
311311 Initialize your client as described in
312- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
312+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
313313
314314 .. code-block:: python
315315 :linenos:
@@ -359,7 +359,7 @@ async def unsubscribe( # pylint: disable=arguments-differ
359359 # await self.send_message(payload, private=False)
360360
361361 @property
362- def public_channel_names (self : KrakenSpotWSClient ) -> list [str ]:
362+ def public_channel_names (self : KrakenSpotWSClientV1 ) -> list [str ]:
363363 """
364364 Returns the public subscription names
365365
@@ -370,7 +370,7 @@ def public_channel_names(self: KrakenSpotWSClient) -> list[str]:
370370 return ["ticker" , "spread" , "book" , "ohlc" , "trade" , "*" ]
371371
372372 @property
373- def private_channel_names (self : KrakenSpotWSClient ) -> list [str ]:
373+ def private_channel_names (self : KrakenSpotWSClientV1 ) -> list [str ]:
374374 """
375375 Returns the private subscription names
376376
@@ -382,7 +382,7 @@ def private_channel_names(self: KrakenSpotWSClient) -> list[str]:
382382
383383 @ensure_string ("oflags" )
384384 async def create_order ( # noqa: PLR0913
385- self : KrakenSpotWSClient ,
385+ self : KrakenSpotWSClientV1 ,
386386 ordertype : str ,
387387 side : str ,
388388 pair : str ,
@@ -473,7 +473,7 @@ async def create_order( # noqa: PLR0913
473473 :rtype: None
474474
475475 Initialize your client as described in
476- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
476+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
477477
478478 .. code-block:: python
479479 :linenos:
@@ -549,7 +549,7 @@ async def create_order( # noqa: PLR0913
549549
550550 @ensure_string ("oflags" )
551551 async def edit_order ( # noqa: PLR0913
552- self : KrakenSpotWSClient ,
552+ self : KrakenSpotWSClientV1 ,
553553 orderid : str ,
554554 reqid : Optional [str | int ] = None ,
555555 pair : Optional [str ] = None ,
@@ -600,7 +600,7 @@ async def edit_order( # noqa: PLR0913
600600 :rtype: None
601601
602602 Initialize your client as described in
603- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
603+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
604604
605605 .. code-block:: python
606606 :linenos:
@@ -648,7 +648,7 @@ async def edit_order( # noqa: PLR0913
648648
649649 await self .send_message (message = payload , private = True )
650650
651- async def cancel_order (self : KrakenSpotWSClient , txid : list [str ]) -> None :
651+ async def cancel_order (self : KrakenSpotWSClientV1 , txid : list [str ]) -> None :
652652 """
653653 Cancel a specific order or a list of orders.
654654
@@ -664,7 +664,7 @@ async def cancel_order(self: KrakenSpotWSClient, txid: list[str]) -> None:
664664 :return: None
665665
666666 Initialize your client as described in
667- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
667+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
668668
669669 .. code-block:: python
670670 :linenos:
@@ -681,7 +681,7 @@ async def cancel_order(self: KrakenSpotWSClient, txid: list[str]) -> None:
681681 private = True ,
682682 )
683683
684- async def cancel_all_orders (self : KrakenSpotWSClient ) -> None :
684+ async def cancel_all_orders (self : KrakenSpotWSClientV1 ) -> None :
685685 """
686686 Cancel all open Spot orders.
687687
@@ -695,7 +695,7 @@ async def cancel_all_orders(self: KrakenSpotWSClient) -> None:
695695 :return: None
696696
697697 Initialize your client as described in
698- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
698+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
699699
700700 .. code-block:: python
701701 :linenos:
@@ -710,7 +710,7 @@ async def cancel_all_orders(self: KrakenSpotWSClient) -> None:
710710 await self .send_message (message = {"event" : "cancelAll" }, private = True )
711711
712712 async def cancel_all_orders_after (
713- self : KrakenSpotWSClient ,
713+ self : KrakenSpotWSClientV1 ,
714714 timeout : int = 0 ,
715715 ) -> None :
716716 """
@@ -729,7 +729,7 @@ async def cancel_all_orders_after(
729729 :return: None
730730
731731 Initialize your client as described in
732- :class:`kraken.spot.KrakenSpotWSClient ` to run the following example:
732+ :class:`kraken.spot.KrakenSpotWSClientV1 ` to run the following example:
733733
734734 .. code-block:: python
735735 :linenos:
@@ -747,4 +747,4 @@ async def cancel_all_orders_after(
747747 )
748748
749749
750- __all__ = ["KrakenSpotWSClient " ]
750+ __all__ = ["KrakenSpotWSClientV1 " ]
0 commit comments