Merge bfxapi.rest.types and bfxapi.websocket.types in bfxapi.tests sub-package.

This commit is contained in:
Davide Casale
2023-04-20 03:44:13 +02:00
parent 34a1b0099e
commit 0f9fa1bf6a
32 changed files with 164 additions and 759 deletions

View File

@@ -1,9 +1,9 @@
from .. import serializers
from .. serializers import _Notification
from .. exceptions import HandlerNotFound
from ... types import serializers
from ... types.serializers import _Notification
class AuthenticatedEventsHandler:
__once_abbreviations = {
"os": "order_snapshot", "ps": "position_snapshot", "fos": "funding_offer_snapshot",
@@ -16,8 +16,7 @@ class AuthenticatedEventsHandler:
"fon": "funding_offer_new", "fou": "funding_offer_update", "foc": "funding_offer_cancel",
"fcn": "funding_credit_new", "fcu": "funding_credit_update", "fcc": "funding_credit_close",
"fln": "funding_loan_new", "flu": "funding_loan_update", "flc": "funding_loan_close",
"te": "trade_execution", "tu": "trade_execution_update", "wu": "wallet_update",
"bu": "balance_update"
"te": "trade_execution", "tu": "trade_execution_update", "wu": "wallet_update"
}
__abbreviations = {
@@ -32,8 +31,7 @@ class AuthenticatedEventsHandler:
("fos", "fon", "fou", "foc",): serializers.FundingOffer,
("fcs", "fcn", "fcu", "fcc",): serializers.FundingCredit,
("fls", "fln", "flu", "flc",): serializers.FundingLoan,
("ws", "wu",): serializers.Wallet,
("bu",): serializers.Balance
("ws", "wu",): serializers.Wallet
}
ONCE_EVENTS = [