using System.Threading.Tasks;
using System.Collections.Generic;
public static void Main()
var url = "https://api.tabdeal.ir/r/plots/history/?symbol=BTC_USDT&from=1680000000&to=1782994713&resolution=1D";
var json = DownloadFile(url).GetAwaiter().GetResult();
var datas = System.Text.Json.JsonSerializer.Deserialize<Root>(json);
Console.WriteLine(datas.data.Count);
public static async Task<string> DownloadFile(string url)
using (var client = new HttpClient())
using (var result = await client.GetAsync(url))
if (result.IsSuccessStatusCode)
return await result.Content.ReadAsStringAsync();
public double time { get; set; }
public double low { get; set; }
public double high { get; set; }
public double open { get; set; }
public double close { get; set; }
public double volume { get; set; }
public List<Datum> data { get; set; }
public bool no_data { get; set; }