Merge pull request #451 from gcarq/pyup-update-python-bittrex-0.2.2-to-0.3.0

Update python-bittrex to 0.3.0
This commit is contained in:
Janne Sinivirta 2018-01-28 11:14:57 +02:00 committed by GitHub
commit bb470d0aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 23 deletions

View File

@ -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 = {}

View File

@ -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://', '')

View File

@ -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