| 1234567891011121314151617181920212223 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Market;
- /// <summary>환율 목록 — 지정일(미지정 시 최신 거래일)의 전 통화 환율 (수출입은행 AP01 수집, 익명 열람).</summary>
- internal sealed class ExchangeRates : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/exchange-rates", async (
- ISender sender,
- DateOnly? date = null,
- CancellationToken ct = default
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetExchangeRates.Query(date), ct);
- return ApiResponse.Ok(result);
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|