Hi,
I have two issues with the API:
- I'm trying to access my deployment's logs but the return is empty.
- The ReadLiveAlgorithm function returns only the last ~25 minutes worth of a chart, since it (probably) defaults to the highest resolution. It should be possible to get a lower resolution and hence get more data.
using System;
using QuantConnect.Api;
namespace LeanApiTool
{
class Program
{
static void Main( string[] args )
{
// Create and initialise connection
var qc = new Api();
qc.Initialize( redacted, "redacted", "notused" );
// Check for successful connection
if ( !qc.Connected )
throw new Exception( "API connection unsuccessful!" );
// Read live algo
var liveResult = qc.ReadLiveAlgorithm( 2543382, "6ae060032eaa51b16a1ac8871f538c26" );
// Read logs
var logs = qc.ReadLiveLogs( 2543382, "6ae060032eaa51b16a1ac8871f538c26", DateTime.Parse( "14 Apr 2019" ), DateTime.Parse( "20 Apr 2019" ) );
}
}
}
There's definitely logs between these two dates - I have also tried to run that function without any date range - same empty result. The deploy ID and hash are correct as the ReadLiveAlgorithm returns a correct set of data.
Douglas Stridsberg
I had tested the deployment ID with and without "L-" at the start and could have sworn ReadLiveAlgorithm needed the deployment ID to be without L-. I see now that adding L- to the ID fixes ReadLiveLogs.
But ReadLiveAlgorithm still should retrieve more than the last 25 minutes of data.
Another note - ServerStatistics in the ReadLiveAlgorithm return gives my computer as the HostName and otherwise incorrect values - any ideas why?
Link Liang
Hi Douglas,
Thank you for creating a GitHub issue for this feature. Your support is greatly appreciated.
Douglas Stridsberg
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!