CcyTicker¶
-
class
qf_lib.common.tickers.tickers.
CcyTicker
(ticker: str, security_type: qf_lib.common.enums.security_type.SecurityType = <SecurityType.CRYPTO: 'CRYPTO'>, point_value: int = 1)[source]¶ Bases:
qf_lib.common.tickers.tickers.Ticker
Representation of Cryptocurrency tickers.
- Parameters
ticker (str) – The name of the crypto currency. For example Bitcoin -> ticker: bitcoin
security_type (SecurityType) – denotes the type of the security, that the ticker is representing e.g. SecurityType.STOCK for a stock, SecurityType.FUTURE for a futures contract etc. By default equals SecurityType.CRYPTO.
point_value (int) – size of the contract as given by the ticker’s Data Provider. Used mostly by tickers of security_type FUTURE and by default equals 1.
Methods
from_string
(ticker_str, Sequence[str]], …)Example: CcyTicker.from_string(‘Bitcoin’).
-
classmethod
from_string
(ticker_str: Union[str, Sequence[str]], security_type: qf_lib.common.enums.security_type.SecurityType = <SecurityType.CRYPTO: 'CRYPTO'>, point_value: int = 1) → Union[qf_lib.common.tickers.tickers.CcyTicker, Sequence[qf_lib.common.tickers.tickers.CcyTicker]][source]¶ Example: CcyTicker.from_string(‘Bitcoin’).