Skip to content

Commit 122f683

Browse files
authored
Merge pull request #254 from Thomas-Heniart/refactor/remove-deprecated-endpoints
refactor: remove calls to deprecated endpoints
2 parents 791c845 + a327d4a commit 122f683

File tree

11 files changed

+4
-558
lines changed

11 files changed

+4
-558
lines changed

bfxapi/rest/_bfx_rest_interface.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from typing import Optional
22

3-
from bfxapi.rest._interfaces import (
4-
RestAuthEndpoints,
5-
RestMerchantEndpoints,
6-
RestPublicEndpoints,
7-
)
3+
from bfxapi.rest._interfaces import RestAuthEndpoints, RestPublicEndpoints
84

95

106
class BfxRestInterface:
@@ -13,8 +9,4 @@ def __init__(
139
):
1410
self.auth = RestAuthEndpoints(host=host, api_key=api_key, api_secret=api_secret)
1511

16-
self.merchant = RestMerchantEndpoints(
17-
host=host, api_key=api_key, api_secret=api_secret
18-
)
19-
2012
self.public = RestPublicEndpoints(host=host)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
from .rest_auth_endpoints import RestAuthEndpoints
2-
from .rest_merchant_endpoints import RestMerchantEndpoints
32
from .rest_public_endpoints import RestPublicEndpoints

bfxapi/rest/_interfaces/rest_merchant_endpoints.py

Lines changed: 0 additions & 192 deletions
This file was deleted.

bfxapi/rest/_interfaces/rest_public_endpoints.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
Leaderboard,
1616
Liquidation,
1717
PlatformStatus,
18-
PulseMessage,
19-
PulseProfile,
2018
Statistic,
2119
TickersHistory,
2220
TradingMarketAveragePrice,
@@ -324,21 +322,6 @@ def get_funding_stats(
324322
data = self._m.get(f"funding/stats/{symbol}/hist", params=params)
325323
return [serializers.FundingStatistic.parse(*sub_data) for sub_data in data]
326324

327-
def get_pulse_profile_details(self, nickname: str) -> PulseProfile:
328-
return serializers.PulseProfile.parse(*self._m.get(f"pulse/profile/{nickname}"))
329-
330-
def get_pulse_message_history(
331-
self, *, end: Optional[str] = None, limit: Optional[int] = None
332-
) -> List[PulseMessage]:
333-
messages = []
334-
335-
for sub_data in self._m.get("pulse/hist", params={"end": end, "limit": limit}):
336-
sub_data[18] = sub_data[18][0]
337-
message = serializers.PulseMessage.parse(*sub_data)
338-
messages.append(message)
339-
340-
return messages
341-
342325
def get_trading_market_average_price(
343326
self,
344327
symbol: str,

bfxapi/types/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
BalanceInfo,
44
BaseMarginInfo,
55
Candle,
6-
CurrencyConversion,
76
DepositAddress,
87
DerivativePositionCollateral,
98
DerivativePositionCollateralLimits,
@@ -21,16 +20,11 @@
2120
FundingStatistic,
2221
FundingTrade,
2322
FxRate,
24-
InvoicePage,
25-
InvoiceStats,
26-
InvoiceSubmission,
2723
Leaderboard,
2824
Ledger,
2925
LightningNetworkInvoice,
3026
Liquidation,
3127
LoginHistory,
32-
MerchantDeposit,
33-
MerchantUnlinkedDeposit,
3428
Movement,
3529
Order,
3630
OrderTrade,
@@ -42,8 +36,6 @@
4236
PositionIncrease,
4337
PositionIncreaseInfo,
4438
PositionSnapshot,
45-
PulseMessage,
46-
PulseProfile,
4739
Statistic,
4840
SymbolMarginInfo,
4941
TickersHistory,

0 commit comments

Comments
 (0)