using CryptoExchange.Net.Authentication;
using Microsoft.Extensions.Configuration;

namespace Managing.Infrastructure.Exchanges.Configurations
{
    public static class ExchangeConfiguration
    {
        public static ApiCredentials GetBinanceApiCredentials(this IConfiguration configuration)
        {
            return new ApiCredentials(configuration.GetValue<string>("Credentials:Binance:Key"), configuration.GetValue<string>("Credentials:Binance:Secret"));
        }

        public static ApiCredentials GetKrakenApiCredentials(this IConfiguration configuration)
        {
            return new ApiCredentials(configuration.GetValue<string>("Credentials:Kraken:Key"), configuration.GetValue<string>("Credentials:Kraken:Secret"));
        }

        public static ApiCredentials GetFtxApiCredentials(this IConfiguration configuration)
        {
            return new ApiCredentials(configuration.GetValue<string>("Credentials:Ftx:Key"), configuration.GetValue<string>("Credentials:Ftx:Secret"));
        }
    }
}
