diff options
Diffstat (limited to 'qa/stub/fund-lab-python')
| -rwxr-xr-x | qa/stub/fund-lab-python | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qa/stub/fund-lab-python b/qa/stub/fund-lab-python index 5c6daa3..c9ce981 100755 --- a/qa/stub/fund-lab-python +++ b/qa/stub/fund-lab-python @@ -53,6 +53,17 @@ case "$OP" in exit 2 fi ;; + stock-daily) + # Synthetic daily bars mirror the live AKShare A-share history contract + # (>= 3 rows); unknown codes fail like the collector's "no valid daily + # history" error (-> API 503). + if [ "$CODE" = "600519" ]; then + printf '{"schema_version":"fund-lab.akshare.v1","operation":"stock-daily","source":"stub-synthetic","source_revision":"stub-1","_synthetic":true,"collected_at":"%s","instrument":{"code":"%s"},"observations":[{"date":"2026-09-17","close":"1266.98","volume":"1755380.0","amount":"2217338283.0"},{"date":"2026-09-18","close":"1257.12","volume":"2489087.0","amount":"3135849108.0"},{"date":"2026-09-21","close":"1252.57","volume":"2501689.0","amount":"3135910045.0"}]}\n' "$TS" "$CODE" + else + echo "AKShare collector failed: no valid daily history for $CODE" >&2 + exit 2 + fi + ;; *) echo "unknown operation: $OP" >&2 exit 2 |
