Sync demos in examples/websocket with new bfxapi improvements.

This commit is contained in:
Davide Casale
2023-01-19 16:35:17 +01:00
parent 578882b4c2
commit c471a3b52b
4 changed files with 7 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ import os
from bfxapi.client import Client, Constants
from bfxapi.websocket.enums import Error, OrderType
from bfxapi.websocket.typings import Notification, Order
from bfxapi.websocket.types import Notification, Order
bfx = Client(
WSS_HOST=Constants.WSS_HOST,
@@ -30,7 +30,7 @@ async def on_authenticated(event):
print("The order has been sent.")
@bfx.wss.on("on-req-notification")
async def on_notification(notification: Notification):
async def on_notification(notification: Notification[Order]):
print(f"Notification: {notification}.")
@bfx.wss.on("order_new")