diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 02:13:04 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 02:13:04 +0800 |
| commit | 7da3c3d938e4b64a43963d602ab4a0a8c89f6f9e (patch) | |
| tree | 6fc3c06f6474aa4ad06fde775b3618e8bf392fba /src/FundLab.Api/MarketDataService.fs | |
| parent | 0d1af831c10683bb1e5a5853e5924c5ddfb1310d (diff) | |
| download | fund-lab-7da3c3d938e4b64a43963d602ab4a0a8c89f6f9e.tar.gz | |
Add real AKShare stock quote probe slice (3d-17)
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 0108ea7..7460bad 100644 --- a/src/FundLab.Api/MarketDataService.fs +++ b/src/FundLab.Api/MarketDataService.fs @@ -19,6 +19,7 @@ type IMarketDataCollector = abstract Search: query: string * CancellationToken -> Result<string, string> abstract FetchNav: code: string * CancellationToken -> Result<string, string> abstract FetchBondQuote: code: string * CancellationToken -> Result<string, string> + abstract FetchStockQuote: code: string * CancellationToken -> Result<string, string> type IMarketDataService = abstract Search: query: string * CancellationToken -> Result<MarketDataSearchPayload, MarketDataFailure> @@ -207,6 +208,9 @@ type ProcessMarketDataCollector(pythonExecutable: string, scriptPath: string, py member _.FetchBondQuote(code: string, token: CancellationToken) = execute token [ "--operation"; "bond-quote"; "--code"; code ] + member _.FetchStockQuote(code: string, token: CancellationToken) = + execute token [ "--operation"; "stock-quote"; "--code"; code ] + type MarketDataService(repository: FundRepository, collector: IMarketDataCollector) = let codePattern = Text.RegularExpressions.Regex("^[0-9]{6}$", Text.RegularExpressions.RegexOptions.Compiled) |
