Hello! I was wondering if there's any way to retrieve past order from the Broker on Algorithm init in local mode.
For instance:
I run an algorithm for a while that generate, let's say, 5 buy/sell orders. I stop QC to deploy another algorithm. I run QC again: can I get those 5 orders previously made in a list directly from the Broker and check them in Initialize/PostInitialize function?
Aaron Janeiro Stone
I think it might depend on the broker. For example, if you want your open orders with IBKR: https://www.quantconnect.com/lean/documentation/topic5015.html
alternatively ibkr would allow you to use: https://www.quantconnect.com/lean/documentation/topic5061.html for more info
Paolo Oranges
Hi Aaron,
I was looking for the filled/canceled orders, not the open ones. I'm more interested in having the past orders that has been already filled or canceled from the broker. Some API allows it (eg GDAX) but I don't see any implementation in QC
Derek Melchin
Hi Oranges,
This is not currently possible. Consider using the ObjectStore to save data between deployments.
Best,
Derek Melchin
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.
Paolo Oranges
Derek, thanks for the hint
I will tru that!
Paolo Oranges
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!