drop sleep_time and use python-bittrex request delay

This commit is contained in:
gcarq 2017-11-10 23:39:49 +01:00
parent 72aec6c320
commit 3126dcfcea
4 changed files with 0 additions and 19 deletions

View File

@ -161,9 +161,5 @@ def get_name() -> str:
return _API.name
def get_sleep_time() -> float:
return _API.sleep_time
def get_fee() -> float:
return _API.fee

View File

@ -21,11 +21,6 @@ class Bittrex(Exchange):
TICKER_METHOD: str = BASE_URL + '/Api/v2.0/pub/market/GetTicks'
PAIR_DETAIL_METHOD: str = BASE_URL + '/Market/Index'
@property
def sleep_time(self) -> float:
""" Sleep time to avoid rate limits, used in the main loop """
return 25
def __init__(self, config: dict) -> None:
global _API, _EXCHANGE_CONF

View File

@ -18,14 +18,6 @@ class Exchange(ABC):
:return: percentage in float
"""
@property
@abstractmethod
def sleep_time(self) -> float:
"""
Sleep time in seconds for the main loop to avoid API rate limits.
:return: float
"""
@abstractmethod
def buy(self, pair: str, rate: float, amount: float) -> str:
"""

View File

@ -299,8 +299,6 @@ def main():
time.sleep(1)
elif new_state == State.RUNNING:
_process()
# We need to sleep here because otherwise we would run into bittrex rate limit
time.sleep(exchange.get_sleep_time())
old_state = new_state