Skip to content

Commit eeb6e97

Browse files
Fix bug in code blocks inside README.md.
1 parent e6b5b32 commit eeb6e97

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ python3 -m pip install bitfinex-api-py==3.0.0b1
3434
```python
3535
from bfxapi import Client, REST_HOST
3636

37-
from bfxapi.rest.types import Notification, Order
37+
from bfxapi.types import Notification, Order
3838

3939
bfx = 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")
168168
async 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")
187187
def 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

299300
from bfxapi import Client, WSS_HOST
300301

301-
from bfxapi.websocket.types import Notification, Order
302+
from bfxapi.types import Notification, Order
302303

303304
bfx = Client(
304305
wss_host=WSS_HOST,

0 commit comments

Comments
 (0)