add meta endpoint
This commit is contained in:
parent
c682f3b515
commit
36e47e31fc
1 changed files with 8 additions and 2 deletions
|
|
@ -58,6 +58,7 @@ fn handleHelp(_: *App, _: *httpz.Request, res: *httpz.Response) !void {
|
||||||
\\ GET /{SYMBOL}/returns?fmt=xml Trailing returns (XML, for LibreCalc)
|
\\ GET /{SYMBOL}/returns?fmt=xml Trailing returns (XML, for LibreCalc)
|
||||||
\\ GET /{SYMBOL}/quote Latest quote (JSON)
|
\\ GET /{SYMBOL}/quote Latest quote (JSON)
|
||||||
\\ GET /{SYMBOL}/candles Raw SRF cache file
|
\\ GET /{SYMBOL}/candles Raw SRF cache file
|
||||||
|
\\ GET /{SYMBOL}/candles_meta Candle freshness metadata (SRF)
|
||||||
\\ GET /{SYMBOL}/dividends Raw SRF cache file
|
\\ GET /{SYMBOL}/dividends Raw SRF cache file
|
||||||
\\ GET /{SYMBOL}/earnings Raw SRF cache file
|
\\ GET /{SYMBOL}/earnings Raw SRF cache file
|
||||||
\\ GET /{SYMBOL}/options Raw SRF cache file
|
\\ GET /{SYMBOL}/options Raw SRF cache file
|
||||||
|
|
@ -241,6 +242,10 @@ fn handleCandles(app: *App, req: *httpz.Request, res: *httpz.Response) !void {
|
||||||
return handleSrfFile(app, req, res, "candles_daily.srf");
|
return handleSrfFile(app, req, res, "candles_daily.srf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn handleCandlesMeta(app: *App, req: *httpz.Request, res: *httpz.Response) !void {
|
||||||
|
return handleSrfFile(app, req, res, "candles_meta.srf");
|
||||||
|
}
|
||||||
|
|
||||||
fn handleDividends(app: *App, req: *httpz.Request, res: *httpz.Response) !void {
|
fn handleDividends(app: *App, req: *httpz.Request, res: *httpz.Response) !void {
|
||||||
return handleSrfFile(app, req, res, "dividends.srf");
|
return handleSrfFile(app, req, res, "dividends.srf");
|
||||||
}
|
}
|
||||||
|
|
@ -478,6 +483,7 @@ pub fn main() !void {
|
||||||
router.get("/:symbol/returns", handleReturns, .{});
|
router.get("/:symbol/returns", handleReturns, .{});
|
||||||
router.get("/:symbol/quote", handleQuote, .{});
|
router.get("/:symbol/quote", handleQuote, .{});
|
||||||
router.get("/:symbol/candles", handleCandles, .{});
|
router.get("/:symbol/candles", handleCandles, .{});
|
||||||
|
router.get("/:symbol/candles_meta", handleCandlesMeta, .{});
|
||||||
router.get("/:symbol/dividends", handleDividends, .{});
|
router.get("/:symbol/dividends", handleDividends, .{});
|
||||||
router.get("/:symbol/earnings", handleEarnings, .{});
|
router.get("/:symbol/earnings", handleEarnings, .{});
|
||||||
router.get("/:symbol/options", handleOptions, .{});
|
router.get("/:symbol/options", handleOptions, .{});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue