Skip to content

AccessTokenMetaDataResponse

QuantConnect.Brokerages.Authentication.AccessTokenMetaDataResponse

AccessTokenMetaDataResponse(
    access_token: str,
    token_type: TokenType,
    expires: Union[datetime, date],
)

Bases: RestResponse

Represents a response containing metadata about an access token issued by Lean.

Initializes a new instance of the AccessTokenMetaDataResponse class.

This codeEntityType is protected.

Parameters:

Name Type Description Default
access_token str

The access token string provided by the authentication service.

required
token_type TokenType

The type of the token (e.g., Bearer).

required
expires Union[datetime, date]

The expiration time of the access token (in UTC), with safety buffer applied.

required

access_token

access_token: str

Gets the access token provided by Lean.

token_type

token_type: TokenType

Gets the type of the token (e.g., "Bearer").

expiration

expiration: datetime

Gets the UTC expiration timestamp of the access token, with a 1-minute safety buffer applied.

success

success: bool

Indicate if the API request was successful.

errors

errors: List[str]

List of errors with the API call.

to_string

to_string() -> str

Returns the string representation of this object