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
6
votes
2 answers

Interactive brokers: How to retrieve transaction history records?

Basically, I want to use python to query my IB order history and do some analyze afterwards. But I could not find any existing API for me to query these data, does anyone have experience to do this?
Niucool Ki
  • 63
  • 1
  • 3
6
votes
3 answers

Adding the ibapi library to PYTHONPATH module in Spyder (Python 3.6)

I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Spyder. What I did so far: I installed the latest version for Windows from here I provided the following path to the PYTHONPATH…
Newskooler
  • 3,973
  • 7
  • 46
  • 84
6
votes
1 answer

reqExecutions IBrokers package

Will it be possible for someone to provide me a working example of reqExecutions? I am having a hard time with the ewrapper and callback mechanism. After searching google for working examples, I could not get my hands on anything that would simply…
aajkaltak
  • 1,437
  • 4
  • 20
  • 28
6
votes
2 answers

Can't connect to Interactive Brokers with python

I want to connect to IB with python, here is my code: from ib.ext.Contract import Contract from ib.ext.Order import Order from ib.opt import Connection, message def error_handler(msg): print "Server Error: %s" % msg def reply_handler(msg): …
Adel
  • 3,542
  • 8
  • 30
  • 31
6
votes
4 answers

Interactive Brokers automated trading

I've tried to setup Interactive Broker's C++ API in Visual Studio 2008, but I know very limited C++ and I keep getiing errors. :< 1) Is there any way to use some kind of light scripting language to connect to Interactive Brokers and make trade.…
user1067327
  • 67
  • 1
  • 2
5
votes
1 answer

Place an order in Interactive Brokers using API request

First, to begin with, I was successfully able to place an order using TWS API. However, for that, as I understood, I need to run the TWS desktop version in the background. But I need to run this on my remote server. So I used a 3rd party API called…
Wenuka
  • 887
  • 2
  • 9
  • 25
5
votes
1 answer

Making POST request from console app results in Error 403 - Access denied

I am trying to use the new IBKR Client Portal API. I have written a simple console program to access the API but it results in Error 403 - Access denied. If I try the same request from Postman it seems to be working. I tried using fiddler to see the…
null
  • 713
  • 2
  • 8
  • 30
5
votes
4 answers

installing the ibapi package

Hi I am trying to install ibapi in python however the package seems to be unavailable because there is an error every time I try to install it is there another way I can install this package . Your help will be greatly appreciated. I have left the…
5
votes
4 answers

How do I receive the data coming from IBs API in Python?

Interactive Brokers just released a python version of their API. I am trying to get data. I am using the 'examples' in 'Program.py', and just trying to get account values. I just want to know what the account liquidation value is, and get that into…
lukehawk
  • 1,423
  • 3
  • 22
  • 48
5
votes
4 answers

Docker container can't connect to host application using IP whitelist

I have an application running on my host which has the following features: it listens to port 4001 (configurable) and only accepts connections from a whitelist of trusted IP addresses (127.0.0.1 only by default, other addresses can be be added but…
robcarver
  • 76
  • 1
  • 5
5
votes
3 answers

Understanding Interactive Brokers tick events

When receiving financial tick data through Interactive Brokers' API methods tickPrice or tickSize the data will have the following parameters tickerId (symbol) field (1=bid, 2=ask, 4=last, 6=high, 7=low, 9=close) price canAutoExecute From any…
Morten
  • 1,819
  • 5
  • 28
  • 37
4
votes
2 answers

IBRK TWS API error() takes 4 positional arguments but 5 were given

If I run a basic TWS example, I receive the error message . If I comment out the error() call back it runs fine. I've tried this on several examples and get the same result. Exception has occurred: TypeError error() takes 4 positional…
jayurbain
  • 429
  • 1
  • 5
  • 11
4
votes
3 answers

Interactive Brokers API - How to disconnect an existing connection of IB Gateway and establish a new connection using Python?

I am testing Interactive Brokers Python API in a Hobby project. I am using Interactive Brokers Gateway (rather TWS). My project is a simple Django-based application. I can connect successfully and receive real-time data using the method…
Shimul
  • 463
  • 2
  • 7
  • 33
4
votes
2 answers

Getting Interactive Brokers API into Pandas

New to Python and IB API and stuck on this simple thing. This application works correctly and prints IB server reply. However, I cannot figure out how to get this data into a panda's dataframe or any other variable for that matter. How do you "get…
trderjoe
  • 41
  • 3
4
votes
1 answer

Using the native TWS Python APi (Interactive Brokers API), how do I get in a variable the price snapshot of a list of securities?

I am new to Python and I would like to get in a variable the price snapshot of a list of securities using the native TWS Python API (Interactive Brokers API). For example, for the stocks APPL, AMZN and NFLX, I would like to get something like…
Nytho
  • 41
  • 2
1
2
3
28 29