namespace KArtSell.Host.Configuration;

/// <summary>
/// External API configuration options (KRX, OpenDart, KIS)
/// Secrets are injected at runtime via environment variables or user-secrets.
/// </summary>
public class ExternalApiOptions
{
    public const string SectionName = "ExternalApis";

    public KrxApiSettings KrxOpenApi { get; set; } = new();
    public OpenDartApiSettings OpenDart { get; set; } = new();
    public KisApiSettings Kis { get; set; } = new();

    public class KrxApiSettings
    {
        public string ApiKey { get; set; } = string.Empty;
        public string BaseUrl { get; set; } = "https://openapi.krx.co.kr";
    }

    public class OpenDartApiSettings
    {
        public string ApiKey { get; set; } = string.Empty;
        public string BaseUrl { get; set; } = "https://opendart.fss.or.kr/api";
    }

    public class KisApiSettings
    {
        public string ApiKey { get; set; } = string.Empty;
        public string SecretKey { get; set; } = string.Empty;
        public string BaseUrl { get; set; } = "https://openapivts.koreainvestment.com:29443";
    }
}
