| 12345678910111213141516171819202122232425 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Market;
- /// <summary>ESG 지수 목록 — 지정일(미지정 시 최신 거래일) 페이징 (익명 열람). KRX ESG 지수 수집.</summary>
- internal sealed class EsgIndices : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/esg/indices", async (
- ISender sender,
- DateOnly? date = null,
- int page = 1,
- ushort perPage = 20,
- CancellationToken ct = default
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetEsgIndices.Query(date, page, perPage), ct);
- return ApiResponse.Ok(result);
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|