-
-
Notifications
You must be signed in to change notification settings - Fork 141
/
Binance.java
42 lines (34 loc) · 1.09 KB
/
Binance.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
package com.univocity.trader.exchange.binance;
import com.univocity.trader.*;
import com.univocity.trader.exchange.binance.api.client.domain.market.*;
import com.univocity.trader.simulation.*;
/**
* @author uniVocity Software Pty Ltd - <a href="mailto:[email protected]">[email protected]</a>
*/
public final class Binance implements EntryPoint {
public static final class Configuration extends com.univocity.trader.config.Configuration<Configuration, Account> {
private Configuration() {
super("binance.properties");
}
@Override
protected Account newAccountConfiguration(String id) {
return new Account(id);
}
}
public static final class Simulator extends MarketSimulator<Configuration, Account> {
private Simulator() {
super(new Configuration(), BinanceExchange::new);
}
}
public static final class Trader extends LiveTrader<Candlestick, Configuration, Account> {
private Trader() {
super(new BinanceExchange(), new Configuration());
}
}
public static Simulator simulator() {
return new Simulator();
}
public static Trader trader() {
return new Trader();
}
}