File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,11 @@ def market_open(context):
9494 set_universe , get_universe ,
9595 # Lifecycle callbacks [STABLE]
9696 before_trading_start , after_trading_end ,
97+ # A-share market specific data [EXPERIMENTAL]
98+ get_north_money_flow ,
99+ get_margin_data ,
100+ get_limit_up_down_stats ,
101+ get_restriction_release ,
97102)
98103
99104# Logging [STABLE]
@@ -286,6 +291,9 @@ def __repr__(self):
286291 "set_universe" , "get_universe" ,
287292 # P0: Lifecycle callbacks
288293 "before_trading_start" , "after_trading_end" ,
294+ # A-share market specific data
295+ "get_north_money_flow" , "get_margin_data" ,
296+ "get_limit_up_down_stats" , "get_restriction_release" ,
289297 # Logging
290298 "log" ,
291299 # Objects
Original file line number Diff line number Diff line change @@ -143,4 +143,21 @@ def test_days_parameter(self):
143143 df_60 = get_restriction_release (days = 60 )
144144
145145 # 60 天范围应包含更多解禁事件
146- assert len (df_60 ) >= len (df_30 )
146+ assert len (df_60 ) >= len (df_30 )
147+
148+
149+ class TestModuleExports :
150+ """Tests for module exports."""
151+
152+ def test_import_from_eqlib (self ):
153+ """验证可以从 eqlib 导入"""
154+ from eqlib import (
155+ get_north_money_flow ,
156+ get_margin_data ,
157+ get_limit_up_down_stats ,
158+ get_restriction_release ,
159+ )
160+ assert get_north_money_flow is not None
161+ assert get_margin_data is not None
162+ assert get_limit_up_down_stats is not None
163+ assert get_restriction_release is not None
You can’t perform that action at this time.
0 commit comments