mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
Add new endpoints in BfxRestInterfaces.py (with serializers and typings).
This commit is contained in:
@@ -13,7 +13,7 @@ class _Serializer(Generic[T]):
|
||||
def __serialize(self, *args: Any, skip: Optional[List[str]]) -> Iterable[T]:
|
||||
labels = list(filter(lambda label: label not in (skip or list()), self.__labels))
|
||||
|
||||
if len(labels) != len(args):
|
||||
if len(labels) > len(args):
|
||||
raise BfxRestException("<labels> and <*args> arguments should contain the same amount of elements.")
|
||||
|
||||
for index, label in enumerate(labels):
|
||||
@@ -176,4 +176,32 @@ Liquidation = _Serializer[typings.Liquidation]("Liquidation", labels=[
|
||||
"PRICE_ACQUIRED"
|
||||
])
|
||||
|
||||
Leaderboard = _Serializer[typings.Leaderboard]("Leaderboard", labels=[
|
||||
"MTS",
|
||||
"_PLACEHOLDER",
|
||||
"USERNAME",
|
||||
"RANKING",
|
||||
"_PLACEHOLDER",
|
||||
"_PLACEHOLDER",
|
||||
"VALUE",
|
||||
"_PLACEHOLDER",
|
||||
"_PLACEHOLDER",
|
||||
"TWITTER_HANDLE"
|
||||
])
|
||||
|
||||
FundingStat = _Serializer[typings.FundingStat]("FundingStat", labels=[
|
||||
"TIMESTAMP",
|
||||
"_PLACEHOLDER",
|
||||
"_PLACEHOLDER",
|
||||
"FRR",
|
||||
"AVG_PERIOD",
|
||||
"_PLACEHOLDER",
|
||||
"_PLACEHOLDER",
|
||||
"FUNDING_AMOUNT",
|
||||
"FUNDING_AMOUNT_USED",
|
||||
"_PLACEHOLDER",
|
||||
"_PLACEHOLDER",
|
||||
"FUNDING_BELOW_THRESHOLD"
|
||||
])
|
||||
|
||||
#endregion
|
||||
Reference in New Issue
Block a user