public async Task <EboTradeResponse> CancelTrade(CancelTrade cancelTrade, RequestTokenResponse requestTokenResponse, IEquiasConfiguration equiasConfiguration)
        {
            try
            {
                var httpClient = httpClientFactory.CreateClient();

                httpClient.BaseAddress = new Uri(equiasConfiguration.ApiDomain);
                httpClient.DefaultRequestHeaders.Add("token", requestTokenResponse?.Token);

                return(await DeleteAsync <CancelTrade, EboTradeResponse>(httpClient, equiasConfiguration.CancelTradeUri, cancelTrade, false));
            }
            catch (Exception ex)
            {
                logger.LogError(ex, "{Message}", ex.Message);
                return(new EboTradeResponse
                {
                    IsSuccessStatusCode = false,
                    Message = ex.Message
                });
            }
        }
        public async Task <EboGetTradeStatusResponse> EboGetTradeStatus(IEnumerable <string> tradeIds, RequestTokenResponse requestTokenResponse, IEquiasConfiguration equiasConfiguration)
        {
            try
            {
                var httpClient = httpClientFactory.CreateClient();

                httpClient.BaseAddress = new Uri(equiasConfiguration.ApiDomain);
                httpClient.DefaultRequestHeaders.Add("token", requestTokenResponse?.Token);

                return(await PostAsync <IEnumerable <string>, EboGetTradeStatusResponse>(httpClient, equiasConfiguration.GetTradeStatusUri, tradeIds, false));
            }
            catch (Exception ex)
            {
                logger.LogError(ex, "{Message}", ex.Message);
                throw;
            }
        }
        public async Task <EboTradeResponse> ModifyPhysicalTrade(PhysicalTrade physicalTrade, RequestTokenResponse requestTokenResponse, IEquiasConfiguration equiasConfiguration)
        {
            try
            {
                logger.LogInformation("Physical Trade: {PhysicalTrade}", TradeCubeJsonSerializer.Serialize(physicalTrade));

                var httpClient = httpClientFactory.CreateClient();

                httpClient.BaseAddress = new Uri(equiasConfiguration.ApiDomain);
                httpClient.DefaultRequestHeaders.Add("token", requestTokenResponse?.Token);

                return(await PostAsync <PhysicalTrade, EboTradeResponse>(httpClient, equiasConfiguration.ModifyPhysicalTradeUri, physicalTrade, false));
            }
            catch (Exception ex)
            {
                logger.LogError(ex, "{Message}", ex.Message);
                return(new EboTradeResponse
                {
                    IsSuccessStatusCode = false,
                    Message = ex.Message
                });
            }
        }
        public async Task <RequestTokenResponse> EboGetAuthenticationToken(RequestTokenRequest requestTokenRequest, IEquiasConfiguration equiasConfiguration)
        {
            var httpClient = httpClientFactory.CreateClient();

            httpClient.BaseAddress = new Uri(equiasConfiguration.ApiDomain);

            return(await PostAsync <RequestTokenRequest, RequestTokenResponse>(httpClient, equiasConfiguration.RequestTokenUri, requestTokenRequest));
        }