Skip to content

SubscriptionDataSource

QuantConnect.Data.SubscriptionDataSource

SubscriptionDataSource(source: str)
SubscriptionDataSource(
    source: str,
    transport_medium: SubscriptionTransportMedium,
)
SubscriptionDataSource(
    source: str,
    transport_medium: SubscriptionTransportMedium,
    format: FileFormat,
)
SubscriptionDataSource(
    source: str,
    transport_medium: SubscriptionTransportMedium,
    format: FileFormat,
    headers: List[KeyValuePair[str, str]],
)

Bases: Object, IEquatable[QuantConnect_Data_SubscriptionDataSource]

Represents the source location and transport medium for a subscription

Signature descriptions:

  • Initializes a new instance of the SubscriptionDataSource class.

  • Initializes a new instance of the SubscriptionDataSource class with SubscriptionTransportMedium.REST including the specified header values

Parameters:

Name Type Description Default
source str

The subscription's data source location

required
transport_medium Optional[SubscriptionTransportMedium]

The transport medium to be used to retrieve the subscription's data from the source

None
format Optional[FileFormat]

The format of the data within the source

None
headers Optional[List[KeyValuePair[str, str]]]

The headers to be used for this source

None

sort

sort: bool

Specifies whether the data source should be sorted. If False, data will be returned in the original order, else it will be ordered by time.

source

source: str

Identifies where to get the subscription's data from

format

format: FileFormat

Identifies the format of the data within the source

transport_medium

transport_medium: SubscriptionTransportMedium

Identifies the transport medium used to access the data, such as a local or remote file, or a polling rest API

headers

headers: Sequence[KeyValuePair[str, str]]

Gets the header values to be used in the web request.

equals

equals(obj: Any) -> bool
equals(other: SubscriptionDataSource) -> bool

Signature descriptions:

  • Determines whether the specified instance is equal to the current instance.

  • Indicates whether the current object is equal to another object of the same type.

Parameters:

Name Type Description Default
obj Optional[Any]

The object to compare with the current object.

None
other Optional[SubscriptionDataSource]

An object to compare with this object.

None

Returns:

Type Description
bool

Depends on the signature used. Case 1: [true if the specified object is equal to the current object; otherwise, false.]; Case 2: [true if the current object is equal to the other parameter; otherwise, false.]

__eq__

__eq__(right: SubscriptionDataSource) -> bool

Indicates whether the current object is equal to another object of the same type.

Parameters:

Name Type Description Default
right SubscriptionDataSource

The SubscriptionDataSource instance on the right of the operator

required

Returns:

Type Description
bool

True if the two instances are considered equal, false otherwise.

__ne__

__ne__(right: SubscriptionDataSource) -> bool

Indicates whether the current object is not equal to another object of the same type.

Parameters:

Name Type Description Default
right SubscriptionDataSource

The SubscriptionDataSource instance on the right of the operator

required

Returns:

Type Description
bool

True if the two instances are not considered equal, false otherwise.

get_hash_code

get_hash_code() -> int

Serves as a hash function for a particular type.

Returns:

Type Description
int

A hash code for the current System.Object.

to_string

to_string() -> str

Returns a string that represents the current object.

Returns:

Type Description
str

A string that represents the current object.