Beispiel #1
0
        public async Task <BaseResponse <MarketData> > SelectMarketData(MarketDataModel model)
        {
            var request = new RestRequest("data", Method.POST);

            request.AddJsonBody(model);

            return(await base.Execute <BaseResponse <MarketData> >(request));
        }
    public void UpdateSpot(MarketDataModel marketData)
    {
        decimal ratio = (decimal)Random.Next(-2, 2) / 100;

        marketData.PriviousSpot = marketData.Spot;
        marketData.Spot        += ratio == 0 ? 0 :Math.Round(ratio * marketData.Spot, 3);

        marketData.Time = DateTime.Now.ToString("HH:mm:ss");
    }