Add order_multiple_operations input in _BfxWebsocketInputs.

This commit is contained in:
Davide Casale
2022-11-30 17:34:13 +01:00
parent e71d4b6e26
commit 509223ae9b
2 changed files with 5 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ from enum import Enum
from pyee.asyncio import AsyncIOEventEmitter from pyee.asyncio import AsyncIOEventEmitter
from .typings import Inputs from .typings import Inputs, Tuple, Union
from .handlers import Channels, PublicChannelsHandler, AuthenticatedChannelsHandler from .handlers import Channels, PublicChannelsHandler, AuthenticatedChannelsHandler
from .exceptions import ConnectionNotOpen, TooManySubscriptions, WebsocketAuthenticationRequired, InvalidAuthenticationCredentials, EventNotSupported, OutdatedClientVersion 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): async def order_cancel(self, data: Inputs.Order.Cancel):
await self.__handle_websocket_input("oc", data) 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): async def offer_new(self, data: Inputs.Offer.New):
await self.__handle_websocket_input("fon", data) await self.__handle_websocket_input("fon", data)

View File

@@ -2,7 +2,7 @@ from decimal import Decimal
from datetime import datetime 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 int16 = int32 = int45 = int64 = int