diff --git a/freqtrade/exchange/bittrex.py b/freqtrade/exchange/bittrex.py index 1299c714a..2be81be2d 100644 --- a/freqtrade/exchange/bittrex.py +++ b/freqtrade/exchange/bittrex.py @@ -1,5 +1,4 @@ import logging -import requests from typing import Dict, List, Optional from bittrex.bittrex import Bittrex as _Bittrex @@ -15,20 +14,6 @@ _API: _Bittrex = None _API_V2: _Bittrex = None _EXCHANGE_CONF: dict = {} -# API socket timeout -API_TIMEOUT = 60 - - -def custom_requests(request_url, apisign): - """ - Set timeout for requests - """ - return requests.get( - request_url, - headers={"apisign": apisign}, - timeout=API_TIMEOUT - ).json() - class Bittrex(Exchange): """ @@ -47,14 +32,12 @@ class Bittrex(Exchange): api_secret=_EXCHANGE_CONF['secret'], calls_per_second=1, api_version=API_V1_1, - dispatch=custom_requests ) _API_V2 = _Bittrex( api_key=_EXCHANGE_CONF['key'], api_secret=_EXCHANGE_CONF['secret'], calls_per_second=1, api_version=API_V2_0, - dispatch=custom_requests ) self.cached_ticker = {} diff --git a/freqtrade/tests/exchange/test_exchange_bittrex.py b/freqtrade/tests/exchange/test_exchange_bittrex.py index 1d1c7fa24..99a964815 100644 --- a/freqtrade/tests/exchange/test_exchange_bittrex.py +++ b/freqtrade/tests/exchange/test_exchange_bittrex.py @@ -345,8 +345,3 @@ def test_validate_response_min_trade_requirement_not_met(): } with pytest.raises(ContentDecodingError, match=r'.*MIN_TRADE_REQUIREMENT_NOT_MET.*'): Bittrex._validate_response(response) - - -def test_custom_requests(mocker): - mocker.patch('freqtrade.exchange.bittrex.requests', MagicMock()) - btx.custom_requests('http://', '') diff --git a/requirements.txt b/requirements.txt index 01490e298..a21d53087 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -python-bittrex==0.2.2 +python-bittrex==0.3.0 SQLAlchemy==1.2.2 python-telegram-bot==9.0.0 arrow==0.12.1