Lean  $LEAN_TAG$
QuantConnect.Api.ApiConnection Class Reference

API Connection and Hash Manager More...

Public Member Functions

 ApiConnection (int userId, string token)
 Create a new Api Connection Class. More...
 
bool TryRequest< T > (RestRequest request, out T result)
 Place a secure request and get back an object of type T. More...
 
async Task< Tuple< bool, T > > TryRequestAsync< T > (RestRequest request)
 Place a secure request and get back an object of type T. More...
 

Properties

RestClient Client [get, set]
 Authorized client to use for requests. More...
 
bool Connected [get]
 Return true if connected successfully. More...
 

Detailed Description

API Connection and Hash Manager

Definition at line 29 of file ApiConnection.cs.

Constructor & Destructor Documentation

◆ ApiConnection()

QuantConnect.Api.ApiConnection.ApiConnection ( int  userId,
string  token 
)

Create a new Api Connection Class.

Parameters
userIdUser Id number from QuantConnect.com account. Found at www.quantconnect.com/account
tokenAccess token for the QuantConnect account. Found at www.quantconnect.com/account

Definition at line 49 of file ApiConnection.cs.

Member Function Documentation

◆ TryRequest< T >()

bool QuantConnect.Api.ApiConnection.TryRequest< T > ( RestRequest  request,
out T  result 
)

Place a secure request and get back an object of type T.

Template Parameters
T
Parameters
request
resultResult object from the
Returns
T typed object response
Type Constraints
T :RestResponse 

Definition at line 80 of file ApiConnection.cs.

Here is the call graph for this function:

◆ TryRequestAsync< T >()

async Task<Tuple<bool, T> > QuantConnect.Api.ApiConnection.TryRequestAsync< T > ( RestRequest  request)

Place a secure request and get back an object of type T.

Template Parameters
T
Parameters
request
Returns
T typed object response
Type Constraints
T :RestResponse 

Definition at line 94 of file ApiConnection.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Property Documentation

◆ Client

RestClient QuantConnect.Api.ApiConnection.Client
getset

Authorized client to use for requests.

Definition at line 36 of file ApiConnection.cs.

◆ Connected

bool QuantConnect.Api.ApiConnection.Connected
get

Return true if connected successfully.

Definition at line 60 of file ApiConnection.cs.


The documentation for this class was generated from the following file: