| 12345678910111213141516171819202122232425 |
- using Application.Abstractions.Messaging;
- using Domain.Entities.Stocks.ValueObject;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Market;
- /// <summary>금리 목록 — 종류별(대출/국제) 지정일(미지정 시 최신 거래일)의 항목별 금리 (수출입은행 AP02/AP03 수집, 익명 열람).</summary>
- internal sealed class InterestRates : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/interest-rates", async (
- ISender sender,
- RateType type = RateType.International,
- DateOnly? date = null,
- CancellationToken ct = default
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetInterestRates.Query(type, date), ct);
- return ApiResponse.Ok(result);
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|