I would like to use the endpoints of IB's REST API (https://www.interactivebrokers.com/api/doc.html) inside of QC. In particular, I want to use their scanner endpoints. To use the REST API outside of QC you have to create a gateway connection and send API requests to a custom URL like https://localhost:5000/xxx. I assume that QC connects to the IB gateway, so maybe it is possible to send requests to some URL? Does anyone know how to do so? Also, is it possible to send GET AND POST requests (some endpoints require a POST request even though it is fetching data)?
If a connection to the REST API is not possible, is it possible to connect to IB's trader workstation (to do the same tasks)?
Alexandre Catarino
Hi Haakon Flaarønning ,
It's impossible to make any GET and POST requests from the algorithm since incoming and outgoing messages must pass our API (Download and Live Notifications) for security reasons.
Workaround: implement the scanner locally or in an independent server using other IB credentials that save the results to a file that can be fetched by the algorithm using the Download method.
Haakon
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!