diff --git a/bfxapi/websocket/BfxWebsocketClient.py b/bfxapi/websocket/BfxWebsocketClient.py index 3fa2281..0884c6f 100644 --- a/bfxapi/websocket/BfxWebsocketClient.py +++ b/bfxapi/websocket/BfxWebsocketClient.py @@ -4,7 +4,7 @@ from enum import Enum from pyee.asyncio import AsyncIOEventEmitter -from .typings import Inputs +from .typings import Inputs, Tuple, Union from .handlers import Channels, PublicChannelsHandler, AuthenticatedChannelsHandler from .exceptions import ConnectionNotOpen, TooManySubscriptions, WebsocketAuthenticationRequired, InvalidAuthenticationCredentials, EventNotSupported, OutdatedClientVersion @@ -234,6 +234,9 @@ class _BfxWebsocketInputs(object): async def order_cancel(self, data: Inputs.Order.Cancel): await self.__handle_websocket_input("oc", data) + async def order_multiple_operations(self, *args: Tuple[str, Union[Inputs.Order.New, Inputs.Order.Update, Inputs.Order.Cancel]]): + await self.__handle_websocket_input("ox_multi", args) + async def offer_new(self, data: Inputs.Offer.New): await self.__handle_websocket_input("fon", data) diff --git a/bfxapi/websocket/typings.py b/bfxapi/websocket/typings.py index 8bd5dde..4a3b918 100644 --- a/bfxapi/websocket/typings.py +++ b/bfxapi/websocket/typings.py @@ -2,7 +2,7 @@ from decimal import Decimal from datetime import datetime -from typing import Type, List, Dict, TypedDict, Union, Optional, Any +from typing import Type, Tuple, List, Dict, TypedDict, Union, Optional, Any int16 = int32 = int45 = int64 = int