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
1 answer

JAVA Interactive brokers api

I call interactive broker reqHistoricalData() method and I see on IBGateaway i see that i get an error 200 | No security definition has been found for the request I've tried to change sec type to different ones but always returns same result…
0
votes
1 answer

JAVA IBrokers api

I use reqHistoricalData() method, but it doesn't return anything after call. Do I need additional method for handling data ? This is my code public void reqHistData (){ // Create a new contract Contract contract = new com.ib.client.Contract(); …
0
votes
1 answer

Retrieve ScannerSubscription results using IbPy

I'm struggling with the results of a ScannerSubscription. For example, if I request: qqq_id = 0 subscript = ScannerSubscription() subscript.numberOfRows(15) subscript.m_scanCode = 'HIGH_OPEN_GAP' subscript.m_instrument =…
Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268
0
votes
1 answer

Trading toolbox: "Warning: Error occurred while evaluating listener callback " only getting when running standalone program

I have a Matlab object with the following function: function obj = request_historical(obj,ticktype) startdate = floor(now)-1500; enddate = floor(now); period = '1 day'; tradehours = false; eventhandler =…
Luis Cruz
  • 1,488
  • 3
  • 22
  • 50
0
votes
0 answers

Can I use ZeroMQ with UNIX sockets in the same thread in C++?

I am trying to use ZeroMQ to connect to a historical data server written in Python while I connect to Interactive Brokers' Trader Workstation (TWS) using C++ through UNIX socket in Linux. But I can't seem to get both to work at the same time. I…
0
votes
1 answer

Changing tick type in IB API with Matlab

I am trying to request real time data using TWS via Matlab's IB API. I don't want regular market data though, specifically I am trying to obtain implied volatility. This is the guide I am using:…
Luis Cruz
  • 1,488
  • 3
  • 22
  • 50
0
votes
1 answer

C library linked to Ox

I'm currently playing around with state space models and the book I'm using has some very useful examples. Problem: These examples are written in Ox, which somewhat limits its usability, particularly as I want to test out some of my models using the…
youjustreadthis
  • 622
  • 3
  • 9
  • 24
0
votes
1 answer

C# & IB API - Passing variable while one method has to be declared as 'void'

Background: I am using the C# API of Interactive Brokers and Matlab to load financial data and to conduct an analisys on them. I am quiet used to coding in Matlab, but am at a beginner level with C#. I have created a dll file with all the respective…
Max Lauter
  • 3
  • 1
  • 4
0
votes
2 answers

Matlab - Interactive Brokers - Getdata function

I am using the getdata function of the trading toolbox in Matlab (http://de.mathworks.com/help/trading/ibtws.getdata.html) to get real time price data of forex pairs (e.g. EURUSD) through the most up to date TraderWorkStation (TWS) with an…
Benvaulter
  • 249
  • 1
  • 5
  • 14
0
votes
1 answer

Getting portfolio names and existing orders using Interactive Brokers IBPy

I've been experimenting with IBPy for a while; however, the two following things have been eluding me: a) How does one the name of the actual portfolios that positions belong to? I know how to find positions, their costs, values etc. (using…
genesis
  • 85
  • 1
  • 7
0
votes
1 answer

Interactive Brokers - EWrapperImpl Example - Object reference not set to an instance of an object

Why is the code below throwing the Object reference error when it tries to use the ClientSocket? I copied this example from the Interactive Brokers API documentation. https://www.interactivebrokers.com/en/software/api/api.htm I am connected using…
ADH
  • 2,971
  • 6
  • 34
  • 53
0
votes
1 answer

How to restrict order open to a certain time and close it in another certain time with Interactive Brokers API

Using Interactive Brokers API, I would like to restrict order open to a certain time for example not before 09:35, I would also like to close the position at about 5 minutes before the end of the day.I tried to use an if statment with Sys.time() but…
mql4beginner
  • 2,193
  • 5
  • 34
  • 73
0
votes
2 answers

How can I close an opened order on Interactive brokers after 5 seconds

I use a code (link is below) to open an order in Interactive Brokers ( I use a paper account) but when I tried to close the opened order after 5 seconds I was not able to do so.What am I doing wrong? library(IBrokers) myconid = 3 twsobj =…
mql4beginner
  • 2,193
  • 5
  • 34
  • 73
0
votes
2 answers

Subscribing to ECBOT bonds

I am using the C# Interactive Brokers API. I am successfully subscribing to ES, several currencies, stocks, etc. I need to subscribe to ZN and ZT quotes, but this doesn't seem to work as I get no callback or error message: Contract zn = new…
Ivan
  • 7,448
  • 14
  • 69
  • 134
0
votes
1 answer

IB API placing combo order fails - No security definition has been found for the request

What's wrong with the following order? I can request the contract id's but cannot place the order (Facebook Iron Condor) 23:00:48:360 <- 9-7-20-0-FB-OPT-20151218-110.0-C-100-CBOE-USD---0--- 23:00:48:371 <-…
Peter H.
  • 1
  • 1