| 12345678910111213141516171819202122232425 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Stocks;
- /// <summary>전자공시(DART) 최신 공시 목록 — corpCls(Y/K/N/E) 선택 필터 + 접수일 내림차순 페이징 (익명 열람). OpenDART 수집.</summary>
- internal sealed class Disclosures : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/disclosures", async (
- ISender sender,
- string? corpCls = null,
- int page = 1,
- ushort perPage = 20,
- CancellationToken ct = default
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetDisclosures.Query(corpCls, page, perPage), ct);
- return ApiResponse.Ok(result);
- })
- .WithTags("Stocks")
- .AllowAnonymous();
- }
- }
|