|
1 |
| -namespace GasPrice.Data.Models |
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | + |
| 4 | +namespace GasPrice.Data.Models |
2 | 5 | {
|
| 6 | + public class Status |
| 7 | + { |
| 8 | + public DateTime timestamp { get; set; } |
| 9 | + public int error_code { get; set; } |
| 10 | + public object error_message { get; set; } |
| 11 | + public int elapsed { get; set; } |
| 12 | + public int credit_count { get; set; } |
| 13 | + public object notice { get; set; } |
| 14 | + } |
| 15 | + |
3 | 16 | public class USD
|
4 | 17 | {
|
5 |
| - public decimal price { get; set; } |
| 18 | + public double price { get; set; } |
6 | 19 | public double volume_24h { get; set; }
|
7 |
| - public double market_cap { get; set; } |
8 | 20 | public double percent_change_1h { get; set; }
|
9 | 21 | public double percent_change_24h { get; set; }
|
10 | 22 | public double percent_change_7d { get; set; }
|
| 23 | + public double market_cap { get; set; } |
| 24 | + public DateTime last_updated { get; set; } |
11 | 25 | }
|
12 | 26 |
|
13 |
| - public class Quotes |
| 27 | + public class Quote |
14 | 28 | {
|
15 | 29 | public USD USD { get; set; }
|
16 | 30 | }
|
17 | 31 |
|
18 |
| - public class Data |
| 32 | + public class Datum |
19 | 33 | {
|
20 | 34 | public int id { get; set; }
|
21 | 35 | public string name { get; set; }
|
22 | 36 | public string symbol { get; set; }
|
23 |
| - public string website_slug { get; set; } |
24 |
| - public int rank { get; set; } |
| 37 | + public string slug { get; set; } |
| 38 | + public int num_market_pairs { get; set; } |
| 39 | + public DateTime date_added { get; set; } |
| 40 | + public List<string> tags { get; set; } |
| 41 | + public int? max_supply { get; set; } |
25 | 42 | public double circulating_supply { get; set; }
|
26 | 43 | public double total_supply { get; set; }
|
27 |
| - public double? max_supply { get; set; } |
28 |
| - public Quotes quotes { get; set; } |
29 |
| - public int last_updated { get; set; } |
30 |
| - } |
31 |
| - |
32 |
| - public class Metadata |
33 |
| - { |
34 |
| - public int timestamp { get; set; } |
35 |
| - public object error { get; set; } |
| 44 | + public object platform { get; set; } |
| 45 | + public int cmc_rank { get; set; } |
| 46 | + public DateTime Last_updated { get; set; } |
| 47 | + public Quote quote { get; set; } |
36 | 48 | }
|
37 | 49 |
|
38 | 50 | public class CoinMarketCapResult
|
39 | 51 | {
|
40 |
| - public Data data { get; set; } |
41 |
| - public Metadata metadata { get; set; } |
| 52 | + public Status status { get; set; } |
| 53 | + public List<Datum> data { get; set; } |
42 | 54 | }
|
43 | 55 | }
|
0 commit comments