Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions datamaxi/_ws_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@
"subscribe": True,
"unsubscribe": True,
},
"/front/liquidation/feed": {
"plan": "front",
"market": None,
"message": "LiquidationMessage",
"param": None,
"subscribe": False,
"unsubscribe": False,
},
"/front/listing/deposit": {
"plan": "front",
"market": None,
"message": "DepositListingMessage",
"param": None,
"subscribe": True,
"unsubscribe": True,
},
"/funding-rate": {
"plan": "basic",
"market": None,
Expand Down
31 changes: 23 additions & 8 deletions datamaxi/_ws_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
from typing import Any, Dict, List, TypedDict # noqa: F401


# source: asyncapi:payload
DepositListingMessage = TypedDict(
"DepositListingMessage",
{
"amount": float,
"amount_krw": float,
"amount_usd": float,
"asset": str,
"block_number": int,
"chain": str,
"exchange": str,
"from_address": str,
"timestamp": int,
"to_address": str,
"tx_hash": str,
"type": int,
},
total=False,
)


# source: asyncapi:payload
ForexMessage = TypedDict(
"ForexMessage",
Expand All @@ -34,7 +55,6 @@
"f": float,
"i": int,
"id": str,
"p": int,
"q": str,
"s": str,
},
Expand Down Expand Up @@ -62,18 +82,15 @@
"LiquidationMessage",
{
"b": str,
"d": str,
"d": int,
"e": str,
"id": str,
"p": float,
"pa": str,
"pfiat": float,
"pt": Dict[str, Any],
"pusd": float,
"q": str,
"s": str,
"sd": str,
"src": str,
"v": float,
"vfiat": float,
"vusd": float,
Expand Down Expand Up @@ -101,14 +118,12 @@
"OpenInterestMessage",
{
"b": str,
"d": str,
"d": int,
"e": str,
"id": str,
"oi": float,
"oifiat": float,
"oiusd": float,
"pa": str,
"pt": Dict[str, Any],
"q": str,
"s": str,
},
Expand Down
Loading