mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Merge pull request #12434 from freqtrade/dependabot/pip/develop/ccxt-4.5.12
chore(deps): bump ccxt from 4.5.11 to 4.5.12
This commit is contained in:
@@ -11,7 +11,7 @@ from freqtrade.exceptions import (
|
||||
RetryableOrderError,
|
||||
TemporaryError,
|
||||
)
|
||||
from freqtrade.exchange import Exchange, date_minus_candles
|
||||
from freqtrade.exchange import Exchange
|
||||
from freqtrade.exchange.common import API_RETRY_COUNT, retrier
|
||||
from freqtrade.exchange.exchange_types import CcxtOrder, FtHas
|
||||
from freqtrade.misc import safe_value_fallback2
|
||||
@@ -80,11 +80,6 @@ class Okx(Exchange):
|
||||
if candle_type in (CandleType.FUTURES, CandleType.SPOT):
|
||||
return 300
|
||||
|
||||
if candle_type in (CandleType.MARK, CandleType.PREMIUMINDEX) and (
|
||||
not since_ms or since_ms > (date_minus_candles(timeframe, 300).timestamp() * 1000)
|
||||
):
|
||||
return 300
|
||||
|
||||
return super().ohlcv_candle_limit(timeframe, candle_type, since_ms)
|
||||
|
||||
@retrier
|
||||
|
||||
@@ -7,7 +7,7 @@ ft-pandas-ta==0.3.16
|
||||
ta-lib==0.6.8
|
||||
technical==1.5.3
|
||||
|
||||
ccxt==4.5.11
|
||||
ccxt==4.5.12
|
||||
cryptography==46.0.3
|
||||
aiohttp==3.13.1
|
||||
SQLAlchemy==2.0.44
|
||||
|
||||
@@ -2176,10 +2176,7 @@ def test_get_historic_ohlcv(default_conf, mocker, caplog, exchange_name, candle_
|
||||
since = date_minus_candles("5m", candle_limit)
|
||||
ret = exchange.get_historic_ohlcv(pair, "5m", dt_ts(since), candle_type=candle_type)
|
||||
|
||||
if exchange_name == "okx" and candle_type == "mark":
|
||||
expected = 4
|
||||
else:
|
||||
expected = 2
|
||||
expected = 2
|
||||
assert exchange._async_get_candle_history.call_count == expected
|
||||
# Returns twice the above OHLCV data after truncating the open candle.
|
||||
assert len(ret) == expected
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_okx_ohlcv_candle_limit(default_conf, mocker):
|
||||
for timeframe in timeframes:
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.SPOT) == 300
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.FUTURES) == 300
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.MARK) == 300
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.MARK) == 100
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.FUNDING_RATE) == 100
|
||||
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.SPOT, start_time) == 300
|
||||
@@ -36,7 +36,7 @@ def test_okx_ohlcv_candle_limit(default_conf, mocker):
|
||||
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.SPOT, one_call) == 300
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.FUTURES, one_call) == 300
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.MARK, one_call) == 300
|
||||
assert exchange.ohlcv_candle_limit(timeframe, CandleType.MARK, one_call) == 100
|
||||
|
||||
one_call = int(
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user