import com.hft.trader.*;
public class HFTTrader {
public static void main(String[] args) {
Strategy strategy = new MyStrategy();
Config config = new Config();
config.setThreadPoolSize(10);
config.setNetworkTimeout(1000);
Trader trader = new Trader(strategy, config);
trader.connectDataSource("data-source-url", "username", "password");
trader.run();
// ...
}
}
class MyStrategy implements Strategy {
@Override
public void onTick(Tick tick) {
// ...
}
}
threadPoolSize=10
networkTimeout=1000