using Binance.TradeRobot.Model.Base;
using SDKAdapter.Model;
using System;

namespace SDKAdapter.WebSockets.Order.SpotOrder
{
    public class SpotOrderWebSocketClient
    {
        protected long AccountId { get; private set; }
        protected string ApiKey { get; private set; }
        protected string Secret { get; private set; }
        protected NLog.ILogger logger { get; private set; }
        protected bool IsConnected { get; set; }
        protected Enums.BusinessType BusinessType { get; private set; }

        public Action<SpotOrderTradePublishInfo> OnOrderUpdated { get; private set; }


        public static SpotOrderWebSocketClient Create(Enums.BusinessType businessType, Enums.Exchange exchange, long accountId, string apiKey, string secret, NLog.ILogger logger, Action<SpotOrderTradePublishInfo> onOrderUpdated)
        {
            if (exchange == Enums.Exchange.Binance)
                return new BinanceSpotOrderWebSocketClient(businessType, accountId, apiKey, secret, logger);
            return null;
        }

        public SpotOrderWebSocketClient(Enums.BusinessType businessType, long accountId, string apiKey, string secret, NLog.ILogger logger)
        {
            this.BusinessType = businessType;
            this.AccountId = accountId;
            this.ApiKey = apiKey;
            this.Secret = secret;
            this.logger = logger;
        }

        public virtual void Start(string symbol = "")
        {

        }

        public virtual void Stop(string symbol = "")
        {

        }
    }
}