Skip to content

Commit

Permalink
fix the allowed_lists and blocked_lists error
Browse files Browse the repository at this point in the history
  • Loading branch information
51bitquant committed Sep 12, 2021
1 parent 5f38f86 commit fc3c717
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_data(trader: Union[BinanceFutureTrader, BinanceSpotTrader]):
config.loads('./config.json')
print(config.blocked_lists)

if config.platform == 'binance_spot':
if config.platform == 'binance_spot': # binance_spot
trader = BinanceSpotTrader()
else:
trader = BinanceFutureTrader()
Expand Down
6 changes: 5 additions & 1 deletion trader/binance_future_trader.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ def start(self):
# the last one hour's the symbol jump over some percent.
self.place_order(s, signal['pct'], signal['pct_4h'])

elif s not in config.blocked_lists:
if s not in config.blocked_lists and len(config.allowed_lists) == 0:
index += 1
self.place_order(s, signal['pct'], signal['pct_4h'])

if len(config.allowed_lists) == 0 and config.blocked_lists == 0:
index += 1
self.place_order(s, signal['pct'], signal['pct_4h'])

Expand Down

0 comments on commit fc3c717

Please sign in to comment.