Python wrappers for Java API of Interactive Brokers electronic trading platform.
Questions tagged [ibpy]
84 questions
14
votes
1 answer
How to enable TWS delayed market data?
Here is a script I am using to request market data.
I am not subscribed to the data-feed yet, so I though it would automatically return delayed market data, but apparently I have to enable it, but cannot find where to do that.
Here is the script and…

TB1
- 269
- 2
- 5
- 10
9
votes
3 answers
Getting parameters of listed options & futures in Interactive Brokers API
There are a lot of examples showing how to get particular asset's price from Interactive Brokers. However, when I want to get the whole chain of options for one asset, I don't know which particular strikes are listed. Same for futures, I don't know…

sashkello
- 17,306
- 24
- 81
- 109
8
votes
1 answer
ibpy: extract API responses for multiple contracts
I am interested in using ibpy with Interactive Brokers API to get real time tick data for a given universe of 100 stocks. The code below, from examples on the web works for one stock. Can someone tell me how i can do this for 100 stocks at the…

john wouters
- 91
- 1
- 5
6
votes
1 answer
IBPY get correct historical volume data
I am trying to get historical data from IBPY.
I get it, but the volume is extremely low to the point it's useless.
I would like to know how to get the correct historical volume estimation.
I'm executing the following code:
from ib.opt import…

Ilans
- 95
- 6
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
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
ibpy Getting portfolio information: Interactive Broker, Python
I have successfully written the code to extract the information from demo version of TWS regarding my positions using the code:
tws_conn = conn.Connection.create(port=7497, clientId=100)
tws_conn.register( acct_update,…

Zanam
- 4,607
- 13
- 67
- 143
4
votes
1 answer
Ibpy: how to capture data returned from reqAccountSummary
I'm using ibapi from interactive brokers and I got stuck on how to capture the returned data, generally. For example, according to api docs, when I request reqAccountSummary(), the method delivered the data via accountSummary(). But their example…

vt2424253
- 1,387
- 4
- 25
- 39
4
votes
2 answers
Interactive Brokers - Obtain Historical Data of OPT (MIDPOINT and TRADES)
I am trying to obtain both the underlying and options written on SPY via the Interactive Brokers API, and while obtaining current options (with strike, right etc.) is not a problem, I am stuck with obtaining historical data say from 5 months back to…

Chester
- 43
- 1
- 3
3
votes
1 answer
reqHistoricalData in IBPY doesn't return anything [python]
I am trying to obtain historical data from Interactive Brokers (IB) through Ibpy.
I have tried several scripts for this task, which I have adapted from others who indicate that it should work. None of them work for me, however!
I am new to python,…

Emjora
- 379
- 2
- 11
3
votes
2 answers
Ibpy with Interactive Brokers API not working
I feel there is something fundamentally wrong. I go from example code to example code trying each out and I have never had any success.
Below is a collection of scripts I've run and the response. Most of these scripts come from example found here on…

Runner Bean
- 4,895
- 12
- 40
- 60
3
votes
1 answer
Placing orders without transmitting them with IBpy?
I am new to IBpy and I am wondering if there is any way to place an order without transmitting it and waiting for a human input to actually transmit the order?
I am using placeOrder to place orders but I can't find a way of placing them without…

JordanBelf
- 3,208
- 9
- 47
- 80
2
votes
1 answer
Futures data no permissions through reqHistoricalData but reqMktData works
Been stuck on this for a while. All future market data permissions are enabled on our account, however when I try request historical bar data for the current futures contract for MES I get Market Data Service error message:No market data permissions…

Tom
- 1,235
- 9
- 22
2
votes
1 answer
get forex rate from IB api with python
I'm trying to get currency rates from interactive broker using ibpy library and there is code i found on google and i changed a little.
from ib.ext.Contract import Contract
from ib.opt import ibConnection, message
from time import sleep
# print all…

ikel
- 1,790
- 6
- 31
- 61
2
votes
1 answer
IBpy getting order status update
I want to get the status of my previous orders. I have the following simple code but I only get True/False values. Here is my code:
from ib.opt import Connection, message
tws_conn = Connection.create(port=7497, clientId=999)
tws_conn.connect()
def…

user1871528
- 1,655
- 3
- 27
- 41