Skip to content

Commit

Permalink
Remove unneeded checks
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Oct 13, 2019
1 parent fa8c613 commit 640d58e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions freqtrade/exchange/exchange.py
Expand Up @@ -785,15 +785,13 @@ async def _async_get_trade_history_id(self, pair: str,
from_id: Optional[str] = None) -> Tuple[str, List[Dict]]:
"""
Asyncronously gets trade history using fetch_trades
use this when exchange uses id-based iteration
use this when exchange uses id-based iteration (check `self._trades_pagination`)
:param pair: Pair to fetch trade data for
:param since: Since as integer timestamp in milliseconds
:param until: Until as integer timestamp in milliseconds
:param from_id: Download data starting with ID (if id is known). Ignores "since" if set.
returns tuple: (pair, ticker_interval, ohlcv_list)
"""
if self._trades_pagination == 'time':
raise OperationalException(f"Wrong method called to get trades for {self.name}")

trades: List[Dict] = []

Expand Down Expand Up @@ -828,14 +826,12 @@ async def _async_get_trade_history_time(self, pair: str, until: int,
since: Optional[int] = None) -> Tuple[str, List]:
"""
Asyncronously gets trade history using fetch_trades,
when the exchange uses time-based iteration
when the exchange uses time-based iteration (check `self._trades_pagination`)
:param pair: Pair to fetch trade data for
:param since: Since as integer timestamp in milliseconds
:param until: Until as integer timestamp in milliseconds
returns tuple: (pair, ticker_interval, ohlcv_list)
"""
if self._trades_pagination != 'time':
raise OperationalException(f"Wrong method called to get trades for {self.name}")

trades: List[Dict] = []
while True:
Expand Down

0 comments on commit 640d58e

Please sign in to comment.