17 using System.Collections.Concurrent;
18 using System.Collections.Generic;
19 using Newtonsoft.Json;
34 private readonly ConcurrentDictionary<string, DateTime> _startDates =
new ConcurrentDictionary<string, DateTime>();
40 public override DateTime
EndTime
54 [JsonProperty(
"date")]
55 public DateTime
Date {
get;
set; }
60 [JsonProperty(
"open")]
61 public override decimal
Open {
get;
set; }
66 [JsonProperty(
"high")]
67 public override decimal
High {
get;
set; }
73 public override decimal
Low {
get;
set; }
78 [JsonProperty(
"close")]
79 public override decimal
Close {
get;
set; }
84 [JsonProperty(
"volume")]
85 public override decimal
Volume {
get;
set; }
90 [JsonProperty(
"adjOpen")]
96 [JsonProperty(
"adjHigh")]
102 [JsonProperty(
"adjLow")]
108 [JsonProperty(
"adjClose")]
114 [JsonProperty(
"adjVolume")]
120 [JsonProperty(
"divCash")]
127 [JsonProperty(
"splitFactor")]
149 if (!_startDates.TryGetValue(config.
Symbol.
Value, out startDate))
152 _startDates.TryAdd(config.
Symbol.
Value, startDate);
156 var source = Invariant($
"https://api.tiingo.com/tiingo/daily/{tiingoTicker}/prices?startDate={startDate:yyyy-MM-dd}&token={Tiingo.AuthCode}");
174 var list = JsonConvert.DeserializeObject<List<TiingoPrice>>(line);
176 foreach (var item
in list)
179 item.Time = item.Date;
180 item.Value = item.Close;