Skip to content

Commit

Permalink
remove the if condition for binance
Browse files Browse the repository at this point in the history
  • Loading branch information
iuvbio committed Mar 25, 2019
1 parent 85ac99a commit 4005b8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions freqtrade/exchange/binance.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ def get_order_book(self, pair: str, limit: int = 100) -> dict:
limit = min(list(filter(lambda x: limit <= x, limit_range)))

return super().get_order_book(pair, limit)

def validate_order_time_in_force(self, order_time_in_force: Dict) -> None:
"""
Checks if order time in force configured in strategy/config are supported
"""
pass
7 changes: 3 additions & 4 deletions freqtrade/exchange/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import ccxt.async_support as ccxt_async
from pandas import DataFrame

from freqtrade import constants, OperationalException, DependencyException, TemporaryError
from freqtrade import constants, DependencyException, OperationalException, TemporaryError
from freqtrade.data.converter import parse_ticker_dataframe

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -269,9 +269,8 @@ def validate_order_time_in_force(self, order_time_in_force: Dict) -> None:
Checks if order time in force configured in strategy/config are supported
"""
if any(v != 'gtc' for k, v in order_time_in_force.items()):
if self.name != 'Binance':
raise OperationalException(
f'Time in force policies are not supporetd for {self.name} yet.')
raise OperationalException(
f'Time in force policies are not supporetd for {self.name} yet.')

def exchange_has(self, endpoint: str) -> bool:
"""
Expand Down

0 comments on commit 4005b8d

Please sign in to comment.