Optimize the BarChart pull

This commit is contained in:
2025-06-28 12:21:47 -04:00
parent 3719e4d2bf
commit 8c73faf59f
2 changed files with 38 additions and 26 deletions

View File

@@ -5113,6 +5113,8 @@ namespace MarketData.Helper
HttpNetResponse httpNetResponse = null;
try
{
DateGenerator dateGenerator = new DateGenerator();
DateTime currentPricingDate = dateGenerator.GetPrevBusinessDay(DateTime.Now);
StringBuilder sb = new StringBuilder();
String strRequest;
if (null == symbol) return null;
@@ -5138,7 +5140,7 @@ namespace MarketData.Helper
Dictionary<String, double> values = CreateBarChartValues(pairs);
Price price = new Price();
price.Symbol = symbol;
price.Date = DateTime.Now;
price.Date = currentPricingDate;
price.Source = Price.PriceSource.BarChart;
if (values.ContainsKey("lowPrice")) price.Low = values["lowPrice"];
if (values.ContainsKey("highPrice")) price.High = values["highPrice"];