diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 03:25:00 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 03:25:00 +0800 |
| commit | 7dd0e3f42105569b6e6ec02aeeec9b5a8bbd9dd3 (patch) | |
| tree | d7374c1b4bb5308374c3386ac3768ac7209a6440 /qa/stub | |
| parent | 8c01adf05f1428bf2ada49574b25529c064da884 (diff) | |
| download | fund-lab-7dd0e3f42105569b6e6ec02aeeec9b5a8bbd9dd3.tar.gz | |
Add real AKShare stock daily history probe slice (3d-19)
Diffstat (limited to 'qa/stub')
| -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 |
