@export_as_api
def update_universe(id_or_symbols):
 if isinstance(id_or_symbols, six.string_types):
  id_or_symbols = [id_or_symbols]
 elif isinstance(id_or_symbols, Instrument):
  id_or_symbols = [Instrument.order_book_id]
 elif isinstance(id_or_symbols, Iterable):
  id_or_symbols = [(item.order_book_id if isinstance(item, Instrument) else item) for item in id_or_symbols]
 else:
  raise RuntimeError(_('unknown type'))
 executor = get_strategy_executor()
 executor.current_universe = set(id_or_symbols)

@ export_as_api def update_universe ( id_or_symbols ) : if isinstance ( id_or_symbols , six . string_types ) : id_or_symbols = [ id_or_symbols ] elif isinstance ( id_or_symbols , Instrument ) : id_or_symbols = [ Instrument . order_book_id ] elif isinstance ( id_or_symbols , Iterable ) : id_or_symbols = [ ( item . order_book_id if isinstance ( item , Instrument ) else item ) for item in id_or_symbols ] else : raise RuntimeError ( _ ( 'unknown type' ) ) executor = get_strategy_executor ( ) executor . current_universe = set ( id_or_symbols )
this method takes one or a list of id_or_symbol(s) as argument(s) .