Skip to content

Commit

Permalink
在subscribe的时候检查order_book_id,如果是88/99的期货合约,在回测提供warning,实盘/模拟盘 raise …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
EricWang committed Mar 6, 2017
1 parent 8b29b49 commit d2d64cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rqalpha/api/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def subscribe(id_or_symbols):
current_universe.add(assure_order_book_id(item))
else:
raise RQInvalidArgument(_("unsupported order_book_id type"))
verify_that('id_or_symbols')._are_valid_instruments("subscribe", id_or_symbols)
Environment.get_instance().update_universe(current_universe)


Expand Down

0 comments on commit d2d64cb

Please sign in to comment.