예제 #1
0
 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());
 }
예제 #3
0
 public static double GetMid(this IBidAsk bidAsk)
 {
     return((bidAsk.Bid + bidAsk.Ask) * 0.5);
 }