diff --git a/CHANGES.md b/CHANGES.md index 5466d50e5..b6eda98fb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ ## Changelog +### 2.4.1 + * Bugfix: Handle empty nextFundingRate in OKX + ### 2.4.0 (2024-01-07) * Update: Fix tests * Update: Okcoin moved to v5 API used by OKX diff --git a/cryptofeed/exchanges/okx.py b/cryptofeed/exchanges/okx.py index e8dda514d..ffb4dc1ce 100644 --- a/cryptofeed/exchanges/okx.py +++ b/cryptofeed/exchanges/okx.py @@ -266,7 +266,7 @@ async def _funding(self, msg: dict, timestamp: float): Decimal(update['fundingRate']), None, self.timestamp_normalize(int(update['fundingTime'])), - predicted_rate=Decimal(update['nextFundingRate']), + predicted_rate=Decimal(update['nextFundingRate']) if update['nextFundingRate'] != '' else None, raw=update ) await self.callback(FUNDING, f, timestamp)