QuantConnect API

Projects

Introduction

This page explains how to create and manage projects in the Research Environment with the QuantConnect API.

Prerequisites

Working knowledge of C#.

Working knowledge of Python.

Create Projects

To create a project, call the CreateProject method with the project name, the project programming language, and the organization name.

#load "../Initialize.csx"
#load "../QuantConnect.csx"
using QuantConnect;

var response = api.CreateProject(name: "Project", 
                                 language: Language.CSharp,
                                 organizationId: "<yourOrganizationName>");
response = api.CreateProject(name="Project", 
                             language=Language.Python,
                             organizationId="<your_organization_name>")

The Language enumeration has the following members:

The organizationId argument is optional. If you omit it, the project is added to your preferred organization.

The CreateProject method returns a ProjectResponse object, which have the following attributes:

Read Projects

To get the details of a project, call the ReadProject with the project ID.

var response = api.ReadProject(projectId);
response = api.ReadProject(project_id)

The ReadProject method returns a ProjectResponse object, which have the following attributes:

Note that the project response is a snapshot of the project at the current moment in time.

Compile Projects

To create a new compile job request for a project, call the CreateCompile method with the project ID.

var compile = api.CreateCompile(projectId);
compile = api.CreateCompile(project_id)

To read a compile packet job result, call the ReadCompile method with the project ID and compile ID.

var compileResults = api.ReadCompile(projectId, compile.CompileId);
compile_results = api.ReadCompile(project_id, compile.CompileId)

The CreateCompile and ReadCompile methods return a Compile object, which have the following attributes:

Delete Projects

To delete a project, call the DeleteProject method with the project ID.

var response = api.DeleteProject(projectId);
response = api.DeleteProject(project_id)

The DeleteProject method returns a RestResponse object, which have the following attributes:

List Projects

To get the details of all your projects, call the ListProjects method.

var response = api.ListProjects();
response = api.ListProjects()

The ListProjects method returns a ProjectResponse object, which have the following attributes:

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: