Created
March 4, 2016 14:41
-
-
Save rterp/1c3578465ff94965f7f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void placeCurrencyOrder() { | |
InteractiveBrokersClientInterface ibClient = InteractiveBrokersClient.getInstance("localhost", 7999, 1); | |
ibClient.connect(); | |
CurrencyTicker eurTicker = new CurrencyTicker(); | |
eurTicker.setSymbol("EUR"); | |
eurTicker.setCurrency("USD"); | |
eurTicker.setExchange(Exchange.IDEALPRO); | |
String orderId = ibClient.getNextOrderId(); | |
int amount = 50000; | |
TradeOrder order = new TradeOrder(orderId, eurTicker, amount, TradeDirection.BUY); | |
ibClient.placeOrder(order); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment