Back

Restful api calls

Question: 
Wondering if QuantConnect can make customized restful api calls to a server?
I'm assuming it can since we can probably import an http client and build the request ourselves.
But are those calls able to be made or are they blocked?
Thanks in advance!

Update Backtest







0

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.


I had a similiar issue just a few days ago, still learning the platform. From what I know it is possible to use self.Download() method to request outside data. However, in debug environment that method seems to be passing requests through an API proxy and has some limits around number of requests which can be made in the backtester. From what I understand the same limit doesn't apply to live algos. Another way to do this is to use GetSource / Reader classes (this is described in the documentation. Also all requests made through typical python reguest classes seem to be rejected, so it seems self.Download seems like the best option.

0

Hi Oscar,

It is possible to make an API call and import external data, but the number of calls that can be made using Download in a backtest is capped at 100. However, there is no limit on live-trading. Information about importing custom data can be found here.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed