From e0ae5b38cf85a20c6daa9b9cfba8b17d670c0377 Mon Sep 17 00:00:00 2001 From: vic-en Date: Wed, 31 Mar 2021 00:41:00 +0100 Subject: [PATCH] (fix) fix binance perp funding payment function --- .../binance_perpetual/binance_perpetual_derivative.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py b/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py index 94a4bbb2e5..252895e083 100644 --- a/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py +++ b/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py @@ -556,7 +556,7 @@ async def _user_stream_event_listener(self): update_data = event_message.get("a", {}) event_reason = update_data.get("m", {}) if event_reason == "FUNDING_FEE": - await self.get_funding_payment(event_message.get("E", int(time.time()))) + await self.get_funding_payment() else: # update balances for asset in update_data.get("B", []): @@ -933,7 +933,7 @@ async def get_funding_payment(self): funding_payment_tasks = [] for pair in self._trading_pairs: funding_payment_tasks.append(self.request(path="/fapi/v1/income", - params={"symbol": convert_to_exchange_trading_pair(pair), "incomeType": "FUNDING_FEE", "limit": 1}, + params={"symbol": convert_to_exchange_trading_pair(pair), "incomeType": "FUNDING_FEE", "limit": len(self._account_positions)}, method=MethodType.POST, add_timestamp=True, is_signed=True))