开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Any updated TWS API C++ library?


 

Hi all,
?
I am building a trading model in C++. TWS API is not easy to use so I am looking for a helpful library that abstracts away many low level details and ease the development process. Google suggested me this library which was used in this video too. BUT the repo has not been updated in the last 8-9 years. Are there any actively updated C++ library repo for TWS API?
Thank you in advance!


 

In my opinion, you are going to have to build it yourself. I was in the same boat when I started and chose to use C++. At first I tried putting it off and hoped to piggy back off someone else's repository, but ultimately it was a waste of time and I just accepted I needed to figure it out on my own and make my own shippable client repository with Cmake. There is a good amount of stuff on here about that. A lot of people helped me get my build going to use with linux. If you search by 'C++' and/or 'Cmake' you may find some helpful topics/threads. But it's going to be a tough, long road. I would advise starting on that just right away and cut your losses on trying to find something like this. Just my opinion, but it does come from experience.
?
Obviously, start with what you are hoping to accomplish. What parts of the API do you need, etc. Then at first only fill in the abstract virtual functions/callbacks for what you need, and build on top of it as your needs expand in your inherited EWrapper client main class. With inspiration from this board,? I made the client a smart pointer and any new strategies/repos/projects I want to run a strategy from, I start with my control center class as accepting that smart pointer in my constructor. I then have public functions from the smart pointer I can call that request things and I have getters/setters etc. for retrieving private members from my ib client. You know, the works. My client has a evolved a lot, but now it really has everything I figured a repo online would have that I could piggyback off of. The entire process has made me a much better developer and I learned so many new skills like bash development, Cmake, and learning that abstractions are not actually saving you in most instances. In reality, they are just adding more complexity to your projects by adding things you do not understand.
?
That's just my 2 cents, but what do I know. I'm just a guy on the internet. Good luck.