Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: C++ upgrade api to 10.11, __bid64.. error
At the time, I downloaded the Intel source and imported it into VC. It seemed to compile fine but the?resulting?library didn't work with TWS so I stuck with 32bit for a while.? However, when I upgraded to 10.15.02, the library included with the TWS API (TWS API\source\CppClient\client\lib\libbid.lib) turned out to work well for 64 bit so that's what I'm using now. (I use Qt 6.3 as my framework)? On Sat, Jun 11, 2022 at 7:51 AM <taral@...> wrote: HI Frederick, |
Re: Why does my IBKR (Interactive Brokers) bot sometimes not receive data?
I second Mark's remark about your error paths. Are you sure you capture all possible error reporting callbacks? It is rare (though now unheard of) that TWS API calls silently fail without error messages. If your issue is connectivity related I would expect you . And what does your TWS/IBGW think is happening? Have you enabled "API logging with market data"? 闯ü谤驳别苍 On Fri, Jun 10, 2022 at 06:13 PM, mark collins wrote:
|
Re: Why does my IBKR (Interactive Brokers) bot sometimes not receive data?
Bryce, So many questions raised by your statement. What language are you using/are you capturing all the possible error routes? Are the markets open at the times you see the fault, are you printing bars, ticks or changes? Is there any disconnection/reconnection attempt reported - are the data servers going offline (they report when they connect and disconnect)... Lastly, populate your code with traceable statements, timestamp them and compare when the CSV stops updating with the activity in the code at the time. Just some ideas. Best wishes, M On Fri, 10 Jun 2022 at 23:14, Bryce Turner <bryce.turner.axiom@...> wrote: I have a bot for printing price data to csv format. Sometimes, no data has been added to the csv. This happens despite no error messages being printed in the terminal. I assume the problem is with the connection between my bot and IBKR since this issue seems to happen randomly and I'm not changing my bot code. I am not sure how to go about diagnosing the problem, and would appreciate any suggestions or information. Thanks! -- +44 (0) 7528 551604? Gulfstream Software - Winner Risk Management Awards 2010 This message is subject to : |
Why does my IBKR (Interactive Brokers) bot sometimes not receive data?
I have a bot for printing price data to csv format. Sometimes, no data has been added to the csv. This happens despite no error messages being printed in the terminal. I assume the problem is with the connection between my bot and IBKR since this issue seems to happen randomly and I'm not changing my bot code. I am not sure how to go about diagnosing the problem, and would appreciate any suggestions or information. Thanks!
? |
Re: How Long does it take orders to reach market.
How are you measuring? On Thu, Jun 9, 2022, 8:15 PM FreeGoldRush <mike@...> wrote: 40ms to 1s is also my experience.? The network delay between my computer and the IBKR API server used by TWS is just a few ms, so in my case it is not network delay that can be fixed by co-locating. |
Re: How Long does it take orders to reach market.
You could find a thinly traded stock, place an out of the money order and measure how long it takes for the order to appear. You need to be receiving market data and looking at the timestamps. Python might not be the best language for precise time values. The actual will probably vary over the day depending on how busy IB and the entire trading network is.
|
Re: How Long does it take orders to reach market.
Franco Chiesa Docampo
开云体育Your welcome Marc, Im glad it helped. I wonder how can we measure the latency between IB servers and the exchanges though...?
|
Re: How Long does it take orders to reach market.
Franco, thanks for the link, I'm getting 25ms ping time, which is pretty good. On Wed, Jun 8, 2022 at 8:48 PM Franco Chiesa Docampo <fchiesadoc@...> wrote:
|
Re: How Long does it take orders to reach market.
Franco Chiesa Docampo
开云体育I assume it depends as well of your physical location. Have you tried to ping IB host servers? Maybe this can help: ?.?Even though I am not 100% sure. El 8 jun. 2022, a la(s) 21:31, Marc Valme <marcvalme@...> escribió:
|
How Long does it take orders to reach market.
I'm not sure of an affective way to measure it, but from the time my python code send the socket msg how long does it take.? I assumed since the there is a 50 message limit per second that it was about .040ms but it Is not.??
I tested this by taking the current market price ( not from IBKR but from source with less latency ) and adding 5 points.? I would repeat and update this every 40ms.? Theoretically the lmt order should not get filled since the emini rarely moves that fast.? I noticed that the order gets filled rather quickly because IBKR could not update the order in less than 40ms.? If I changed this to once second the order does not get filled at all.? So the lag is between 40ms and 1 second.?? |
Re: Double entry
O I see now that I have al several of those entries with extra .01?? But normally it seems always to be the case of a BAG order.
In this specific case I have on BAG with two legs. But the legs are added again without a "BAG entry". That's why the legs are double. But I have no idea why? It's the first time I saw this. It makes the trade log at bit unreliable. Indeed in the FlexQuery there are no double entries. I also had a time that I had missing trades see /g/twsapi/topic/87500038#48542? But now I use the latest stable version so I hope that's not the problem. |
Re: Double entry
I haven’t been able to find any documentation on the format of ExecId so I am of limited help.? But here’s a bit more detail on what I’ve seen.? ? The first time I saw this additional ‘.01’ show up on execution was in February 2022. I’ve only seen it on an execution coming through the API.? When that same execution is included in a FlexQuery report, it no longer has the additional ‘.01’.? However, the executions in the FlexQuery report all have a ‘PartialExecution’ or ‘P’ note on them, which is why I mentioned it might have something to do with a partial execution.? Since you only traded one contract and got one fill, there must be other occasions when this ‘.01’ gets appended. |
Re: Problems to filter ApiController's option chain for reqContractDetails()
hrecalde
First of all, thanks for replying to this topic?闯ü谤驳别苍, I appreciate your opinion.
I'll take a look at creating reqOptionChain(...) which I agree could be the best approach. -------------------------------------------------------------------------------------------------------------------------------------- It is not desirable from an architecture point of view that you push this very specific functionality into ApiController. Keep in mind that all?objects need to be consumed in order to prevent problems with the API message reader. Simply ignoring callbacks for??? that you are not interested in is not a good idea. ---------------------------------------------------------------------------------------------------------------------------------------------------------- I completely agree with you regarding modifying ApiController, that's why I was saying to create a new class and overwrite the reqContractDetails() method but I'll look into the first solution before. Best regards! |
Re: Double entry
I’ve seen that extra .01 show up on executions that are filled across multiple exchanges.? For example, a thinly traded option might get filled across ISE, EMERALD, EDGX, PSE, etc. at slightly different prices.? The execution records will have a separate entry for each fill on each exchange all having that extra .01 at the end. |
Re: Double entry
开云体育Sorry, sent this too quickly!? Just noticed that the execution ID’s you list are different, so may not be a correction. ? From: [email protected] <[email protected]> On Behalf Of David Walker
Sent: Tuesday, 7 June 2022 8:53 AM To: [email protected] Subject: Re: [TWS API] Double entry ? It is likely a correction, per the note on the Executions page () ? “Note if a correction to an execution is published it will be received as an additional IBApi.EWrapper.execDetails callback with all parameters identical except for the execID in the Execution object. The execID will differ only in the digits after the final period.” ? From: [email protected] <[email protected]> On Behalf Of info@... ? Dear all, |
Re: Double entry
开云体育It is likely a correction, per the note on the Executions page () ? “Note if a correction to an execution is published it will be received as an additional IBApi.EWrapper.execDetails callback with all parameters identical except for the execID in the Execution object. The execID will differ only in the digits after the final period.” ? From: [email protected] <[email protected]> On Behalf Of info@...
Sent: Tuesday, 7 June 2022 4:17 AM To: [email protected] Subject: [TWS API] Double entry ? Dear all, |