This PR sets the corresponding values to None if this is the case, thus avoiding an exception and missing data. I'm not completely sure about the rationale for the early stopping with the cached value in self.funding_updates, but if the reasoning was to avoid duplicate values then the pair funding_rate and funding_time should work just as well.
HuobiSwap has null values for
next_funding_time
andestimated_rate
in the funding rate, as can be seen at https://api.hbdm.com/swap-api/v1/swap_funding_rate?contract_code=BTC-USD:{"status":"ok","data":{"estimated_rate":null,"funding_rate":"0.000268519557868291","contract_code":"BTC-USD","symbol":"BTC","fee_asset":"BTC","funding_time":"1705334400000","next_funding_time":null},"ts":1705307089168}
This PR sets the corresponding values to None if this is the case, thus avoiding an exception and missing data. I'm not completely sure about the rationale for the early stopping with the cached value in
self.funding_updates
, but if the reasoning was to avoid duplicate values then the pairfunding_rate
andfunding_time
should work just as well.