You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(data-provider): skip unavailable optional fetchers and back off longbridge reconnects (#1249)
* fix(data-provider): skip unavailable optional fetchers and back off longbridge reconnects
* fix(data-provider): back off unavailable longbridge routes
* fix(data-provider): back off noisy pytdx name lookups
* docs: align PR 1249 changelog and compatibility notes
* fix(config): preserve legacy schedule override precedence
|`SCHEDULE_TIME`| Scheduled execution time |`18:00`|
318
+
|`SCHEDULE_RUN_IMMEDIATELY`| Run once immediately when scheduler mode starts; when unset it keeps following the legacy `RUN_IMMEDIATELY` runtime override |`true`|
319
+
|`RUN_IMMEDIATELY`| Run once immediately for non-scheduler startup; also acts as the legacy fallback when `SCHEDULE_RUN_IMMEDIATELY` is unset |`true`|
318
320
|`LOG_DIR`| Log directory |`./logs`|
319
321
320
322
> Behavior notes:
321
323
> - When `TICKFLOW_API_KEY` is configured, CN market review first tries TickFlow for main indices. Market breadth also tries TickFlow only when the current TickFlow plan supports universe queries.
322
324
> - TickFlow behavior is capability-based rather than just key-based: limited plans can still enhance main CN indices, while plans with `CN_Equity_A` universe query support also enhance market breadth.
323
325
> - The official quickstart documents `quotes.get(universes=["CN_Equity_A"])`, but online smoke tests confirmed two additional real-world constraints: universe access depends on plan permissions, and `quotes.get(symbols=[...])` has a per-request symbol limit.
324
326
> - TickFlow currently returns `change_pct` / `amplitude` as ratio values; this integration normalizes them to the project's percent convention so they match AkShare / Tushare / efinance semantics.
327
+
> - In scheduler mode, if runtime env explicitly sets `RUN_IMMEDIATELY` but does not set `SCHEDULE_RUN_IMMEDIATELY`, the scheduler keeps inheriting the legacy runtime override instead of being pulled back to a persisted `.env` alias value.
325
328
> - CN market review reports now use a post-market workstation layout with fixed market light, market temperature, index detail, sector Top tables, news catalysts, next-session plan, and risk sections. Missing data sources degrade by omitting or simplifying only the affected block.
@@ -779,6 +782,13 @@ System defaults to AkShare (free), also supports other data sources:
779
782
- Supports US/HK stock data
780
783
- US stock historical and real-time data both use YFinance exclusively to avoid technical indicator errors from akshare's US stock adjustment issues
781
784
785
+
### Longbridge
786
+
- Optional fallback for US/HK stocks, mainly used to supplement fields that YFinance may miss
787
+
- Configure `LONGBRIDGE_APP_KEY`, `LONGBRIDGE_APP_SECRET`, and `LONGBRIDGE_ACCESS_TOKEN`
788
+
- Optional knobs: `LONGBRIDGE_STATIC_INFO_TTL_SECONDS`(default `86400`) and `LONGBRIDGE_CONNECTION_COOLDOWN_SECONDS` (default `15`)
789
+
- If credentials are absent, the optional Longbridge fetcher is not instantiated
790
+
- When runtime errors such as `client is closed`, `context closed`, or `connection closed` occur, Longbridge enters a short cooldown window and US/HK daily or realtime requests automatically fall back to YFinance / AkShare instead of reconnecting on every request
791
+
782
792
---
783
793
784
794
## Advanced Features
@@ -791,7 +801,7 @@ Use `hk` prefix for HK stock codes:
791
801
STOCK_LIST=600519,hk00700,hk01810
792
802
```
793
803
794
-
HK daily history skips efinance, pytdx, baostock, and other built-in providers that do not support HK daily data, avoiding mismatches between HK symbols and non-HK market data. AkShare/Tushare/YFinance/Longbridge continue to provide HK fallback paths.
804
+
HK daily history skips efinance, pytdx, baostock, and other built-in providers that do not support HK daily data, avoiding mismatches between HK symbols and non-HK market data. AkShare/Tushare/YFinance/Longbridge continue to provide HK fallback paths. If Longbridge is inside its connection cooldown window, the route temporarily skips it and continues with the remaining HK-capable fallbacks.
0 commit comments