-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModels.cs
93 lines (57 loc) · 1.96 KB
/
Models.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
namespace JokeTrader;
using System.ComponentModel.DataAnnotations;
public abstract class Concurrency {
[Timestamp]
public byte[] Version { get; set; }
}
public abstract class BasicKLine : Concurrency {
[Key]
public DateTime StartTime { get; set; }
public double OpenPrice { get; set; }
public double Volume { get; set; }
public Symbol Symbol { get; set; }
}
public class BTCKLine : BasicKLine;
public abstract class BasicRatio : Concurrency {
[Key]
public DateTime Timestamp { get; set; }
public double BuyRatio { get; set; }
public double SellRatio { get; set; }
public Symbol Symbol { get; set; }
}
public class BTCRatio : BasicRatio;
public abstract class BasicFundRate : Concurrency {
[Key]
public DateTime Timestamp { get; set; }
public double FundingRate { get; set; }
public Symbol Symbol { get; set; }
}
public class BTCFundRate : BasicFundRate;
public class BasicInterest : Concurrency {
[Key]
public DateTime Timestamp { get; set; }
public double OpenInterest { get; set; }
public Symbol Symbol { get; set; }
}
public class BTCInterest : BasicInterest;
public class Normalization {
public string Feature { get; set; }
public string SymbolId { get; set; }
public Symbol Symbol { get; set; }
public double Mean { get; set; }
public double Std { get; set; }
}
public class Symbol : Concurrency {
[Key]
public string Name { get; set; }
public double MaxPrice { get; set; }
public double MinPrice { get; set; }
public double MinLeverage { get; set; }
public double MaxLeverage { get; set; }
public DateTime LastUpdated { get; set; }
public List<BTCKLine> BTCKLines { get; set; } = [];
public List<BTCRatio> BTCRatios { get; set; } = [];
public List<BTCFundRate> BTCFundRates { get; set; } = [];
public List<BTCInterest> BTCInterests { get; set; } = [];
public List<Normalization> Normalizations { get; set; } = [];
}