using Application.Abstractions.Messaging; using Web.Api.Common; using Web.Api.Extensions; namespace Web.Api.Endpoints.Market; /// 배당 캘린더 — 기간(권리기준일 from/to) 배당 일정 목록. 권리락일·현금/주식 구분 포함 (익명 열람). SEIBro 배당 수집. internal sealed class DividendCalendar : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { app.MapGet("api/market/dividend-calendar", async ( ISender sender, DateOnly? from = null, DateOnly? to = null, int page = 1, ushort perPage = 30, CancellationToken ct = default ) => { var result = await sender.Send(new Application.Features.Api.Stocks.GetDividendCalendar.Query(from, to, page, perPage), ct); return result.Match( () => ApiResponse.Ok(result.Value), CustomResults.Problem ); }) .WithTags("Market") .AllowAnonymous(); } }