| 12345678910111213141516171819202122 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Market;
- /// <summary>대표 시장지수 — 최신 거래일의 코스피/코스닥(+KRX 100). 헤더 티커 + /market 용 (익명 열람).</summary>
- internal sealed class Indices : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/indices", async (
- ISender sender,
- CancellationToken ct
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetIndices.Query(), ct);
- return ApiResponse.Ok(result);
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|