using Microsoft.Extensions.DependencyInjection;

namespace Kbx.Shared.Providers;

public static class KbxProviderRegistration
{
    public static IServiceCollection AddKbxExternalProviders(this IServiceCollection services)
    {
        services.AddSingleton<KisRequestPacer>();
        services.AddSingleton<IKisAccessTokenProvider, KisAccessTokenProvider>();
        services.AddHttpClient<KrxOpenApiAdapter>();
        services.AddHttpClient<OpenDartAdapter>();
        services.AddHttpClient<KisAccessTokenProvider>();
        services.AddHttpClient<KisMarketDataAdapter>();
        return services;
    }
}
