@@ -34,7 +34,7 @@ python3 -m pip install bitfinex-api-py==3.0.0b1
3434``` python
3535from bfxapi import Client, REST_HOST
3636
37- from bfxapi.rest. types import Notification, Order
37+ from bfxapi.types import Notification, Order
3838
3939bfx = Client(
4040 rest_host = REST_HOST ,
@@ -166,7 +166,7 @@ To learn more about events and public channels, see [Listening to events](#liste
166166``` python
167167@bfx.wss.on (" open" )
168168async def on_open ():
169- await bfx.wss.subscribe(Channel. TICKER , symbol = " tBTCUSD" )
169+ await bfx.wss.subscribe(" ticker " , symbol = " tBTCUSD" )
170170```
171171
172172### Closing the connection
@@ -185,7 +185,8 @@ After closing the connection, the client will emit the `disconnection` event:
185185``` python
186186@bfx.wss.on (" disconnection" )
187187def on_disconnection (code : int , reason : str ):
188- print (f " Closing connection with code: < { code} >. Reason: { reason} . " )
188+ if code == 1000 or code == 1001 :
189+ print (" Closing the connection without errors!" )
189190```
190191
191192## Subscribing to public channels
@@ -298,7 +299,7 @@ import os
298299
299300from bfxapi import Client, WSS_HOST
300301
301- from bfxapi.websocket. types import Notification, Order
302+ from bfxapi.types import Notification, Order
302303
303304bfx = Client(
304305 wss_host = WSS_HOST ,
0 commit comments