Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
Sorry for the multipe email (as I can't edit my response). Just want to add that currently the output of the script is:
```
Retrying... 1
Retrying... 2
Retrying... 3
Failed to get data after 3
By
Little Trader
·
#312
·
|
Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
The sequence is simply:
1. Connect to TWS
2. reqMktData()
3. Give it some time to get data.
4. If some fields are NaN or None, cancelMktData(), and retry.
Below is a minimal example. When the problem
By
Little Trader
·
#311
·
|
Re: ib.reqTickers() conflicts with ib.reqTickByTickData()
Looking for this: https://ib-api-reloaded.github.io/ib_async/api.html#ib_async.util.patchAsyncio ?
By
biney59@...
·
#310
·
|
Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
Can you outline the steps that reproduce the problem like;
* Connect TWS.
* Connect client.
* Subscribe reqMktData
* ...
Only because original post had two issues, so I'm confused since it was
By
biney59@...
·
#309
·
|
Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
I tested it. It does seem that type 2 will give me the most recent quote and price when the market is open. However, even if I use type 2, the problem I described in the original email persisted,
By
Little Trader
·
#308
·
|
Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
Okay, MktDataType 2 may be the answer. Parts of the documentation say it is the quotes recorded at the last closing, which is not what I want, but part of it says it is the last quotes seen by their
By
Little Trader
·
#307
·
|
Re: Determining which stock is bringing my portfolio into a loss
I'm curious, does it work during regular trading hours?Sent from my Galaxy
By
Mel
·
#306
·
|
Re: Determining which stock is bringing my portfolio into a loss
Hi,
Yes, setting the market data type to 2 solved the problem.
Pranav
Sent: Friday, April 4, 2025 11:19 PM
To: [email protected]
Subject: Re: [ib-async] Determining which stock is bringing
By
Pranav Lal
·
#305
·
|
Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
Type 2 is the last data recorded at market close, which is not what I want.
Also, "live" does not usually just mean that I will only get the data when there are new updates. It also means that I will
By
Little Trader
·
#304
·
|
Re: Determining which stock is bringing my portfolio into a loss
Have a look at my reply to another topic, I think it is closely related to your issue because you are requesting after close: /g/ib-async/message/302
By
biney59@...
·
#303
·
|
Re: ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
From my understanding, *ib.reqMktData(contract)* requests LIVE updates, meaning updates will be sent if changes occur after your request. Meaning if your contract is not active, there is chance it may
By
biney59@...
·
#302
·
|
ib.reqMktData() does not get certain fields when connecting to the gateway the second time.
I am having an odd problem. Everything works as expected when my client makes an initial connection to the gateway. However, if I restart the client process, sometimes `reqMktData() `won't get all the
By
Little Trader
·
#301
·
|
Determining which stock is bringing my portfolio into a loss
Hi all,
I am trying to write some code to determine which stock is bringing my
portfolio into a loss.
My logic is to see if the averageCost is greater than the current market
price for each stock in
By
Pranav Lal
·
#300
·
|
Re: Clicking an override button
Hi,
I do not use as sophisticated an approach. I have just set the property for
all orders. There is no harm in setting it that I have seen.
Pranav
From: [email protected]
By
Pranav Lal
·
#299
·
|
Re: Clicking an override button
Thanks for your reply
So if I follow you correctly,
you submit an order,
it fails,
you check your Trade.log for the error message,
and in a future order, you set Order.advancedErrorOverride
By
Gonzalo Saenz
·
#298
·
|
Re: Clicking an override button
Hi Gonzalo,
Documentation is sketchy to say the least. See the below link.
https://interactivebrokers.github.io/tws-api/order_submission.html
The rest of it was trial and error.
By
Pranav Lal
·
#297
·
|
Re: Clicking an override button
Where did you get this information? Is there any documentation for this?
From time to time my orders are canceled, this might help?
---- On Thu, 27 Mar 2025 17:41:35 +0100 Pranav
By
Gonzalo Saenz
·
#296
·
|
Re: Clicking an override button
Hi all,
Problem solved. I had to use a key value pair when specifying the string in
the advancedErrorOverride property.
advancedErrorOverride="8229,SURVEILLANCE"
I initially thought that ib_async
By
Pranav Lal
·
#295
·
|
Re: Trying to load data asynchronously and struggling with asyncio again
`ib.reqHistoricalDataAsync` takes timeout parameter, set it to 0 and this method will not time out.
By
t1user
·
#294
·
|
Re: ib.reqTickers() conflicts with ib.reqTickByTickData()
thank you for replying,
I have identified the problem: the reqTickers was nested in the reqTickByTickData, so I changed the App structure.
BTW do you know the function to use for nested call (even
By
barone
·
#293
·
|