Questions tagged [ib-insync]
29 questions
0
votes
1 answer
ib_insync error (can noy connect to TWS IB)
yesterday my code was working fine, but today without any reason for me (and no changes to the code) I can not connect to Interactive Brokers TWS via ib_insync
The code itself is longer but error appears after I try to connect to IB
Code is:
from…

user21889349
- 1
- 1
0
votes
1 answer
No pendingTickersEvents being emitted after subscribing to IBKR streaming market data through reqMktData,
Fairly new to ib_insync. Requesting streaming market data but the ticker events aren't being emitted even after 2-3 minutes, no error gets thrown or anything, just nothing happens. Below is the code snippet attached.
def _on_connected_event():
…

Mubbashir Ali
- 311
- 3
- 7
0
votes
1 answer
How to connect a containerized Dash app to another containerized IB gateway and how to add cronjobs to run a button in the Dash app?
I just started learning docker and lightsail and I am writing a dashboard app on Dash that allows user to make calls to the Interactive Brokers gateway (IB Gateway) container, to get the latest positions, trade history etc.
Description
My dash app…

LTT
- 1
0
votes
0 answers
Automate TWS start and run historical request w ib_insync and IBC
I've been working on a code to start TWS and then download some historical data, optimizing parameters with this data and running a live algo after. I use my Interactive brokers account for everything and the problem is every time I start live…
0
votes
1 answer
request the number of shares in your portfolio via ib_insync
I would like to know how many shares I have of a specific position using ib_insync. Using solely the ib.positions() function gives me a [...] with much more information that just the number of shares.
I found some code on the internet:
from random…

Didi
- 1
0
votes
0 answers
How do I run both PyQt5 window and real time data from ib-insync together?
Trying to program a trading bot using pyqt5 for window desing & ib-insync api
window,connection and data retriving seem to work fine but I cant manage to make both window and real time data work. any suggestion ?
keep in mind im new to…

Amit Dahan
- 1
- 1
0
votes
1 answer
TWS-API and ib_insync: Order Status is not updated properly
I'm trying to place an order using the TWS-API and the python package ib_insync. However, I recognize that the order status is not updated by TWS automatically. Please consider the following snippet:
stock = Stock('BMW', 'SMART',…

PTueller
- 31
- 2
- 7
0
votes
0 answers
How do I change an appointment marked as unbillable in error to an appointment that is billable?
So I have an appointment last week for MRN 0000000217 was put down as nonbillable. How do I change this so it's not wrong? :slightly_smiling_face:
0
votes
0 answers
Try/Except python for error title containing a number
I have a python script and I am using a function from a library where an error is generated for some of the inputs to the function: (Error 200, reqID #####: ....). If an error is generated, then I would like the I would like the script to omit the…

Alexander
- 13
- 6
0
votes
1 answer
Using IB_insync accountvalues() returns none for 'SettledCash'
I have the following code running to return the specified account value.
def returnAccountValue(tag="SettledCash", currency="USD"):
accountValueString = ib.accountValues()
for a in accountValueString:
…

OffensiveName
- 11
- 2
0
votes
0 answers
Why does an awaited python coroutine not run (or finish?)?
In this minimum reproducible example, every minute at :00 I'm expecting to see the output of future stuff, but I don't.
Instead, all I get every :00 is:
# python3 test2.py
firing..
stuff
firing..
stuff

Jason
- 404
- 4
- 14
0
votes
1 answer
Interactive brokers python API only trasnmiting a single order per app instance
I am building an app to place orders through the Python API an am having an issue with the consistency of order transmission where only one order can be received and executed per app instance.
As an example if I run the below code it will execute…

Dodo
- 55
- 10
-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