public static BidAskMySqlTableEntity Create(IBidAsk bidAsk) { return(new BidAskMySqlTableEntity { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(bidAsk.Id), DateTime = bidAsk.DateTime, Bid = bidAsk.Bid, Ask = bidAsk.Ask }); }
private static ValueTask HandleTick(IBidAsk arg) { Console.WriteLine($"{arg.Id} {arg.Bid} | {arg.Ask} {arg.DateTime:O}"); return(new ValueTask()); }
public static double GetMid(this IBidAsk bidAsk) { return((bidAsk.Bid + bidAsk.Ask) * 0.5); }