-
Notifications
You must be signed in to change notification settings - Fork 7
/
StockDataJson.cs
118 lines (90 loc) · 2.88 KB
/
StockDataJson.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Analytics
{
//https://json2csharp.com/
// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
public class Pre
{
public string timezone { get; set; }
public int start { get; set; }
public int end { get; set; }
public int gmtoffset { get; set; }
}
public class Regular
{
public string timezone { get; set; }
public int start { get; set; }
public int end { get; set; }
public int gmtoffset { get; set; }
}
public class Post
{
public string timezone { get; set; }
public int start { get; set; }
public int end { get; set; }
public int gmtoffset { get; set; }
}
public class CurrentTradingPeriod
{
public Pre pre { get; set; }
public Regular regular { get; set; }
public Post post { get; set; }
}
public class Meta
{
public string currency { get; set; }
public string symbol { get; set; }
public string exchangeName { get; set; }
public string instrumentType { get; set; }
public int firstTradeDate { get; set; }
public int regularMarketTime { get; set; }
public int gmtoffset { get; set; }
public string timezone { get; set; }
public string exchangeTimezoneName { get; set; }
public double regularMarketPrice { get; set; }
public double chartPreviousClose { get; set; }
public int priceHint { get; set; }
public CurrentTradingPeriod currentTradingPeriod { get; set; }
public string dataGranularity { get; set; }
public string range { get; set; }
public List<string> validRanges { get; set; }
}
public class Quote
{
public List<double?> close { get; set; }
public List<double?> low { get; set; }
public List<double?> open { get; set; }
public List<double?> high { get; set; }
public List<long?> volume { get; set; }
}
public class Adjclose
{
public List<double?> adjclose { get; set; }
}
public class Indicators
{
public List<Quote> quote { get; set; }
public List<Adjclose> adjclose { get; set; }
}
public class Result
{
public Meta meta { get; set; }
public List<int> timestamp { get; set; }
public Indicators indicators { get; set; }
}
public class Chart
{
public List<Result> result { get; set; }
public object error { get; set; }
}
public class Root
{
public Chart chart { get; set; }
}
}