| 123456789101112131415161718192021222324252627282930 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Market;
- /// <summary>
- /// 사회책임투자채권 목록 — 지정일(미지정 시 최신 스냅샷) 페이징 (익명 열람). KRX 사회책임투자채권 수집.
- /// sriBondType = SRI 채권종류(녹색채권/사회적채권/지속가능채권), bondType = 채권유형(회사채 등) — 별도 필터.
- /// </summary>
- internal sealed class SriBonds : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/market/esg/sri-bonds", async (
- ISender sender,
- DateOnly? date = null,
- string? sriBondType = null,
- string? bondType = null,
- int page = 1,
- ushort perPage = 20,
- CancellationToken ct = default
- ) => {
- var result = await sender.Send(new Application.Features.Api.Stocks.GetSriBonds.Query(date, sriBondType, bondType, page, perPage), ct);
- return ApiResponse.Ok(result);
- })
- .WithTags("Market")
- .AllowAnonymous();
- }
- }
|