mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
Separate _BfxWebsocketInputs from bfxapi/websocket/BfxWebsocketClient.py to _BfxWebsocketInputs.py. Rename websocket authenticated inputs methods. Refactoring to maintain consistency across the library.
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from typing import Type, Tuple, List, Dict, TypedDict, Union, Optional, Any
|
||||
|
||||
from ..utils.integers import Int16, Int32, Int45, Int64
|
||||
|
||||
JSON = Union[Dict[str, "JSON"], List["JSON"], bool, int, float, str, Type[None]]
|
||||
|
||||
#region Type hinting for subscription objects
|
||||
@@ -291,56 +285,4 @@ class Notification(TypedDict):
|
||||
STATUS: str
|
||||
TEXT: str
|
||||
|
||||
#endregion
|
||||
|
||||
#region Type hinting for Websocket Authenticated Inputs
|
||||
|
||||
class Inputs:
|
||||
class Order:
|
||||
class New(TypedDict, total=False):
|
||||
gid: Union[Int32, int]
|
||||
cid: Union[Int45, int]
|
||||
type: str
|
||||
symbol: str
|
||||
amount: Union[Decimal, str]
|
||||
price: Union[Decimal, str]
|
||||
lev: Union[Int32, int]
|
||||
price_trailing: Union[Decimal, str]
|
||||
price_aux_limit: Union[Decimal, str]
|
||||
price_oco_stop: Union[Decimal, str]
|
||||
flags: Union[Int16, int]
|
||||
tif: Union[datetime, str]
|
||||
meta: JSON
|
||||
|
||||
class Update(TypedDict, total=False):
|
||||
id: Union[Int64, int]
|
||||
cid: Union[Int45, int]
|
||||
cid_date: str
|
||||
gid: Union[Int32, int]
|
||||
price: Union[Decimal, str]
|
||||
amount: Union[Decimal, str]
|
||||
lev: Union[Int32, int]
|
||||
delta: Union[Decimal, str]
|
||||
price_aux_limit: Union[Decimal, str]
|
||||
price_trailing: Union[Decimal, str]
|
||||
flags: Union[Int16, int]
|
||||
tif: Union[datetime, str]
|
||||
|
||||
class Cancel(TypedDict, total=False):
|
||||
id: Union[Int64, int]
|
||||
cid: Union[Int45, int]
|
||||
cid_date: Union[datetime, str]
|
||||
|
||||
class Offer:
|
||||
class New(TypedDict, total=False):
|
||||
type: str
|
||||
symbol: str
|
||||
amount: Union[Decimal, str]
|
||||
rate: Union[Decimal, str]
|
||||
period: Union[Int32, int]
|
||||
flags: Union[Int16, int]
|
||||
|
||||
class Cancel(TypedDict, total=False):
|
||||
id: Union[Int32, int]
|
||||
|
||||
#endregion
|
||||
Reference in New Issue
Block a user