Last active
August 24, 2017 14:29
-
-
Save stevenbg/87aeb8c0e59e58eff2fce509aff80d1b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import sys | |
| from ibapi.contract import * | |
| from ibapi.order import Order | |
| from ibapi import wrapper | |
| from ibapi.client import EClient | |
| contract = Contract() | |
| contract.symbol = "SIE" | |
| contract.secType = "STK" | |
| contract.currency = "EUR" | |
| contract.exchange = "SMART" | |
| order = Order() | |
| order.action = "BUY" | |
| order.orderType = "LMT" | |
| order.totalQuantity = 100 | |
| order.lmtPrice = 20 | |
| w = wrapper.EWrapper() | |
| c = EClient(w) | |
| c.connect("127.0.0.1", 7496, clientId=0) | |
| c.placeOrder(1, contract, order) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment