The Traderszone Network

Published in TZ Latest News 12 September, 2017 by The TZ Newswire Staff

Currency pairs prices from IB using Python API

Hello. I am trying to write a small program to place bracket orders on IB TWS through their Python API. I am not that versed in Python (or other IB APIs); just piecing together bits of code that I am come across here and here. I am using Python 3.6 and Tkinter as the GUI. Where I am current stuck is getting the prices for currency pairs. The code below works fine for stocks:

def create_contract(self, symbol, sec_type, exch, prim_exch, curr):#*
contract = Contract()…

read more