MCPcopy
hub / github.com/ricequant/rqalpha / get_instance

Method get_instance

rqalpha/environment.py:83–90  ·  view source on GitHub ↗

返回已经创建的 Environment 对象

(cls)

Source from the content-addressed store, hash-verified

81
82 @classmethod
83 def get_instance(cls):
84 """
85 返回已经创建的 Environment 对象
86 """
87 if Environment._env is None:
88 raise EnvironmentNotInitialized(
89 _(u"Environment has not been created. Please Use `Environment.get_instance()` after RQAlpha init"))
90 return Environment._env
91
92 def set_data_proxy(self, data_proxy):
93 self.data_proxy = data_proxy

Callers 15

dispatchFunction · 0.80
is_night_tradingFunction · 0.80
get_trading_periodFunction · 0.80
user_log_processorFunction · 0.80
assure_active_instrumentFunction · 0.80
assure_listed_instrumentFunction · 0.80
assure_order_book_idFunction · 0.80
_is_valid_instrumentMethod · 0.80
get_account_typeMethod · 0.80
__new__Method · 0.80
__init__Method · 0.80
open_ordersMethod · 0.80

Calls 1

Tested by 6

on_tradeFunction · 0.64
handle_barFunction · 0.64
handle_barFunction · 0.64
handle_barFunction · 0.64
handle_barFunction · 0.64
on_tradeFunction · 0.64