Skip to content
Open
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
17 changes: 0 additions & 17 deletions bfxapi/rest/_interfaces/rest_public_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
Leaderboard,
Liquidation,
PlatformStatus,
PulseMessage,
PulseProfile,
Statistic,
TickersHistory,
TradingMarketAveragePrice,
Expand Down Expand Up @@ -324,21 +322,6 @@ def get_funding_stats(
data = self._m.get(f"funding/stats/{symbol}/hist", params=params)
return [serializers.FundingStatistic.parse(*sub_data) for sub_data in data]

def get_pulse_profile_details(self, nickname: str) -> PulseProfile:
return serializers.PulseProfile.parse(*self._m.get(f"pulse/profile/{nickname}"))

def get_pulse_message_history(
self, *, end: Optional[str] = None, limit: Optional[int] = None
) -> List[PulseMessage]:
messages = []

for sub_data in self._m.get("pulse/hist", params={"end": end, "limit": limit}):
sub_data[18] = sub_data[18][0]
message = serializers.PulseMessage.parse(*sub_data)
messages.append(message)

return messages

def get_trading_market_average_price(
self,
symbol: str,
Expand Down
2 changes: 0 additions & 2 deletions bfxapi/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
PositionIncrease,
PositionIncreaseInfo,
PositionSnapshot,
PulseMessage,
PulseProfile,
Statistic,
SymbolMarginInfo,
TickersHistory,
Expand Down
31 changes: 0 additions & 31 deletions bfxapi/types/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,37 +161,6 @@ class FundingStatistic(_Type):
funding_below_threshold: float


@dataclass
class PulseProfile(_Type):
puid: str
mts: int
nickname: str
picture: str
text: str
twitter_handle: str
followers: int
following: int
tipping_status: int


@dataclass
class PulseMessage(_Type):
pid: str
mts: int
puid: str
title: str
content: str
is_pin: int
is_public: int
comments_disabled: int
tags: List[str]
attachments: List[str]
meta: List[Dict[str, Any]]
likes: int
profile: PulseProfile
comments: int


@dataclass
class TradingMarketAveragePrice(_Type):
price_avg: float
Expand Down
56 changes: 0 additions & 56 deletions bfxapi/types/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"Liquidation",
"Leaderboard",
"FundingStatistic",
"PulseProfile",
"PulseMessage",
"TradingMarketAveragePrice",
"FundingMarketAveragePrice",
"FxRate",
Expand Down Expand Up @@ -257,60 +255,6 @@
],
)

PulseProfile = generate_labeler_serializer(
name="PulseProfile",
klass=dataclasses.PulseProfile,
labels=[
"puid",
"mts",
"_PLACEHOLDER",
"nickname",
"_PLACEHOLDER",
"picture",
"text",
"_PLACEHOLDER",
"_PLACEHOLDER",
"twitter_handle",
"_PLACEHOLDER",
"followers",
"following",
"_PLACEHOLDER",
"_PLACEHOLDER",
"_PLACEHOLDER",
"tipping_status",
],
)

PulseMessage = generate_recursive_serializer(
name="PulseMessage",
klass=dataclasses.PulseMessage,
serializers={"profile": PulseProfile},
labels=[
"pid",
"mts",
"_PLACEHOLDER",
"puid",
"_PLACEHOLDER",
"title",
"content",
"_PLACEHOLDER",
"_PLACEHOLDER",
"is_pin",
"is_public",
"comments_disabled",
"tags",
"attachments",
"meta",
"likes",
"_PLACEHOLDER",
"_PLACEHOLDER",
"profile",
"comments",
"_PLACEHOLDER",
"_PLACEHOLDER",
],
)

TradingMarketAveragePrice = generate_labeler_serializer(
name="TradingMarketAveragePrice",
klass=dataclasses.TradingMarketAveragePrice,
Expand Down
29 changes: 0 additions & 29 deletions examples/rest/public/pulse_endpoints.py

This file was deleted.