Questions tagged [interactive-brokers]

A popular electronic trading platform, supporting API through Java, C++, C#, VB, Python 3, and Excel.

A popular electronic trading platform, supporting API through Java, C++, C#, VB, Python 3, and Excel. Unofficial implementations include ibrokers for R and ibpy for Python 2.

Useful links

426 questions
0
votes
2 answers

Side by side error running Interactive Brokers API with Matlab on Windows 7 (64 bit)

Recently I have tried to connect to Interactive Brokers API using Trading Toolbox on Matlab 2015a running on Windows 7 (64 Bit) machine. TWS and IB API were installed already. Matlab was throwing a side by side eror. Windows Event Viewer Error Log…
tomaskazemekas
  • 5,038
  • 5
  • 30
  • 32
0
votes
1 answer

How to get buying power and cash available of my account with IBPy

How do I the get buying power and cash available of my account with IBPy? I'm not seeing anything obvious in IBPy docs.
Darian Hickman
  • 853
  • 10
  • 26
0
votes
2 answers

IBpy Ewrapper methods don't work only EClientSocket

Hi I'm trying to use IBPy as per here: https://github.com/blampe/IbPy and it is reacting very weirdly. Methods calling upon the EClientSocket class returns data but any EClientSocket method calling to EWrapper or EWrapper methods returns None and/or…
user2880845
  • 39
  • 2
  • 7
0
votes
2 answers

What is the proper way to use Interactive Broker API's IOrderHandler interface in Java?

I am currently developing a Java application for trading using Interactive Broker's API. I have encountered an issue and I am unsure what I am doing incorrectly or whether this is a bug in the API. At this point I can currently submit my orders…
autronix
  • 2,885
  • 2
  • 22
  • 28
0
votes
2 answers

Customize Interactive Brokers' reqIds() and reqMktData() Java methods

I am trying to write customized code within Interactive Brokers' Java API. There are a bunch of methods that get sent to TWS via the eClientSocket object. Two examples are reqIds() and reqMktData(). These are both void methods, so they do not return…
Greg
  • 1,124
  • 10
  • 9
0
votes
1 answer

Interactive Brokers with IbPy, API connection not working on Mac OsX

I am having some issues with connecting with Interactive Brokers API with IbPy. I am trying to import: ib.opt import Connection, message not working and the error message I get is: from ib.opt import Connection, message Traceback (most recent call…
0
votes
1 answer

Disconnecting from Interactive Brokers with ibpy

Here is a pretty standard piece of code I use to request some data from Interactive Brokers API through python: from ib.ext.Contract import Contract from ib.opt import ibConnection, message import time def watcher(msg): print msg con =…
sashkello
  • 17,306
  • 24
  • 81
  • 109
0
votes
1 answer

Simple Script With Interactive Brokers Java API

I am new to java though I have some experience with R. I have taken part of a java course and have read a book or two as well as the API guides published by interactive brokers. This API is higher level than anything I have worked with before,…
mks212
  • 901
  • 1
  • 18
  • 40
-1
votes
1 answer

IBKR: No security definition has been found for the request, contract:

I am new in both IBKR and its API, the code given below is giving error on qualifyContracts method: Error 200, reqId 308: No security definition has been found for the request, contract: Option(symbol='TSLA', lastTradeDateOrContractMonth='20230303',…
Volatil3
  • 14,253
  • 38
  • 134
  • 263
-1
votes
1 answer

IB-Insync only place Stk order once (will not execute additional buy or sell)

I am trying to implement a Tradingview/Interactive Brokers API using IB-Insync to automatically place orders with Interactive Brokers TWS via tradingview webhook alerts. I have consumed a lot of time trying to resolve why TWS API is only executing…
Trent
  • 43
  • 1
  • 5
-1
votes
2 answers

last price for multiple symbols

I'm trying to get the last price for multiple symbols using ib_insync package, but I don't know how to pass the ib object to the function, and the last price returned from the function is nan. This will be single threaded, so I can use a global…
Zeus
  • 1,496
  • 2
  • 24
  • 53
-1
votes
1 answer

How to write to a file by using (or changing) print using Python 3.x

Im using an API from Interactive Brokers to get historical data and I am using their code to download the data. The code uses the print function to output the data to the terminal, but I would like to redirect it to a file (lets call that file…
-1
votes
1 answer

Interactive Broker: How to get Account Code for my demo-session in TWS?

I have been trying to connect to IB TWS using C++ APIs. It looks like I need to know my Account-Code tough to connect with the APIs, but I don't know where to find it. { "host": "localhost", "port": 7497, "clientId": 888, # this…
-1
votes
1 answer

java interactive brokers api historical data and tick

brian was able to get a working example of this on 9.72 and with slight modification it can probably run in 9.73. The question was simple: look at current price and compare to previous day session high and low. If price is above it prints out buy,…
-2
votes
1 answer

ibapi.client connection hangs and doesn't close or disconnect

I'm getting started with the interactive brokers api, and starting off the examples do seem to work, but the one thing that's not is that the connection hangs pretty much on every instantiation of the IBapi class. Here's a basic example: from…
1 2 3
28
29