mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
Remove support for datetime type and improve typing in several files.
This commit is contained in:
@@ -5,12 +5,10 @@ if TYPE_CHECKING:
|
||||
from bfxapi.enums import \
|
||||
OrderType, FundingOfferType
|
||||
|
||||
from bfxapi.types import JSON
|
||||
from bfxapi.utils.json_encoder import JSON
|
||||
|
||||
from decimal import Decimal
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
class BfxWebSocketInputs:
|
||||
def __init__(self, handle_websocket_input: Callable[[str, Any], Awaitable[None]]) -> None:
|
||||
self.__handle_websocket_input = handle_websocket_input
|
||||
@@ -28,9 +26,8 @@ class BfxWebSocketInputs:
|
||||
gid: Optional[int] = None,
|
||||
cid: Optional[int] = None,
|
||||
flags: Optional[int] = 0,
|
||||
tif: Optional[Union["datetime", str]] = None,
|
||||
tif: Optional[str] = None,
|
||||
meta: Optional["JSON"] = None) -> None:
|
||||
|
||||
await self.__handle_websocket_input("on", {
|
||||
"type": type, "symbol": symbol, "amount": amount,
|
||||
"price": price, "lev": lev, "price_trailing": price_trailing,
|
||||
@@ -52,7 +49,7 @@ class BfxWebSocketInputs:
|
||||
delta: Optional[Union["Decimal", float, str]] = None,
|
||||
price_aux_limit: Optional[Union["Decimal", float, str]] = None,
|
||||
price_trailing: Optional[Union["Decimal", float, str]] = None,
|
||||
tif: Optional[Union["datetime", str]] = None) -> None:
|
||||
tif: Optional[str] = None) -> None:
|
||||
await self.__handle_websocket_input("ou", {
|
||||
"id": id, "amount": amount, "price": price,
|
||||
"cid": cid, "cid_date": cid_date, "gid": gid,
|
||||
|
||||
Reference in New Issue
Block a user