| 123456789101112131415161718192021222324252627282930 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- using Web.Api.Extensions;
- namespace Web.Api.Endpoints.Market;
- /// <summary>보호예수(락업) 캘린더 — 기간(반환일/예수일 from/to) 락업 해제·예수 일정. 종목명·수량·사유 포함 (익명 열람). SEIBro 수급 수집.</summary>
- internal sealed class LockupCalendar : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/lockup-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.GetLockupCalendar.Query(from, to, page, perPage), ct);
- return result.Match(
- () => ApiResponse.Ok(result.Value),
- CustomResults.Problem
- );
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|