Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
TWS multiple connections question
I have multiple programs that are each looking at different things, so, the each independently will need to place an order. My question is, is there anything wrong with that or a reason it won't work. From what I?can tell, there isn't an active ongoing connection between TWS and anything that would place an API call, the call is placed and the resulting processes take place, and that's that.? So in this regard, what concerns should I have? Has anyone else done this and experienced any issues?if two calls are placed at the same time for example? Or, am I?missing something and this is not something that is going to work and I need to figure out some alternatives? Thanks in advance for all the help! -Rob |
Re: Confirming order executions
Over thousands of API entered orders I've only had a problem once and I'm not even sure what caused that.? So it's not clear what the technical answer is, but the practical answer is that order updates arrive just fine.
But even with that I don't depend too much on the quality of information coming back from IB.? There are limits on the orders my software will enter to provide a margin of safety. |
Confirming order executions
The IB TWS API documentation suggests that some of the orderStatus
states may not be transmitted, using the example of a market order in a fast-moving market. I am left unsure if I can depend on the "Filled" order status being returned as a message. Given that I am only placing Limit and Trail Limit orders, never Market orders, should I worry about checking up on orders with execDetails via reqExecutions? Or am I at least safe in expecting a "Filled" status update for these orders? TIA. |
Linking a sub-user to a specific managed account
Let's say my account has two users. First one is the main user. And the second one is a sub-user, added under "Account settings" > "Users & Access Rights".
And I have two accounts, first one is the main trading account, and the second one is another account defined under "Account settings" > "Open an Additional Account". Can I define the second sub-user to have access only to the second additional account? So he can't see any data or make any trades on the main account, only on the second account? And on the second additional account, he will be able to view all data and make trades (by using the portal and by using TWS API)? |
Re: How to “ Split the Spread to Capture Better Prices” ?
Here is the IB statement on a "split-spread" order: "Split spread orders include any order that is priced within the spread between the bid price and ask price. When they fill, these orders yield significant price improvement."
? IB should provide a detailed study explaining this statement because my own statistical study on this shows otherwise.? Once again, I realize how counterintuitive that is.? Markets tend to be that way. By the way, it's not a bad strategy.? My own data shows it hasn't been harmful.? But significant price improvement?? No way. |
Re: How to “ Split the Spread to Capture Better Prices” ?
The short answer is that this does not work well.? I realize that is counterintuitive but I've captured data on thousands of trades using my own algorithm for getting in between the bid-ask.? Your first thought is something like this:? If I can sit at NBBO until getting filled then OF COURSE I'm coming out ahead on average.? But then you'd have to ask why market makers don't do this if it were such a good idea.? The vast majority of liquidity from market makers is further into the order book.? So I won't review all the statistical data and explanations here but I can tell you that there is a deep rabbit hole you'll go down.?
If anyone is willing to share their own experiences and data about this I'd love to get more into it more. |
Re: How to “ Split the Spread to Capture Better Prices” ?
On Fri, Dec 24, 2021 at 10:52 PM, Erez Kaplan wrote:
“Split the Spread to Capture Better Prices”I didn't get the email (so to speak), but this page sounds like the same thing:? What they're talking about is quickly changing your order price to buy slightly above the highest bid price or sell below the lowest ask. You can easily do that with the API, but you have to program it for yourself. My experience has been that it is hard to beat institutional traders at that game. If you want to have a long or short position, you also risk having the price move against you until the trade becomes unprofitable. [rwk] |
Re: Install TWS or IB gateway on Ubuntu and ARM64 bit processor
Wow, 闯ü谤驳别苍 this is outstanding work. The internet is a beautiful place thank you so much for taking the time to reply and explain the steps you took.
I don't use 2fa or tws so your experience gives me motivation for the gateway. I had seen a similar suggestion on stack overflow regarding adding the openfx paths to the Java exec. I had some hunches where to trial and error in the shell script so your results are time-saving. I also saw another suggestion to do something like a symbolic link between the default-jre (/usr/bin) Java and openjfk ( /lib something I forget). Can't wait to get back to the office and try these ideas out. Cheers and happy holidays. |
Re: Forced upgrade logout
Thank you for the insight. Best of luck to everyone. Best wishes, M On Fri, 24 Dec 2021, 12:48 Richard L King, <rlking@...> wrote:
|
Re: Install TWS or IB gateway on Ubuntu and ARM64 bit processor
My apologies for the confusion, Todd. As I said in my post, I only have an old 32bit Raspberry Pi 2 and was unable to make TWS/IBGW work on it. My next step would have been to grab a modern Pi 4, install a 64bit Debian distribution (instead of Raspbian) and try again with a 64bit JVM. It looked like 64bit ARM Java offerings were much more rich than 32bit ones. But you are correct, a 64bit JVM will not work on a 32bit OS. Having said that, I went back to the drawing board and did some experiments on the Pi2 with 32bit OS and and 32bit JVMs. I installed the 32bit Linux versions of TWS and IBGW 981.3g and got pretty far, but not all the way. Here some thoughts that may help you:
闯ü谤驳别苍 PS. Contact me directly if you want to work on this some more, since this the nitty gritty is probably too far out of scope for the group. |
Re: Forced upgrade logout
开云体育Actually that's been there since Gateway 975, so quite a long time now, and no, there's no way to switch it off. ? However it also has the alternative Auto-relogin mechanism introduced in TWS 974, so if you're not using IBC, you can just use that mechanism. Then you only have to login once a week and it will automatically restart the Gateway and log you back in again every day at the time you specify. ? If you ARE using IBC, you need to understand that IBC does not work with this auto-relogin (even though the setting for it is visible with the latest version of IBC). So you either have to just restart IBC every day, or stop using IBC and just use the Auto-relogin. Your choice will be influenced by how much you depend on IBC. ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of mark collins
Sent: 24 December 2021 11:25 To: [email protected] Subject: [TWS API] Forced upgrade logout ? Hi all, ? Following the forced upgrade, I ended up with gateway 10.12.2d. This brings with it the same time based logout behaviour that tws had. The point of using gateway is to avoid this kind of thing, so I'm guessing there's a setting somewhere to switch this off? ? Anyone know where it can be disabled? ? Best wishes (and merry Xmas) ? ? M |
Forced upgrade logout
Hi all, Following the forced upgrade, I ended up with gateway 10.12.2d. This brings with it the same time based logout behaviour that tws had. The point of using gateway is to avoid this kind of thing, so I'm guessing there's a setting somewhere to switch this off? Anyone know where it can be disabled? Best wishes (and merry Xmas) M |
Re: Working with the TWS Socket port without using IBs classes
开云体育Not sure what his problem is but I think you are doing an
excellent job 闯ü谤驳别苍, thank you for taking up the reins on this
on. We have all been handed a steaming pile of opportunity and the
only way we get this sorted out is by shared experiences and
POLITE discourse. ?That said I have some code I'd like the group to write, it's christmas and I feel like having a snooze. I'll send out the pseudocode later. Shall we say Dec 29th 2021 :-) have an excellent christmas and a safe new year chaps. Dent On 12/24/21 4:16 AM, 闯ü谤驳别苍 Reinold via
groups.io wrote:
|
Re: Working with the TWS Socket port without using IBs classes
We are absolutely here to help each other, and I think Nick did a great job giving you all the information, tools and hints you need to do what you have asked for. One of Nicks suggestions was
But apparently you did not do that. We are not here to do the work for you and the 6,000 members in this group can expect that you read the documentation, make an attempt to understand the architecture, follow the advice you are given, and "use the IB code as a reference" before you ask more, frankly, trivial questions. Let me know what you don't understand and I am happy to help you. 闯ü谤驳别苍 Thanks for the help Jurgen, we can close this forum guys, Jurgen descided we can find everything in the code!!? No need to help each other!! Great spirit for the time of the year, keep it up mate! Thanks for your awesome contributions here. You're such a godsent! ? |
Re: Working with the TWS Socket port without using IBs classes
YSS
Thanks for the help Jurgen, we can close this forum guys, Jurgen descided we can find everything in the code!!? No need to help each other!! Great spirit for the time of the year, keep it up mate! Thanks for your awesome contributions here. You're such a godsent!
|
Re: Forced upgrade before December 29
Likely depends on the API version, I've had issues like:
toggle quoted message
Show quoted text
File "/usr/local/lib/python3.9/dist-packages/ibapi/decoder.py", line 1343, in interpret |