diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 02:29:30 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 02:29:30 +0800 |
| commit | 8c01adf05f1428bf2ada49574b25529c064da884 (patch) | |
| tree | 6342850684ff70bae877855d91074f7af3e4a030 /qa/stub | |
| parent | 7da3c3d938e4b64a43963d602ab4a0a8c89f6f9e (diff) | |
| download | fund-lab-8c01adf05f1428bf2ada49574b25529c064da884.tar.gz | |
Add stocks probe panel with live stock quote flow (3d-18)
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 9a171bc..5c6daa3 100755 --- a/qa/stub/fund-lab-python +++ b/qa/stub/fund-lab-python @@ -42,6 +42,17 @@ case "$OP" in exit 2 fi ;; + stock-quote) + # Synthetic rows mirror the live AKShare A-share spot contract: a known live + # code answers with a name/price, unknown codes fail like the "no valid + # quote" collector error (-> API 503). + if [ "$CODE" = "600519" ]; then + printf '{"schema_version":"fund-lab.akshare.v1","operation":"stock-quote","source":"stub-synthetic","source_revision":"stub-1","_synthetic":true,"collected_at":"%s","instrument":{"code":"%s"},"quote":{"name":"贵州茅台","price":"1252.57","currency":"CNY"}}\n' "$TS" "$CODE" + else + echo "AKShare collector failed: no valid quote for $CODE" >&2 + exit 2 + fi + ;; *) echo "unknown operation: $OP" >&2 exit 2 |
