| 123456789101112131415161718192021222324252627 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- using Web.Api.Extensions;
- namespace Web.Api.Endpoints.Stocks;
- /// <summary>채권 상세 — ISIN 기준 BondMaster(만기·표면이자율·신용등급 4사·옵션·보증) + 이자지급 + KRX 일별시세(종가·YTM) join (익명 열람). SEIBro 채권 마스터.</summary>
- internal sealed class BondDetail : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/stocks/bonds/{isin:regex(^[A-Za-z0-9]{{12}}$)}", async (
- string isin,
- ISender sender,
- CancellationToken ct
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetBondDetail.Query(isin), ct);
- return result.Match(
- () => ApiResponse.Ok(result.Value),
- CustomResults.Problem
- );
- })
- .WithTags("Stocks")
- .AllowAnonymous();
- }
- }
|