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 /src/FundLab.Api/MarketDataService.fs | |
| parent | 8c01adf05f1428bf2ada49574b25529c064da884 (diff) | |
| download | fund-lab-7dd0e3f42105569b6e6ec02aeeec9b5a8bbd9dd3.tar.gz | |
Add real AKShare stock daily history probe slice (3d-19)
Diffstat (limited to 'src/FundLab.Api/MarketDataService.fs')
| -rw-r--r-- | src/FundLab.Api/MarketDataService.fs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/FundLab.Api/MarketDataService.fs b/src/FundLab.Api/MarketDataService.fs index 7460bad..ee3aa67 100644 --- a/src/FundLab.Api/MarketDataService.fs +++ b/src/FundLab.Api/MarketDataService.fs @@ -20,6 +20,7 @@ type IMarketDataCollector = abstract FetchNav: code: string * CancellationToken -> Result<string, string> abstract FetchBondQuote: code: string * CancellationToken -> Result<string, string> abstract FetchStockQuote: code: string * CancellationToken -> Result<string, string> + abstract FetchStockDaily: code: string * days: int * CancellationToken -> Result<string, string> type IMarketDataService = abstract Search: query: string * CancellationToken -> Result<MarketDataSearchPayload, MarketDataFailure> @@ -211,6 +212,9 @@ type ProcessMarketDataCollector(pythonExecutable: string, scriptPath: string, py member _.FetchStockQuote(code: string, token: CancellationToken) = execute token [ "--operation"; "stock-quote"; "--code"; code ] + member _.FetchStockDaily(code: string, days: int, token: CancellationToken) = + execute token [ "--operation"; "stock-daily"; "--code"; code; "--days"; string days ] + type MarketDataService(repository: FundRepository, collector: IMarketDataCollector) = let codePattern = Text.RegularExpressions.Regex("^[0-9]{6}$", Text.RegularExpressions.RegexOptions.Compiled) |
