-
Notifications
You must be signed in to change notification settings - Fork 47
Placing an Equity Order with Interactive Brokers
Rob Terpilowski edited this page Mar 26, 2016
·
1 revision
public void placeEquityOrder() {
InteractiveBrokersClientInterface ibClient = InteractiveBrokersClient.getInstance("localhost", 7999, 1);
ibClient.connect();
StockTicker amazonTicker = new StockTicker("AMZN");
String orderId = ibClient.getNextOrderId();
int shares = 500;
TradeOrder order = new TradeOrder(orderId, amazonTicker, shares, TradeDirection.SELL);
ibClient.placeOrder(order);
}