Fix bugs and differences in namings/types/fields between bfxapi.rest.types, bfxapi.rest.serializers and bfxapi.websocket.types, bfxapi.websocket.serializers.

This commit is contained in:
Davide Casale
2023-01-31 18:54:15 +01:00
parent 7b313ddcab
commit 40a48184da
5 changed files with 95 additions and 97 deletions

View File

@@ -139,7 +139,7 @@ class AuthenticatedChannelsHandler(object):
("fcs", "fcn", "fcu", "fcc",): serializers.FundingCredit,
("fls", "fln", "flu", "flc",): serializers.FundingLoan,
("ws", "wu",): serializers.Wallet,
("bu",): serializers.BalanceInfo
("bu",): serializers.Balance
}
EVENTS = [

View File

@@ -89,7 +89,7 @@ Candle = generate_labeler_serializer("Candle", klass=types.Candle, labels=[
])
DerivativesStatus = generate_labeler_serializer("DerivativesStatus", klass=types.DerivativesStatus, labels=[
"time_ms",
"mts",
"_PLACEHOLDER",
"deriv_price",
"spot_price",
@@ -194,15 +194,15 @@ Trade = generate_labeler_serializer("Trade", klass=types.Trade, labels=[
FundingOffer = generate_labeler_serializer("FundingOffer", klass=types.FundingOffer, labels=[
"id",
"symbol",
"mts_created",
"mts_updated",
"mts_create",
"mts_update",
"amount",
"amount_orig",
"offer_type",
"_PLACEHOLDER",
"_PLACEHOLDER",
"flags",
"status",
"offer_status",
"_PLACEHOLDER",
"_PLACEHOLDER",
"_PLACEHOLDER",
@@ -235,7 +235,7 @@ FundingCredit = generate_labeler_serializer("FundingCredit", klass=types.Funding
"hidden",
"_PLACEHOLDER",
"renew",
"rate_real",
"_PLACEHOLDER",
"no_close",
"position_pair"
])
@@ -260,7 +260,7 @@ FundingLoan = generate_labeler_serializer("FundingLoan", klass=types.FundingLoan
"hidden",
"_PLACEHOLDER",
"renew",
"rate_real",
"_PLACEHOLDER",
"no_close"
])
@@ -269,12 +269,12 @@ Wallet = generate_labeler_serializer("Wallet", klass=types.Wallet, labels=[
"currency",
"balance",
"unsettled_interest",
"balance_available",
"description",
"meta"
"available_balance",
"last_change",
"trade_details"
])
BalanceInfo = generate_labeler_serializer("BalanceInfo", klass=types.BalanceInfo, labels=[
Balance = generate_labeler_serializer("Balance", klass=types.Balance, labels=[
"aum",
"aum_net",
])

View File

@@ -90,7 +90,7 @@ class Candle(_Type):
@dataclass
class DerivativesStatus(_Type):
time_ms: int
mts: int
deriv_price: float
spot_price: float
insurance_fund_balance: float
@@ -170,13 +170,13 @@ class Trade(_Type):
class FundingOffer(_Type):
id: int
symbol: str
mts_created: int
mts_updated: int
mts_create: int
mts_update: int
amount: float
amount_orig: float
offer_type: str
flags: int
status: str
offer_status: str
rate: float
period: int
notify: int
@@ -200,7 +200,6 @@ class FundingCredit(_Type):
notify: int
hidden: int
renew: int
rate_real: float
no_close: int
position_pair: str
@@ -221,7 +220,6 @@ class FundingLoan(_Type):
notify: int
hidden: int
renew: int
rate_real: float
no_close: int
@dataclass
@@ -230,12 +228,12 @@ class Wallet(_Type):
currency: str
balance: float
unsettled_interest: float
balance_available: float
description: str
meta: JSON
available_balance: float
last_change: str
trade_details: JSON
@dataclass
class BalanceInfo(_Type):
class Balance(_Type):
aum: float
aum_net: float