| 123456789101112131415161718192021222324252627282930 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- using Web.Api.Extensions;
- namespace Web.Api.Endpoints.Market;
- /// <summary>ELS 리스크 보드 — 기초자산별 미상환잔액 추이 (지수 하락 리스크 지표). 기초자산·종목구분·기간 필터 (익명 열람). SEIBro getBassetUnredScale 수집.</summary>
- internal sealed class ElsRiskBoard : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/els-risk", async (
- ISender sender,
- string? bassetCd = null,
- string? secnTpcd = null,
- DateOnly? from = null,
- DateOnly? to = null,
- CancellationToken ct = default
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetElsRiskBoard.Query(bassetCd, secnTpcd, from, to), ct);
- return result.Match(
- () => ApiResponse.Ok(result.Value),
- CustomResults.Problem
- );
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|