SecurityDatabaseKey
QuantConnect.Securities.SecurityDatabaseKey
SecurityDatabaseKey(
market: str, symbol: str, security_type: SecurityType
)
Bases: Object, IEquatable[QuantConnect_Securities_SecurityDatabaseKey]
Represents the key to a single entry in the MarketHoursDatabase or the SymbolPropertiesDatabase
Initializes a new instance of the SecurityDatabaseKey class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
str
|
The market |
required |
symbol
|
str
|
The symbol. specify null to apply to all symbols in market/security type |
required |
security_type
|
SecurityType
|
The security type |
required |
WILDCARD
WILDCARD: str = '[*]'
Represents that the specified symbol or market field will match all
market
market: str
The market. If null, ignore market filtering
symbol
symbol: str
The symbol. If null, ignore symbol filtering
equals
equals(obj: Any) -> bool
equals(other: SecurityDatabaseKey) -> bool
Signature descriptions:
-
Determines whether the specified object is equal to the current object.
-
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[SecurityDatabaseKey]
|
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: SecurityDatabaseKey) -> bool
Security Database Key == operator
Returns:
| Type | Description |
|---|---|
bool
|
True if they are the same. |
__ne__
__ne__(right: SecurityDatabaseKey) -> bool
Security Database Key != operator
Returns:
| Type | Description |
|---|---|
bool
|
True if they are not the same. |
create_common_key
create_common_key() -> SecurityDatabaseKey
Based on this entry will initializes the generic market and security type instance of the SecurityDatabaseKey class
get_hash_code
get_hash_code() -> int
Serves as the default hash function.
Returns:
| Type | Description |
|---|---|
int
|
A hash code for the current object. |
parse
parse(key: str) -> SecurityDatabaseKey
Parses the specified string as a SecurityDatabaseKey
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The string representation of the key |
required |
Returns:
| Type | Description |
|---|---|
SecurityDatabaseKey
|
A new SecurityDatabaseKey instance. |
to_string
to_string() -> str
Returns a string that represents the current object.
Returns:
| Type | Description |
|---|---|
str
|
A string that represents the current object. |