forked from EvgBitWhiskey/BitWhiskey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TradeData.cs
140 lines (121 loc) · 3.46 KB
/
TradeData.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BitWhiskey
{
public class Balance
{
public string currency { get; set; }
public double balance { get; set; }
public Balance()
{
balance = 0;
}
}
public class ExchangeBalance
{
public string exchangeName { get; set; }
public string currency { get; set; }
public double balance { get; set; }
}
public class BuyOrder
{
public double quantity { get; set; }
public double rate { get; set; }
}
public class SellOrder
{
public double quantity { get; set; }
public double rate { get; set; }
}
public class AllOrders
{
public List<BuyOrder> buyOrders;
public List<SellOrder> sellOrders;
}
public class OpenOrder
{
public string uuid { get; set; }
public string openUuid { get; set; }
public string ticker { get; set; }
public string orderType { get; set; }
public double quantity { get; set; }
public double quantityRemaining { get; set; }
public double price { get; set; }
public DateTime openedDate { get; set; }
// public double Limit { get; set; }
}
public class TradePair
{
public string ticker { get; set; }
public string currency1 { get; set; }
public string currency2 { get; set; }
public bool isActive { get; set; }
}
public class Trade
{
public int id { get; set; }
public DateTime tradeDate { get; set; }
public double quantity { get; set; }
public double price { get; set; }
public double total { get; set; }
public string fillType { get; set; }
public string orderType { get; set; }
}
public class TradeLast
{
public double bid { get; set; }
public double ask { get; set; }
public double last { get; set; }
}
public class MarketCurrent
{
public string ticker { get; set; }
public double lastPrice { get; set; }
public double percentChange { get; set; }
public double volumeBtc { get; set; }
public double volumeUSDT { get; set; }
}
public class OrderDone
{
public string uuid { get; set; }
public string ticker { get; set; }
public DateTime doneDate { get; set; }
public string orderType { get; set; }
public double price { get; set; }
public double quantity { get; set; }
public double quantityRemaining { get; set; }
public double commission { get; set; }
public double totalSum { get; set; }
}
public class Pair
{
public string currency1;
public string currency2;
public Pair(string pair)
{
var valueSplit = pair.Split('_');
currency1 = valueSplit[0];
currency2 = valueSplit[1];
}
}
public class MyTradeState
{
public string errMsg;
public bool completedOk;
}
public class PriceCandle
{
public int date;
public double high;
public double low;
public double open;
public double close;
public double volume;
public PriceCandle Copy()
{
return new PriceCandle {date=date, open = open, high = high, low = low, close = close, volume = volume };
}
}
}