forked from alexkoby/CryptArbitrage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Opportunity.java
55 lines (45 loc) · 1.66 KB
/
Opportunity.java
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
package my.awesome.project.cryptarbitrage30;
/**
* Created by Alexander on 2/1/2018.
*/
public class Opportunity {
private double percentGain;
private int type;
/*type 1 = usd * (coin/USD) * (btc/coin) * (usd/btc), type 2 = usd * (btc/usd) * (coin/btc) * (usd/coin)
type 3 = usd * (coin/USD) * (eth/coin) * (usd/eth), type 4 = usd * (eth/usd) * (coin/eth) * (usd/coin)
type 5 = eth * (coin/eth) * (btc/coin) * (eth/btc), type 6 = btc * (coin/btc) * (eth/coin) * (btc/eth)
type 6 = buy at Exchange1, sell at Exchange two
*/
private Coin highPriceCoinExchange;
private Coin lowPriceCoinExchange;
public Opportunity(double percentGain, int type, Coin highPriceCoinExchange, Coin lowPriceCoinExchange){
this.percentGain = percentGain;
this.type = type;
this.highPriceCoinExchange = highPriceCoinExchange;
this.lowPriceCoinExchange = lowPriceCoinExchange;
}
public double getPercentGain() {
return percentGain;
}
public void setPercentGain(double percentGain) {
this.percentGain = percentGain;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Coin getHighPriceCoinExchange() {
return this.highPriceCoinExchange;
}
public void setHighPriceCoinExchange(Coin highPriceCoinExchange) {
this.highPriceCoinExchange = highPriceCoinExchange;
}
public Coin getLowPriceCoinExchange() {
return this.lowPriceCoinExchange;
}
public void setLowPriceCoinExchange(Coin lowPriceCoinExchange) {
this.lowPriceCoinExchange = lowPriceCoinExchange;
}
}