コード例 #1
0
        public async Task <IMarkup> GetForMerchantAsync(string merchantId, string assetPairId)
        {
            var markup = await _markupRepository.GetByIdentityAsync(MarkupIdentityType.Merchant, merchantId, assetPairId);

            MerchantVolatilitySettings volatilitySettings = await GetVolatilityMerchantSettingsAsync(merchantId);

            if (markup != null)
            {
                if (volatilitySettings.ZeroCoverageAssetPairs.Contains(assetPairId))
                {
                    markup.DeltaSpread = 0;
                }
                else
                {
                    await SetDeltaSpreadAsync(markup, volatilitySettings.IsDeltaSpreadFixed);
                }
            }

            return(markup);
        }
コード例 #2
0
        public async Task <IReadOnlyList <IMarkup> > GetForMerchantAsync(string merchantId)
        {
            var markups = await _markupRepository.GetByIdentityAsync(MarkupIdentityType.Merchant, merchantId);

            MerchantVolatilitySettings volatilitySettings = await GetVolatilityMerchantSettingsAsync(merchantId);

            foreach (var markup in markups)
            {
                if (volatilitySettings.ZeroCoverageAssetPairs.Contains(markup.AssetPairId))
                {
                    markup.DeltaSpread = 0;
                }
                else
                {
                    await SetDeltaSpreadAsync(markup, volatilitySettings.IsDeltaSpreadFixed);
                }
            }

            return(markups);
        }