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

File suddenly writes 1 row of data instead of whole entire request

I am using the IBAPI to gather historical stock quotes, and currently, I am using this code to achieve that: from ibapi.client import EClient from ibapi.wrapper import EWrapper from ibapi.contract import Contract def print_to_file(*args): with…
Hoogoo
  • 15
  • 1
  • 8
0
votes
0 answers

Headers not acting as headers when output is written. Python

Currently I am using the IB API to request historical data. I am having some trouble with adding headers to the data. The output I am currently receiving is: Ticker; Date; None; Time; Open; High; Low; Close; Volume AAPL ; 20190507; ; 10:19:00…
0
votes
2 answers

Reformatting Output Python

Currently I am trying to request data from the IB API, but I have a small formatting issue. The API gives me the following output: AAPL; 20190507 16:20:00; price; price; price; price; number I would like the data to return as: AAPL; 20190507;…
Hoogoo
  • 15
  • 1
  • 8
0
votes
1 answer

Python output as columns, also adding comma's (csv)

Currently I am using the IB API to request historical data. I am having some trouble with adding headers to the data. The output I am currently receiving is: Ticker; Date; None; Time; Open; High; Low; Close; Volume AAPL ; 20190507; ; 10:19:00…
0
votes
1 answer

How to export IB position data to a data frame?

I was trying to export IB position/account value into data frame for further processing purposes in python. But failed to figure out how to achieve this. Can anyone help? import pandas as pd import numpy as np import time import ibapi from…
Bobo Li
  • 11
  • 1
0
votes
1 answer

no data exchanged between IBpy2 and IBGateway

I am using backtrader as client with IBpy2 to access my IBC controlled IBGateway running on Docker. I'm facing the issue that my system starts and just hangs there, with no errors or printed debug info. I debugged my way as far as this line,…
Don Giulio
  • 2,946
  • 3
  • 43
  • 82
0
votes
1 answer

quantconnect IBController needing to relogin every few hours,

I have updated Ryan Kennedy's IBConnect Docker image by getting the latest versions from Quantconnect, here is the Docker image I ended up with. Basically the dockerfile contains: FROM ubuntu:18.04 MAINTAINER Ryan Kennedy…
0
votes
2 answers

Installed ibpy2 but cannot import

I installed Ibpy2 to connect to my interactive broker account. https://github.com/blampe/IbPy I installed IbPy2 successfully (by installing pip install IbPy2 AND python setup.py install). However, when I open Spyder in Anaconda and run from…
Chris Pang
  • 33
  • 1
  • 7
0
votes
1 answer

I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Flask

I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Python 3.7 . What I did so far: I installed the latest version for Windows 10 of the API I ran C:\TWS API\source\pythonclient and run…
john_johnk
  • 51
  • 8
0
votes
2 answers

Fail to use ibpy to send Futures order in InteractiveBrokers

I am using ibpy to send orders to TWS in InteractiveBrokers. I am able to send stock orders, such as SPY, but I am unable to send Futures. Here is the code I am using, copied online: from ib.opt import Connection, message from ib.ext.Contract…
John Suski
  • 21
  • 3
0
votes
1 answer

Interactive Brokers and MATLAB Connection

I'm trying to connect MATLAB to interactive brokers. I'm aware there was a bug before. However, I got an email in August saying it was fixed. I'm currently running this code; % establish connection to TWS ib = ibtws('',7497); %% create currency…
0
votes
1 answer

How to get Fundamental Ratios generic ticks (python 3.x) (Interactive Broker)

Based on the following website, i would like to download Fundamental Ratios generic ticks via reqMktData "233,236,258" https://interactivebrokers.github.io/tws-api/fundamental_ratios_tags.html However, I have tried many times, the error can't be…
Aqueous Carlos
  • 445
  • 7
  • 20
0
votes
1 answer

Interactive Brokers C++ Error: error: 'min' was not declared in this scope

I am trying to setup the Interactive Brokers API on Ubuntu (18.04). I have installed both the IB Gateway, which is used for communicating with exchanges, as well as other API software for developing trading algorithms in Java, C++, C# and Python.…
ofey73
  • 155
  • 3
  • 12
0
votes
2 answers

How to make a JSON post using C# from the operations of Ninja Trader?

I need to perform a JSON CSharp Post from the Ninja Trader to one for Api C# of the Interactive Broker, using following: { "Instrument": "SIE", "Side": "BUY", "Volume": "200", "Price": "100", "Type": "LMT", "Accounts": ["DU1107110", "DU1107170",…
0
votes
2 answers

Receiving Market Data into Excel

My summer project is developing an algorithmic trader that receives market data and trades based off indicators. I pull data from a company called Interactive Brokers using their TWS(Trader workshop station). I have downloaded their Excel API which…
David
  • 3
  • 4