Merge bfxapi.rest.types and bfxapi.websocket.types in bfxapi.tests sub-package.

This commit is contained in:
Davide Casale
2023-04-20 03:44:13 +02:00
parent 34a1b0099e
commit 0f9fa1bf6a
32 changed files with 164 additions and 759 deletions

View File

@@ -1,15 +1,15 @@
# python -c "import examples.websocket.public.derivatives_status"
from bfxapi import Client, PUB_WSS_HOST
from bfxapi.websocket.enums import Error, Channel
from bfxapi.websocket.types import DerivativesStatus
from bfxapi.types import DerivativesStatus
from bfxapi.websocket.subscriptions import Status
from bfxapi.websocket import subscriptions
from bfxapi.websocket.enums import Error, Channel
bfx = Client(wss_host=PUB_WSS_HOST)
@bfx.wss.on("derivatives_status_update")
def on_derivatives_status_update(subscription: subscriptions.Status, data: DerivativesStatus):
def on_derivatives_status_update(subscription: Status, data: DerivativesStatus):
print(f"{subscription}:", data)
@bfx.wss.on("wss-error")