Messages
QuantConnect.Messages
Bases: Object
Provides user-facing message construction methods and static messages for the QuantConnect namespace
Extensions
Bases: Object
Provides user-facing messages for the QuantConnect.Extensions class and its consumers or related classes
error_adjusting_symbol_by_offset
error_adjusting_symbol_by_offset: str = (
"Adjusting a symbol by an offset is currently only supported for non canonical futures"
)
Returns a string message saying adjusting a symbol by an offset is currently only supported for non canonical futures
null_data_provider
null_data_provider: str = ...
Returns a string message saying the provided DataProvider instance is null
null_or_empty_source_to_convert_to_hex_string
null_or_empty_source_to_convert_to_hex_string: str = (
"Source cannot be null or empty."
)
Returns a string message saying the source cannot be null or empty
create_option_chain_requires_option_symbol
create_option_chain_requires_option_symbol: str = (
"CreateOptionChain requires an option symbol."
)
Returns a string message saying the CreateOptionChain method requires an option symbol
create_future_chain_requires_future_symbol
create_future_chain_requires_future_symbol: str = (
"CreateFutureChain requires a future symbol."
)
Returns a string message saying the CreateFutureChain method requires a future symbol
greatest_common_divisor_empty_list
greatest_common_divisor_empty_list: str = (
"The list of values cannot be empty"
)
Returns a string message saying the list of values cannot be empty
unknown_option_right
unknown_option_right(value: str) -> str
unknown_option_right(value: OptionRight) -> str
Returns a string message saying the given OptionRight was unexpected/unknown
unknown_option_style
unknown_option_style(value: str) -> str
unknown_option_style(value: OptionStyle) -> str
Returns a string message saying the given OptionStyle was unexpected/unknown
cannot_cast_non_finite_floating_point_value_to_decimal
cannot_cast_non_finite_floating_point_value_to_decimal(
input: float,
) -> str
Returns a string message saying it is impossible to cast the given non-finite floating-point value as a decimal
convert_to_dictionary_failed
convert_to_dictionary_failed(
source_type: str, target_type: str, reason: str
) -> str
Returns a string message saying the method ConvertToDictionary cannot be used to convert a given source type into another given target type. It also specifies the reason.
convert_to_symbol_enumerable_failed
convert_to_symbol_enumerable_failed(item: Any) -> str
Returns a string message saying the given argument type should Symbol or a list of Symbol. It also shows the given item as well as its Python type
data_type_missing_parameterless_constructor
data_type_missing_parameterless_constructor(
type: Type,
) -> str
Returns a string message saying the given data type is missing a parameterless constructor
download_data_failed
download_data_failed(url: str) -> str
Returns a string message saying the process of downloading data from the given url failed
failed_to_create_instance_of_type
failed_to_create_instance_of_type(type: Type) -> str
Returns a string message saying the process of creating an instance of the given type failed
no_default_option_style_for_security_type
no_default_option_style_for_security_type(
security_type: SecurityType,
) -> str
Returns a string message saying the given security type has no default OptionStyle, because it has no options available for it
object_from_python_is_not_ac_sharp_type
object_from_python_is_not_ac_sharp_type(
object_repr: str,
) -> str
Returns a string message saying the given object is not a C# type
runtime_error
runtime_error(algorithm: IAlgorithm, context: str) -> str
Returns a string message saying there was a RuntimeError at a given time in UTC. It also shows the given context
timeout_waiting_for_thread_to_stop_safely
timeout_waiting_for_thread_to_stop_safely(
thread_name: str,
) -> str
Returns a string message saying: Timeout waiting for the given thread to stop
type_is_not_base_data
type_is_not_base_data(type: Type) -> str
Returns a string message saying the given data type does not inherit the required BaseData methods and/or attributes
unable_to_convert_time_span_to_resolution
unable_to_convert_time_span_to_resolution(
time_span: timedelta,
) -> str
Returns a string message saying it was not able to exactly convert the given time span to resolution
unable_to_parse_unknown_security_type
unable_to_parse_unknown_security_type(value: str) -> str
Returns a string message saying it was attempted to parse the given unknown security type
unknown_data_mapping_mode
unknown_data_mapping_mode(value: str) -> str
Returns a string message saying the given DataMappingMode was unexpected/unknown
waiting_for_thread_to_stop_safely
waiting_for_thread_to_stop_safely(thread_name: str) -> str
Returns a string message saying: Waiting for the given thread to stop
zero_price_for_security
zero_price_for_security(
symbol: Union[Symbol, str, BaseContract],
) -> str
Returns a string message saying the security does not have an accurate price as it has not yet received a bar of data, as well as some recommendations
AlphaRuntimeStatistics
Bases: Object
Provides user-facing messages for the AlphaRuntimeStatistics class and its consumers or related classes
return_over_maximum_drawdown_key
return_over_maximum_drawdown_key: str = (
"Return Over Maximum Drawdown"
)
Returns a string message saying: Return Over Maximum Drawdown
portfolio_turnover_key
portfolio_turnover_key: str = 'Portfolio Turnover'
Returns a string message saying: Portfolio Turnover
total_insights_generated_key
total_insights_generated_key: str = (
"Total Insights Generated"
)
Returns a string message saying: Total Insights Generated
total_insights_closed_key
total_insights_closed_key: str = 'Total Insights Closed'
Returns a string message saying: Total Insights Closed
total_insights_analysis_completed_key
total_insights_analysis_completed_key: str = (
"Total Insights Analysis Completed"
)
Returns a string message saying: Total Insights Analysis Completed
long_insight_count_key
long_insight_count_key: str = 'Long Insight Count'
Returns a string message saying: Long Insight Count
short_insight_count_key
short_insight_count_key: str = 'Short Insight Count'
Returns a string message saying: Short Insight Count
long_short_ratio_key
long_short_ratio_key: str = 'Long/Short Ratio'
Returns a string message saying: Long/Short Ratio
Chart
Bases: Object
Provides user-facing messages for the QuantConnect.Chart class and its consumers or related classes
chart_series_already_exists
chart_series_already_exists: str = (
"Chart series name already exists"
)
Returns a string message saying Chart series name already exists
ChartPoint
Bases: Object
Provides user-facing messages for the QuantConnect.ChartPoint class and its consumers or related classes
to_string
to_string(instance: ChartPoint) -> str
Parses a given ChartPoint object into a string message
Candlestick
Bases: Object
Provides user-facing messages for the QuantConnect.Candlestick class and its consumers or related classes
to_string
to_string(instance: Candlestick) -> str
Parses a given Candlestick object into a string message
Currencies
Bases: Object
Provides user-facing messages for the QuantConnect.Currencies class and its consumers or related classes
failed_conversion_to_decimal
failed_conversion_to_decimal(value: str) -> str
Returns a string message saying the given value cannot be converted to a decimal number
ExtendedDictionary
Bases: Object
Provides user-facing messages for the QuantConnect.ExtendedDictionary{T} class and its consumers or related classes
clear_method_not_implemented
clear_method_not_implemented: str = (
"Types deriving from 'ExtendedDictionary' must implement the 'void Clear() method."
)
Returns a string message saying the types deriving from ExtendedDictionary must implement the void Clear() method
remove_method_not_implemented
remove_method_not_implemented: str = (
"Types deriving from 'ExtendedDictionary' must implement the 'void Remove(Symbol) method."
)
Returns a string message saying the types deriving from ExtendedDictionary must implement the void Remove(Symbol) method
indexer_by_symbol_not_implemented
indexer_by_symbol_not_implemented: str = (
"Types deriving from 'ExtendedDictionary' must implement the 'T this[Symbol] method."
)
Returns a string message saying the types deriving from ExtendedDictionary must implement the T this
ticker_not_found_in_symbol_cache
ticker_not_found_in_symbol_cache(ticker: str) -> str
Returns a string message saying that the given ticker was not found in the SymbolCache. It also gives a recommendation for solving this problem
Holding
Bases: Object
Provides user-facing messages for the QuantConnect.Holding class and its consumers or related classes
AlgorithmControl
Bases: Object
Provides user-facing messages for the QuantConnect.AlgorithmControl class and its consumers or related classes
chart_subscription
chart_subscription: str = 'Strategy Equity'
Returns a string message saying: Strategy Equity
Isolator
Bases: Object
Provides user-facing messages for the QuantConnect.Isolator class and its consumers or related classes
memory_usage_info
memory_usage_info(
memory_used: str,
last_sample: str,
memory_used_by_app: str,
current_time_step_elapsed: timedelta,
cpu_usage: int,
) -> str
Returns a string message with useful information about the memory usage, such us the memory used, the last sample the current memory used by the given app and the CPU usage
memory_usage_maxed_out
memory_usage_maxed_out(
memory_cap: str, last_sample: str
) -> str
Returns a string message saying: Execution Security Error: Memory Usage Maxed out, with the max memory capacity and a last sample of the usage
memory_usage_monitor_task_timed_out
memory_usage_monitor_task_timed_out(
timeout: timedelta,
) -> str
Returns a string message saying: Execution Security Error: Operation timed out, with the maximum amount of minutes allowed
memory_usage_over_80_percent
memory_usage_over_80_percent(last_sample: float) -> str
Returns a string message saying: Execution Security Error: Memory usage over 80% capacity, and the last sample taken
Market
Bases: Object
Provides user-facing messages for the QuantConnect.Market class and its consumers or related classes
invalid_market_identifier
invalid_market_identifier(
max_market_identifier: int,
) -> str
Returns a string message saying the market identifier is limited to positive values less than the given maximum market identifier
tried_to_add_existing_market_identifier
tried_to_add_existing_market_identifier(
market: str, existing_market: str
) -> str
Returns a string message saying it was attempted to add a market identifier that is already in use
tried_to_add_existing_market_with_different_identifier
tried_to_add_existing_market_with_different_identifier(
market: str,
) -> str
Returns a string message saying it was attempted to add an already added market with a different identifier
OS
Bases: Object
Provides user-facing messages for the QuantConnect.OS class and its consumers or related classes
cpu_usage_key
cpu_usage_key: str = 'CPU Usage'
CPU Usage string
used_ram_key
used_ram_key: str = 'Used RAM (MB)'
Used RAM (MB) string
total_ram_key
total_ram_key: str = 'Total RAM (MB)'
Total RAM (MB) string
hostname_key
hostname_key: str = 'Hostname'
Hostname string
lean_version_key
lean_version_key: str = 'LEAN Version'
LEAN Version string
Parse
Bases: Object
Provides user-facing messages for the QuantConnect.Parse class and its consumers or related classes
value_is_not_parseable
value_is_not_parseable(
input: str, target_type: Type
) -> str
Returns a string message saying the provided input was not parseable as the given target type
SecurityIdentifier
Bases: Object
Provides user-facing messages for the QuantConnect.SecurityIdentifier class and its consumers or related classes
no_underlying_for_identifier
no_underlying_for_identifier: str = (
"No underlying specified for this identifier. Check that HasUnderlying is true before accessing the Underlying property."
)
Returns a string message saying no underlying was specified for certain identifier
date_not_supported_by_security_type
date_not_supported_by_security_type: str = (
"Date is only defined for SecurityType.Equity, SecurityType.Option, SecurityType.Future, SecurityType.FutureOption, SecurityType.IndexOption, and SecurityType.Base"
)
Returns a string message saying Date is only defined for SecurityType.Equity, SecurityType.Option, SecurityType.Future, SecurityType.FutureOption, SecurityType.IndexOption, and SecurityType.Base
strike_price_not_supported_by_security_type
strike_price_not_supported_by_security_type: str = (
"StrikePrice is only defined for SecurityType.Option, SecurityType.FutureOption, and SecurityType.IndexOption"
)
Returns a string message saying StrikePrice is only defined for SecurityType.Option, SecurityType.FutureOption, and SecurityType.IndexOption
option_right_not_supported_by_security_type
option_right_not_supported_by_security_type: str = (
"OptionRight is only defined for SecurityType.Option, SecurityType.FutureOption, and SecurityType.IndexOption"
)
Returns a string message saying OptionRight is only defined for SecurityType.Option, SecurityType.FutureOption, and SecurityType.IndexOption
option_style_not_supported_by_security_type
option_style_not_supported_by_security_type: str = (
"OptionStyle is only defined for SecurityType.Option, SecurityType.FutureOption, and SecurityType.IndexOption"
)
Returns a string message saying OptionStyle is only defined for SecurityType.Option, SecurityType.FutureOption, and SecurityType.IndexOption
null_symbol
null_symbol: str = (
"SecurityIdentifier requires a non-null string 'symbol'"
)
Returns a string message saying SecurityIdentifier requires a non-null string 'symbol'
symbol_with_invalid_characters
symbol_with_invalid_characters: str = (
"Symbol must not contain the characters '|' or ' '."
)
Returns a string message saying Symbol must not contain the characters '|' or ' '
properties_do_not_match_any_security_type
properties_do_not_match_any_security_type: str = ...
Returns a string message saying the provided properties do not match with a valid SecurityType
string_is_not_splittable
string_is_not_splittable: str = (
"The string must be splittable on space into two parts."
)
Returns a string message saying the string must be splittable on space into two parts
unexpected_type_to_compare_to
unexpected_type_to_compare_to: str = ...
Returns a string message saying object must be of type SecurityIdentifier
error_parsing_security_identifier
error_parsing_security_identifier(
value: str, exception: Exception
) -> str
Returns a string message saying there was an error parsing SecurityIdentifier. It also says the given error and exception
invalid_option_right
invalid_option_right(parameter_name: str) -> str
Returns a string message saying the given parameter must be either 0 or 1
invalid_security_type
invalid_security_type(parameter_name: str) -> str
Returns a string message saying the given parameter must be between 0 and 99
invalid_strike_price
invalid_strike_price(strike_price: float) -> str
Returns a string message saying the specified strike price's precision is too high
market_not_found
market_not_found(market: str) -> str
Returns a string message saying the given market could not be found in the markets lookup
StringExtensions
Bases: Object
Provides user-facing messages for the QuantConnect.StringExtensions class and its consumers or related classes
convert_invariant_cannot_convert_to
convert_invariant_cannot_convert_to(
target_type_code: TypeCode,
) -> str
Returns a string message saying StringExtensinos.ConvertInvariant does not support converting to the given TypeCode
Symbol
Bases: Object
Provides user-facing messages for the QuantConnect.Symbol class and its consumers or related classes
insufficient_information_to_create_future_option_symbol
insufficient_information_to_create_future_option_symbol: (
str
) = "Cannot create future option Symbol using this method (insufficient information). Use `CreateOption(Symbol, ...)` instead."
Returns a string message saying there is insufficient information for creating certain future option symbol
canonical_not_defined
canonical_not_defined: str = (
"Canonical is only defined for SecurityType.Option, SecurityType.Future, SecurityType.FutureOption"
)
Returns a string message saying Canonical is only defined for SecurityType.Option, SecurityType.Future, SecurityType.FutureOption
unexpected_object_type_to_compare_to
unexpected_object_type_to_compare_to: str = (
"Object must be of type Symbol or string."
)
Returns a string message saying certain object must be of type Symbol or string
no_option_type_for_underlying
no_option_type_for_underlying(
security_type: SecurityType,
) -> str
Returns a string message saying no option type exists for the given underlying SecurityType
no_underlying_for_option
no_underlying_for_option(
security_type: SecurityType,
) -> str
Returns a string message saying no underlying type exists for the given option SecurityType
security_type_cannot_be_mapped
security_type_cannot_be_mapped(
security_type: SecurityType,
) -> str
Returns a string message saying the given security can not be mapped
security_type_not_implemented_yet
security_type_not_implemented_yet(
security_type: SecurityType,
) -> str
Returns a string message saying the given security type has not been implemented yet
underlying_sid_does_not_match
underlying_sid_does_not_match(
sid: SecurityIdentifier,
underlying: Union[Symbol, str, BaseContract],
) -> str
SymbolCache
Bases: Object
Provides user-facing messages for the QuantConnect.SymbolCache class and its consumers or related classes
multiple_matching_tickers_located
multiple_matching_tickers_located(
tickers: List[str],
) -> str
Returns a string message saying mutiple potentially matching tickers were localized
unable_to_locate_ticker
unable_to_locate_ticker(ticker: str) -> str
Returns a string message saying the given ticker could not be localized
SymbolRepresentation
Bases: Object
Provides user-facing messages for the QuantConnect.SymbolRepresentation class and its consumers or related classes
failed_to_get_market_for_ticker_and_underlying
failed_to_get_market_for_ticker_and_underlying(
ticker: str, underlying: str
) -> str
Returns a string message saying SymbolRepresentation failed to get market for the given ticker and underlying
invalid_osi_ticker_format
invalid_osi_ticker_format(ticker: str) -> str
Returns a string message saying the given ticker is not in the expected OSI format
no_market_found
no_market_found(ticker: str) -> str
Returns a string message saying no market was found for the given ticker
security_type_not_implemented
security_type_not_implemented(
security_type: SecurityType,
) -> str
Returns a string message saying the given security type is not implemented
unexpected_security_type_for_method
unexpected_security_type_for_method(
method_name: str, security_type: SecurityType
) -> str
Returns a string message saying an unexpected security type was received by the given method name
SymbolValueJsonConverter
Bases: Object
Provides user-facing messages for the QuantConnect.SymbolValueJsonConverter class and its consumers or related classes
converter_is_write_only
converter_is_write_only: str = (
"The SymbolValueJsonConverter is write-only."
)
String message saying converter is write only
converter_is_intended_to_be_directly_decorated_in_member
converter_is_intended_to_be_directly_decorated_in_member: (
str
) = "The SymbolValueJsonConverter is intended to be decorated on the appropriate member directly."
String message saying converter is intended to be directly decorated in member
Time
Bases: Object
Provides user-facing messages for the QuantConnect.Time class and its consumers or related classes
invalid_bar_size
invalid_bar_size: str = (
"barSize must be greater than TimeSpan.Zero"
)
Invalid Bar Size string message
security_count
security_count(count: int) -> str
Returns a string message containing the number of securities
TradingCalendar
Bases: Object
Provides user-facing messages for the QuantConnect.TradingCalendar class and its consumers or related classes
invalid_total_days
invalid_total_days(total_days: int) -> str
Returns a string message for invalid total days
PythonCommon
Bases: Object
Provides user-facing common messages for the Python namespace classes
MarginCallModelPythonWrapper
Bases: Object
Provides user-facing common messages for the Python.MarginCallModelPythonWrapper namespace classes
get_margin_call_orders_must_return_tuple
get_margin_call_orders_must_return_tuple: str = (
"Must return a tuple, where the first item is a list and the second a boolean"
)
String message saying: Must return a tuple, where the first item is a list and the second a boolean
PandasConverter
Bases: Object
Provides user-facing common messages for the Python.PandasConverter namespace classes
pandas_module_not_imported
pandas_module_not_imported: str = (
"pandas module was not imported."
)
String message saying: Pandas module was not imported
PandasData
Bases: Object
Provides user-facing common messages for the Python.PandasData namespace classes
PythonInitializer
Bases: Object
Provides user-facing common messages for the Python.PythonInitializer namespace classes
start
start: str = 'start'
String message saying: start
ended
ended: str = 'ended'
String message saying: ended
PythonWrapper
Bases: Object
Provides user-facing common messages for the Python.PythonWrapper namespace classes
expected_interface_type_parameter
expected_interface_type_parameter: str = (
"expected an interface type parameter."
)
String message saying: expected and interface type parameter
BasePythonWrapper
Bases: Object
Provides user-facing common messages for the Python.BasePythonWrapper{TInterface} class
VolumeShareSlippageModel
Bases: Object
Provides user-facing messages for the Orders.Slippage.VolumeShareSlippageModel class and its consumers or related classes
invalid_market_data_type
invalid_market_data_type(data: BaseData) -> str
Returns a message for an invalid market data type in Volume Share Slippage Model
negative_or_zero_bar_volume
negative_or_zero_bar_volume(
bar_volume: float, slippage_percent: float
) -> str
Returns a message for a negative or zero bar volume in Volume Share Slippage Model
volume_not_reported_for_market_data_type
volume_not_reported_for_market_data_type(
security_type: SecurityType,
) -> str
Returns a message for a volume not reported for market data type in Volume Share Slippage Model
IndicatorDataPoint
Bases: Object
Provides user-facing messages for the Indicators.IndicatorDataPoint class and its consumers or related classes
invalid_object_type_to_compare_to
invalid_object_type_to_compare_to(type: Type) -> str
Returns a string message saying the given type is invalid for certain object
to_string
to_string(instance: IndicatorDataPoint) -> str
Parses a IndicatorDataPoint instance into a string message containing basic information about it
unsupported_method
unsupported_method(method_name: str) -> str
Returns a string message saying the given method cannot be called on this type
RollingWindow
Bases: Object
Provides user-facing messages for the Indicators.RollingWindow{T} class and its consumers or related classes
no_items_removed_yet
no_items_removed_yet: str = (
"No items have been removed yet!"
)
String message saying no items have been removed yet from the rolling window
index_out_of_size_range
index_out_of_size_range: str = (
"Index must be a non-negative integer"
)
String message saying the index must be a non-negative integer
invalid_size
invalid_size(minimum_size: int) -> str
String message saying the rolling windows must have size of at least 1
DllNotFoundPythonExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.DllNotFoundPythonExceptionInterpreter class and its consumers or related classes
dynamic_link_library_not_found
dynamic_link_library_not_found(
dll_name: str, platform: str
) -> str
Returns a string message saying the given dynamic-link library could not be found
InvalidTokenPythonExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.InvalidTokenPythonExceptionInterpreter class and its consumers or related classes
invalid_token_expected_substring
invalid_token_expected_substring: str = 'invalid token'
String message saying: invalid token
not_permitted_expected_substring
not_permitted_expected_substring: str = "are not permitted;"
String message saying: are not permitted
interpret_exception
interpret_exception(exception: Any) -> str
Returns a string message saying: Tring to include an invalid token/character in any statement throws s SyntaxError exception. It also contains an advice to prevent that exception
KeyErrorPythonExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.KeyErrorPythonExceptionInterpreter class and its consumers or related classes
key_not_found_in_collection
key_not_found_in_collection(key: str) -> str
Returns a string message saying the given key does not exists in the collection and the exception that is thrown in this case. It also advises the user on how to prevent this exception
NoMethodMatchPythonExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.NoMethodMatchPythonExceptionInterpreter class and its consumers or related classes
no_method_match_expected_substring
no_method_match_expected_substring: str = 'No method match'
String message saying: No method match
attempted_to_access_method_that_does_not_exist
attempted_to_access_method_that_does_not_exist(
method_name: str,
) -> str
Returns a string message saying the given method does not exists. It also contains the exception thrown is this case and an advice on how to prevent it
ScheduledEventExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.ScheduledEventExceptionInterpreter class and its consumers or related classes
scheduled_event_name
scheduled_event_name(event_name: str) -> str
Returns a string message with the given event name
StackExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.StackExceptionInterpreter class and its consumers or related classes
loaded_exception_interpreter
loaded_exception_interpreter(
interpreter: IExceptionInterpreter,
) -> str
Returns a message for a Loaded Exception Interpreter
UnsupportedOperandPythonExceptionInterpreter
Bases: Object
Provides user-facing messages for the Exceptions.UnsupportedOperandPythonExceptionInterpreter class and its consumers or related classes
unsupported_operand_type_expected_substring
unsupported_operand_type_expected_substring: str = (
"unsupported operand type"
)
Unsupported Operand Type Expected substring
invalid_object_types_for_operation
invalid_object_types_for_operation(types: str) -> str
Returns a message for invalid object types for operation
InsightManager
Bases: Object
Provides user-facing messages for the Algorithm.Framework.Alphas.Analysis.InsightManager class and its consumers or related classes
invalid_extra_analysis_period_ratio
invalid_extra_analysis_period_ratio: str = (
"extraAnalysisPeriodRatio must be greater than or equal to zero."
)
String message saying extraAnalysisPeriodRatio must be greater than or equal to zero
zero_initial_price_value
zero_initial_price_value(
frontier_time_utc: Union[datetime, date],
insight: Insight,
) -> str
Returns a string message warning the user of an insight with zero initial price
ReadOnlySecurityValuesCollection
Bases: Object
Provides user-facing messages for the ReadOnlySecurityValuesCollection class and its consumers or related classes
security_values_for_symbol_not_found
security_values_for_symbol_not_found(
symbol: Union[Symbol, str, BaseContract],
) -> str
Returns a string message saying no SecurityValues were found for the given symbol
OptimizationParameterJsonConverter
Bases: Object
Provides user-facing messages for the Optimizer.Parameters.OptimizationParameterJsonConverter class and its consumers or related classes
optimization_parameter_not_specified
optimization_parameter_not_specified: str = (
"Optimization parameter name is not specified."
)
String message saying optimization parameter name is not specified
optimization_parameter_not_supported
optimization_parameter_not_supported: str = (
"Optimization parameter is not currently supported."
)
String message saying optimization parameter is not currently supported
OptimizationStepParameter
Bases: Object
Provides user-facing messages for the Optimizer.Parameters.OptimizationStepParameter class and its consumers or related classes
step_less_than_min_step
step_less_than_min_step: str = ...
String message saying the step should be great or equal than minStep
invalid_step_range
invalid_step_range(min: float, max: float) -> str
Returns a string message saying the step range is invalid
non_positive_step_value
non_positive_step_value(
step_var_name: str, value: float
) -> str
Returns a string message saying the step should be positive value
DefaultBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.DefaultBrokerageModel class and its consumers or related classes
unsupported_market_on_open_orders_for_futures_and_future_options
unsupported_market_on_open_orders_for_futures_and_future_options: (
str
) = "MarketOnOpen orders are not supported for futures and future options."
String message saying: MarketOnOpen orders are not supported for futures and future options
no_data_for_symbol
no_data_for_symbol: str = (
"There is no data for this symbol yet, please check the security.HasData flag to ensure there is at least one data point."
)
String message saying: There is no data for this symbol yet
order_update_not_supported
order_update_not_supported: str = (
"Brokerage does not support update. You must cancel and re-create instead."
)
String message saying: Brokerage does not support update. You must cancel and re-create instead
invalid_order_quantity
invalid_order_quantity(
security: Security, quantity: float
) -> str
Returns a string message saying the quantity given was invalid for the given security
invalid_order_size
invalid_order_size(
security: Security, quantity: float, price: float
) -> str
Returns a string message saying the given order size (quantity * price) was invalid for the given security
invalid_security_type_for_leverage
invalid_security_type_for_leverage(
security: Security,
) -> str
Returns a string message saying the type of the given security is invalid
invalid_security_type_to_get_fill_model
invalid_security_type_to_get_fill_model(
brokerage_model: IBrokerageModel, security: Security
) -> str
Returns a string message saying the type of the given security is invalid for the given brokerage GetFillModel() method
unsupported_cross_zero_by_order_type
unsupported_cross_zero_by_order_type(
brokerage_model: IBrokerageModel, order_type: OrderType
) -> str
Returns a message indicating that the specified order type is not supported for orders that cross the zero holdings threshold.
unsupported_cross_zero_order_update
unsupported_cross_zero_order_update(
brokerage_model: IBrokerageModel,
) -> str
Returns a string message saying the given brokerage does not support updating the quantity of Cross Zero orders
unsupported_market_on_open_order_time
unsupported_market_on_open_order_time(
window_start: TimeOnly, window_end: TimeOnly
) -> str
Builds a descriptive error message when a OrderType.MARKET_ON_OPEN order is submitted outside the valid submission window.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window_start
|
TimeOnly
|
The start of the valid submission window (typically evening of the prior day). |
required |
window_end
|
TimeOnly
|
The end of the valid submission window (typically morning of the next day). |
required |
Returns:
| Type | Description |
|---|---|
str
|
A formatted string describing why the order is not valid at the current time, including the allowed submission window and suggested fixes. |
unsupported_order_type
unsupported_order_type(
brokerage_model: IBrokerageModel,
order: Order,
supported_order_types: List[OrderType],
) -> str
Returns a string message saying the type of the given order is unsupported by the given brokerage model. It also mentions the supported order types
unsupported_security_type
unsupported_security_type(
brokerage_model: IBrokerageModel, security: Security
) -> str
Retunrns a string message saying the type of the given security is not supported by the given brokerage
unsupported_time_in_force
unsupported_time_in_force(
brokerage_model: IBrokerageModel, order: Order
) -> str
Returns a string message saying the Time In Force of the given order is unsupported by the given brokerage model
unsupported_update_quantity_order
unsupported_update_quantity_order(
brokerage_model: IBrokerageModel, order_type: OrderType
) -> str
Returns a message indicating that the specified order type cannot be updated quantity using the given brokerage model.
AlpacaBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.AlpacaBrokerageModel class and its consumers or related classes
trading_outside_regular_hours_not_supported
trading_outside_regular_hours_not_supported(
brokerage_model: IBrokerageModel,
order_type: OrderType,
time_in_force: TimeInForce,
) -> str
Returns a message indicating that the specified order type is not supported for trading outside regular hours by the given brokerage model.
AlphaStreamsBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.AlphaStreamsBrokerageModel class and its consumers or related classes
unsupported_account_type
unsupported_account_type: str = (
"The Alpha Streams brokerage does not currently support Cash trading."
)
String message saying: The Alpha Streams brokerage does not currently support Cash trading
AxosBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.AxosClearingBrokerageModel class and its consumers or related classes
non_integer_order_quantity
non_integer_order_quantity(order: Order) -> str
Returns a string message saying the order quantity must be Integer. It also contains the quantity of the given order
BinanceBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.BinanceBrokerageModel class and its consumers or related classes
unsupported_order_type_for_security_type
Returns a string message saying the type of the given order is unsupported for the symbol of the given security
unsupported_order_type_with_link_to_supported_types
unsupported_order_type_with_link_to_supported_types(
base_api_endpoint: str, order: Order, security: Security
) -> str
Returns a string message saying the type of the given order is unsupported for the symbol of the given security. The message also contains a link to the supported order types in Binance
BinanceUSBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.BinanceUSBrokerageModel class and its consumers or related classes
unsupported_account_type
unsupported_account_type: str = (
"The Binance.US brokerage does not currently support Margin trading."
)
String message saying: The Binance.US brokerage does not currently support Margin trading
BrokerageMessageEvent
Bases: Object
Provides user-facing messages for the Brokerages.BrokerageMessageEvent class and its consumers or related classes
disconnect_code
disconnect_code: str = 'Disconnect'
String message saying: Disconnect
reconnect_code
reconnect_code: str = 'Reconnect'
String message saying: Reconnect
to_string
to_string(message_event: BrokerageMessageEvent) -> str
Parses a given BrokerageMessageEvent object into a string containing basic information about it
DefaultBrokerageMessageHandler
Bases: Object
Provides user-facing messages for the Brokerages.DefaultBrokerageMessageHandler class and its consumers or related classes
brokerage_error_context
brokerage_error_context: str = 'Brokerage Error'
String message saying: Brokerage Error
disconnected
disconnected: str = (
"DefaultBrokerageMessageHandler.Handle(): Disconnected."
)
String message saying: DefaultBrokerageMessageHandler.Handle(): Disconnected
reconnected
reconnected: str = (
"DefaultBrokerageMessageHandler.Handle(): Reconnected."
)
String message saying: DefaultBrookerageMessageHandler.Handle(): Reconnected
disconnected_when_exchanges_are_closed
disconnected_when_exchanges_are_closed: str = (
"DefaultBrokerageMessageHandler.Handle(): Disconnect when exchanges are closed, checking back before exchange open."
)
String message saying: DefaultBrokerageMessageHandler.Handle(): Disconnect when exchanges are closed, checking back before exchange open
still_disconnected
still_disconnected: str = (
"DefaultBrokerageMessageHandler.Handle(): Still disconnected, goodbye."
)
String message saying: DefaultBrokerageMessageHandler.Handle(): Still disconnected, goodbye
brokerage_disconnected_shut_down_context
brokerage_disconnected_shut_down_context: str = (
"Brokerage Disconnect"
)
String message saying: Brokerage Disconnect
brokerage_info
brokerage_info(message_event: BrokerageMessageEvent) -> str
Returns a string message with basic information about the given message event
brokerage_warning
brokerage_warning(
message_event: BrokerageMessageEvent,
) -> str
Returns a string message warning from the given message event
disconnected_when_exchanges_are_open
disconnected_when_exchanges_are_open(
reconnection_timeout: timedelta,
) -> str
Returns a string message saying the brokerage is disconnected when exchanges are open and that it's trying to reconnect for the given reconnection timeout minutes
time_until_next_market_open
time_until_next_market_open(
time_until_next_market_open: timedelta,
) -> str
Returns a string message with the time until the next market open
ExanteBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.ExanteBrokerageModel class and its consumers or related classes
null_order
null_order: str = 'Order is null.'
String message saying: Order is null
price_not_set
price_not_set: str = 'Price is not set.'
String message saying: Price is not set
FTXBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.FTXBrokerageModel class and its consumers or related classes
trigger_price_too_high
trigger_price_too_high: str = (
"Trigger price too high: must be below current market price."
)
String message saying: Trigger price too high, must be below current market price
trigger_price_too_low
trigger_price_too_low: str = (
"Trigger price too low: must be above current market price."
)
String message saying: Trigger price too low, must be above current market price
FxcmBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.FxcmBrokerageModel class and its consumers or related classes
invalid_order_price
invalid_order_price: str = (
"Limit Buy orders and Stop Sell orders must be below market, Limit Sell orders and Stop Buy orders must be above market."
)
String message saying: Limit Buy orders and Stop Sell orders must be below market, Limit Sell orders and Stop Buy orders must be above market
invalid_order_quantity_for_lot_size
invalid_order_quantity_for_lot_size(
security: Security,
) -> str
Returns a string message saying the order quantity must be a multiple of LotSize. It also contains the security's Lot Size
price_out_of_range
price_out_of_range(
order_type: OrderType,
order_direction: OrderDirection,
order_price: float,
current_price: float,
) -> str
Returns a string message saying the order price is too far from the current market price
CoinbaseBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.CoinbaseBrokerageModel class and its consumers or related classes
unsupported_account_type
unsupported_account_type: str = (
"The Coinbase brokerage does not currently support Margin trading."
)
String message saying: The Coinbase brokerage does not currently support Margin trading
stop_market_orders_no_longer_supported
stop_market_orders_no_longer_supported(
stop_market_order_support_end_date: Union[
datetime, date
],
) -> str
Returns a string message saying the Stop Market orders are no longer supported since the given end date
InteractiveBrokersFixModel
Bases: Object
Provides user-facing messages for the Brokerages.InteractiveBrokersFixModel class and its consumers or related classes
unsupported_combo_orders_for_future_options
unsupported_combo_orders_for_future_options(
brokerage_model: InteractiveBrokersFixModel,
order: Order,
) -> str
Returns a string message saying the given brokerage model does not support order exercises for index and cash-settled options
InteractiveBrokersBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.InteractiveBrokersBrokerageModel class and its consumers or related classes
invalid_forex_order_size
invalid_forex_order_size(
min: float, max: float, currency: str
) -> str
Returns a string message containing the minimum and maximum limits for the allowable order size as well as the currency
unsupported_exercise_for_index_and_cash_settled_options
unsupported_exercise_for_index_and_cash_settled_options(
brokerage_model: InteractiveBrokersBrokerageModel,
order: Order,
) -> str
Returns a string message saying the given brokerage model does not support order exercises for index and cash-settled options
TradierBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.TradierBrokerageModel class and its consumers or related classes
unsupported_security_type
unsupported_security_type: str = (
"This model only supports equities and options."
)
Unsupported Security Type string message
unsupported_time_in_force_type
unsupported_time_in_force_type: str = ...
Unsupported Time In Force Type string message
extended_market_hours_trading_not_supported
extended_market_hours_trading_not_supported: str = (
"Tradier does not support extended market hours trading. Your order will be processed at market open."
)
Extended Market Hours Trading Not Supported string message
order_quantity_update_not_supported
order_quantity_update_not_supported: str = (
"Tradier does not support updating order quantities."
)
Order Quantity Update Not Supported string message
open_orders_cancel_on_reverse_split_symbols
open_orders_cancel_on_reverse_split_symbols: str = (
"Tradier Brokerage cancels open orders on reverse split symbols"
)
Open Orders Cancel On Reverse Split Symbols string message
short_order_is_gtc
short_order_is_gtc: str = (
"You cannot place short stock orders with GTC, only day orders are allowed"
)
Short Order Is GTC string message
sell_short_order_last_price_below_5
sell_short_order_last_price_below_5: str = (
"Sell Short order cannot be placed for stock priced below $5"
)
Sell Short Order Last Price Below 5 string message
incorrect_order_quantity
incorrect_order_quantity: str = (
"Quantity should be between 1 and 10,000,000"
)
Incorrect Order Quantity string message
extended_market_hours_trading_not_supported_outside_extended_session
extended_market_hours_trading_not_supported_outside_extended_session(
pre_market_segment: MarketHoursSegment,
post_market_segment: MarketHoursSegment,
) -> str
Extended Market Hours Trading Not Supported Outside Extended Session string message
TradingTechnologiesBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.TradingTechnologiesBrokerageModel class and its consumers or related classes
invalid_stop_market_order_price
invalid_stop_market_order_price: str = (
"StopMarket Sell orders must be below market, StopMarket Buy orders must be above market."
)
Invalid Stop Market Order Price string message
invalid_stop_limit_order_price
invalid_stop_limit_order_price: str = (
"StopLimit Sell orders must be below market, StopLimit Buy orders must be above market."
)
Invalid Stop Limit Order Price string message
invalid_stop_limit_order_limit_price
invalid_stop_limit_order_limit_price: str = (
"StopLimit Buy limit price must be greater than or equal to stop price, StopLimit Sell limit price must be smaller than or equal to stop price."
)
Invalid Stop Limit Order Limit Price string message
WolverineBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.WolverineBrokerageModel class and its consumers or related classes
unsupported_order_type
unsupported_order_type(order: Order) -> str
Returns a message for an unsupported order type in Wolverine Brokerage Model
RBIBrokerageModel
Bases: Object
Provides user-facing messages for the Brokerages.RBIBrokerageModel class and its consumers or related classes
OptimizerObjectivesCommon
Bases: Object
Provides user-facing common messages for the Optimizer.Objectives namespace classes
null_or_empty_backtest_result
null_or_empty_backtest_result: str = (
"Backtest result can not be null or empty."
)
String message saying the backtest result can not be null or empty
Constraint
Bases: Object
Provides user-facing messages for the Optimizer.Objectives.Constraint class and its consumers or related classes
constraint_target_value_not_specified
constraint_target_value_not_specified: str = (
"Constraint target value is not specified"
)
String message saying the constraint target value is not specified
ExtremumJsonConverter
Bases: Object
Provides user-facing messages for the Optimizer.Objectives.ExtremumJsonConverter class and its consumers or related classes
unrecognized_target_direction
unrecognized_target_direction: str = (
"Could not recognize target direction"
)
String message saying it could not recognize target direction
Objective
Bases: Object
Provides user-facing messages for the Optimizer.Objectives.Objective class and its consumers or related classes
null_or_empty_objective
null_or_empty_objective: str = (
"Objective can not be null or empty"
)
Null or empty Objective string message
Target
Bases: Object
Provides user-facing messages for the Optimizer.Objectives.Target class and its consumers or related classes
NotificationEmail
Bases: Object
Provides user-facing messages for the Notifications.NotificationEmail class and its consumers or related classes
invalid_email_address
invalid_email_address(email: str) -> str
Returns a string message saying the given email is invalid
NotificationFtp
Bases: Object
Provides user-facing messages for the Notifications.NotificationFtp class and its consumers or related classes
missing_ssh_key
missing_ssh_key: str = (
"FTP SSH key missing for SFTP notification."
)
String message saying the SSH key is missing
missing_password
missing_password: str = (
"FTP password is missing for unsecure FTP notification."
)
String message saying the password is missing
NotificationJsonConverter
Bases: Object
Provides user-facing messages for the Notifications.NotificationJsonConverter class and its consumers or related classes
write_not_implemented
write_not_implemented: str = (
"Not implemented, should not be called"
)
String message saying the write method has not been implemented and should not be called
unexpected_json_object
unexpected_json_object(j_object: Any) -> str
String message saying the given object is unexpected
FuncBenchmark
Bases: Object
Provides user-facing messages for the Benchmarks.FuncBenchmark class and its consumers or related classes
unable_to_convert_python_function_to_benchmark_function
unable_to_convert_python_function_to_benchmark_function: (
str
) = "Unable to convert Python function to benchmark function, please ensure the function supports Datetime input and decimal output"
String message saying it was impossible to convert the Python function to a benchmark function
BaseCommand
Bases: Object
Provides user-facing messages for the Commands.BaseCommand class and its consumers or related classes
missing_values_to_get_symbol
missing_values_to_get_symbol: str = (
"Please provide values for: Ticker, Market & SecurityType"
)
Returns a string message saying: Please provide values for: Ticker, Market and SecurityType
BaseCommandHandler
Bases: Object
Provides user-facing messages for the Commands.BaseCommandHandler class and its consumers or related classes
executing_command
executing_command(command: ICommand) -> str
Returns a string with the given command
FileCommandHandler
Bases: Object
Provides user-facing messages for the Commands.FileCommandHandler class and its consumers or related classes
null_or_empty_command_id
null_or_empty_command_id: str = (
"Command Id is null or empty, will skip writing result file"
)
Returns a string message saying: Command Id is null or empty, will skip writing result file
command_file_does_not_exist
command_file_does_not_exist(command_file_path: str) -> str
Returns a string message saying the given command_file_path does not exists
reading_command_file
reading_command_file(command_file_path: str) -> str
Returns a string message saying the given command_file_path is being read
OrderCommand
Bases: Object
Provides user-facing messages for the Commands.OrderCommand class and its consumers or related classes
command_info
command_info(
order_type: OrderType,
symbol: Union[Symbol, str, BaseContract],
quantity: float,
response: OrderResponse,
) -> str
Returns a string message with basic information about a command, such us: order type, symbol, quantity and response
CancelOrderRequest
Bases: Object
Provides user-facing messages for the Orders.CancelOrderRequest class and its consumers or related classes
to_string
to_string(request: CancelOrderRequest) -> str
Parses the given CancelOrderRequest into a string message containing basic information about it
GroupOrderExtensions
Bases: Object
Provides user-facing messages for the Orders.GroupOrderExtensions class and its consumers or related classes
insufficient_buying_power_for_orders
insufficient_buying_power_for_orders(
securities: Dictionary[Order, Security],
has_sufficient_buying_power_result: HasSufficientBuyingPowerForOrderResult,
) -> str
Returns a string message saying there is insufficient buying power to complete the given orders
LimitIfTouchedOrder
Bases: Object
Provides user-facing messages for the Orders.LimitIfTouchedOrder class and its consumers or related classes
to_string
to_string(order: LimitIfTouchedOrder) -> str
Parses the given LimitIfTouched order to a string message containing basic information about it
LimitOrder
Bases: Object
Provides user-facing messages for the Orders.LimitOrder class and its consumers or related classes
to_string
to_string(order: LimitOrder) -> str
Parses a Limit order to a string message with basic information about it
Order
Bases: Object
Provides user-facing messages for the Orders.Order class and its consumers or related classes
to_string
to_string(order: Order) -> str
Parses the given order into a string message with basic information about it
OrderEvent
Bases: Object
Provides user-facing messages for the Orders.OrderEvent class and its consumers or related classes
short_to_string
short_to_string(order_event: OrderEvent) -> str
Parses the given order event into a string message which summarizes the basic information about it
to_string
to_string(order_event: OrderEvent) -> str
Parses the given order event into a string message containing basic information about it
OrderRequest
Bases: Object
Provides user-facing messages for the Orders.OrderRequest class and its consumers or related classes
to_string
to_string(request: OrderRequest) -> str
Parses the given order request into a string message containing basic information about it
OrderResponse
Bases: Object
Provides user-facing messages for the Orders.OrderResponse class and its consumers or related classes
default_error_message
default_error_message: str = "An unexpected error occurred."
String message saying: An unexpected error occurred
unprocessed_order_response_error_message
unprocessed_order_response_error_message: str = (
"The request has not yet been processed."
)
String message saying: The request has not yet been processed
invalid_new_status
invalid_new_status(
request: OrderRequest, order: Order
) -> str
Returns a string message saying it was impossible to update or cancel the order with the id from the given request because the submit confirmation had not been received yet
invalid_status
invalid_status(request: OrderRequest, order: Order) -> str
Returns a string message saying it was impossible to udpate the order with the id from the given request because it already had the status of the given order
missing_security
missing_security(request: SubmitOrderRequest) -> str
Returns a string message saying the user has not requested data for the symbol of the given request. It also advises the user on how to add this data
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
SubmitOrderRequest
|
|
required |
to_string
to_string(response: OrderResponse) -> str
Parses the given order response into a string message containing basic information about it
unable_to_find_order
unable_to_find_order(request: OrderRequest) -> str
Returns a string message saying it was impossible to locate the order with the id from the given request
warming_up
warming_up(request: OrderRequest) -> str
Returns a string message saying the given order request operation is not allowed in Initialize or during warm up. It also advises the user on where it is allowed to make it
zero_quantity
zero_quantity(request: OrderRequest) -> str
Returns a string message saying it was impossible to process the given order request that has zero quantity
OrderTicket
Bases: Object
Provides user-facing messages for the Orders.OrderTicket class and its consumers or related classes
cancel_request_already_submitted
cancel_request_already_submitted(
ticket: OrderTicket,
) -> str
Returns a string message saying the order associated with the given ticket has already received a cancellation request
get_field_error
get_field_error(
ticket: OrderTicket, field: OrderField
) -> str
Returns a string message saying it was impossible to get the given field on the order type from the given ticket
to_string
to_string(
ticket: OrderTicket,
order: Order,
request_count: int,
response_count: int,
) -> str
Parses the given order ticket into a string message containing basic information about it
StopLimitOrder
Bases: Object
Provides user-facing messages for the Orders.StopLimitOrder class and its consumers or related classes
to_string
to_string(order: StopLimitOrder) -> str
Parses the given StopLimitOrder object into a string message
StopMarketOrder
Bases: Object
Provides user-facing messages for the Orders.StopMarketOrder class and its consumers or related classes
to_string
to_string(order: StopMarketOrder) -> str
Parses a given StopMarketOrder object into a string message
TrailingStopOrder
Bases: Object
Provides user-facing messages for the Orders.TrailingStopOrder class and its consumers or related classes
SubmitOrderRequest
Bases: Object
Provides user-facing messages for the Orders.SubmitOrderRequest class and its consumers or related classes
to_string
to_string(request: SubmitOrderRequest) -> str
Parses a given SubmitOrderRequest object to a string message
UpdateOrderRequest
Bases: Object
Provides user-facing messages for the Orders.UpdateOrderRequest class and its consumers or related classes
PositionGroup
Bases: Object
Provides user-facing messages for the Securities.Positions.PositionGroup class and its consumers or related classes
invalid_quantity
invalid_quantity(
quantity: float, positions: List[IPosition]
) -> str
Returns a string message saying the given quantity is invalid. It also contains the quantities from the given positions as well as the unit quantities
Insight
Bases: Object
Provides user-facing messages for the Algorithm.Framework.Alphas.Insight class and its consumers or related classes
invalid_bar_count
invalid_bar_count: str = (
"Insight barCount must be greater than zero."
)
Returns a string message saying: Insight barCount must be grater than zero
invalid_period
invalid_period: str = (
"Insight period must be greater than or equal to 1 second."
)
Returns a string message saying: Insight period must be greater than or equal to 1 second
invalid_close_time_utc
invalid_close_time_utc: str = (
"Insight closeTimeUtc must be greater than generatedTimeUtc."
)
Returns a string message saying: Insight closeTimeUtc must be greater than generatedTimeUtc
invalid_close_time_local
invalid_close_time_local: str = (
"Insight closeTimeLocal must not be in the past."
)
Returns a string message saying: Insight closeTimeLocal must not be in the past
generated_time_utc_not_set
generated_time_utc_not_set(insight: Insight) -> str
Returns a string message saying the Insight's GeneratedTimeUtc property must be set before calling SetPeriodAndCloseTime
insight_already_assigned_to_a_group
insight_already_assigned_to_a_group(
insight: Insight,
) -> str
Returns a string message saying it was impossible to set group id on the given insight because it has already been assigned to a group
short_to_string
short_to_string(insight: Insight) -> str
Parses a short insight into a string containing basic information about it
to_string
to_string(insight: Insight) -> str
Parses the given insight into a string containing basic information about it
InsightScore
Bases: Object
Provides user-facing messages for the Algorithm.Framework.Alphas.InsightScore class and its consumers or related classes
to_string
to_string(insight_score: InsightScore) -> str
Parses an InsightScore object into a string message containing basic information about it
DefaultExerciseModel
Bases: Object
Provides user-facing messages for the Orders.OptionExercise.DefaultExerciseModel class and its consumers or related classes
option_assignment
option_assignment: str = 'Option Assignment'
String message saying: Option Assignment
option_exercise
option_exercise: str = 'Option Exercise'
String message saying: Option exercise
contract_holdings_adjustment_fill_tag
contract_holdings_adjustment_fill_tag(
in_the_money: bool, is_assignment: bool, option: Option
) -> str
Returns a string message containing basic information such as if it's an assignment or an exercise, if it's ITM or OTM and the underlying option price
FillModel
Bases: Object
Provides user-facing messages for the Orders.Fills.FillModel class and its consumers or related classes
filled_at_stale_price
Returns a string message warning saying the order was filled at stale price
market_never_closes
Returns a string message saying the market never closes for the given symbol, and that an order of the given type cannot be submitted
no_data_subscription_found_for_filling
no_data_subscription_found_for_filling(
security: Security,
) -> str
Returns a string message saying it was impossible to perform a fill for the given security symbol because no data subscription was found
no_market_data_to_get_ask_price_for_filling
no_market_data_to_get_ask_price_for_filling(
security: Security,
subscribed_types: HashSet[Type] = None,
) -> str
Returns a string message saying it was impossible to get ask price to perform the fill for the given security symbol because no market data was found
no_market_data_to_get_bid_price_for_filling
no_market_data_to_get_bid_price_for_filling(
security: Security,
subscribed_types: HashSet[Type] = None,
) -> str
Returns a string message saying it was impossible to get bid price to perform the fill for the given security symbol because no market data was found
EquityFillModel
Bases: Object
Provides user-facing messages for the Orders.Fills.EquityFillModel class and its consumers or related classes
market_on_open_fill_no_official_open_or_opening_prints_within_one_minute
market_on_open_fill_no_official_open_or_opening_prints_within_one_minute: (
str
) = "No trade with the OfficialOpen or OpeningPrints flag within the 1-minute timeout."
String message saying: No trade with the OfficialOpen or OpeningPrints flag within the 1-minute timeout
market_on_close_fill_no_official_close_or_closing_prints_within_one_minute
market_on_close_fill_no_official_close_or_closing_prints_within_one_minute: (
str
) = "No trade with the OfficialClose or ClosingPrints flag within the 1-minute timeout."
String message saying: No trade with the OfficialClose or ClosingPrints flag within the 1-minute timeout
market_on_close_fill_no_official_close_or_closing_prints_without_extended_market_hours
market_on_close_fill_no_official_close_or_closing_prints_without_extended_market_hours: (
str
) = "No trade with the OfficialClose or ClosingPrints flag for data that does not include extended market hours."
String message saying: No trade with the OfficialClose or ClosingPrints flag for data that does not include extended market hours
filled_with_last_tick_type_data
filled_with_last_tick_type_data(tick: Tick) -> str
Returns a string message saying the last data (of the given tick type) has been used to fill
filled_with_open_due_to_favorable_gap
Returns a string message saying that the order was filled using the open price due to a favorable gap
filled_with_open_due_to_unfavorable_gap
Returns a string message saying that the order was filled using the open price due to an unfavorable gap
filled_with_quote_bar_data
Returns a string message warning the user that the fill was at stale price, so quote bar data was used to fill the order
filled_with_quote_data
filled_with_quote_data(security: Security) -> str
Returns a string message warnning the user that no trade information was available, so the order was filled using quote data
filled_with_quote_tick_data
Returns a string message warning the user that the fill is at stale price and that the order will be filled using quote tick data
filled_with_trade_bar_data
Returns a string message warning the user that no quote information was available, so that trade bar data was used to fill the order
FeeModel
Bases: Object
Provides user-facing messages for the Orders.Fees.FeeModel class and its consumers or related classes
unsupported_security_type
unsupported_security_type(security: Security) -> str
Returns a string message saying the type of the given security is unsupported
AlphaStreamsFeeModel
Bases: Object
Provides user-facing messages for the Orders.Fees.AlphaStreamsFeeModel class and its consumers or related classes
unexpected_equity_market
unexpected_equity_market(market: str) -> str
Returns a string message saying the given market is unexpected
ExanteFeeModel
Bases: Object
Provides user-facing messages for the Orders.Fees.ExanteFeeModel class and its consumers or related classes
unsupported_exchange
unsupported_exchange(order: Order) -> str
Returns a string message saying the market associated with the given order symbol is unsupported
InteractiveBrokersFeeModel
Bases: Object
Provides user-facing messages for the Orders.Fees.InteractiveBrokersFeeModel class and its consumers or related classes
eurex_future_fees_unsupported_security_type
eurex_future_fees_unsupported_security_type(
security: Security,
) -> str
Returns a string message saying the type of the given security was unsupported
hong_kong_future_fees_unexpected_quote_currency
hong_kong_future_fees_unexpected_quote_currency(
security: Security,
) -> str
Returns a string message saying the quote currency of the given security was unexpected for Hong Kong futures exchange
unexpected_equity_market
unexpected_equity_market(market: str) -> str
Returns a string message saying the given equity market was unexpected
unexpected_future_market
unexpected_future_market(market: str) -> str
Returns a string message saying the given future market was unexpected
unexpected_option_market
unexpected_option_market(market: str) -> str
Returns a string message saying the given option market was unexpected
united_states_future_fees_unsupported_security_type
united_states_future_fees_unsupported_security_type(
security: Security,
) -> str
Returns a string message saying the type of the given security was unsupported
TDAmeritradeFeeModel
Bases: Object
Provides user-facing messages for the Orders.Fees.TDAmeritradeFeeModel class and its consumers or related classes
unsupported_security_type
unsupported_security_type(
security_type: SecurityType,
) -> str
Returns a string message for unsupported security types in TDAmeritradeFeeModel
PortfolioTarget
Bases: Object
Provides user-facing messages for the Algorithm.Framework.Portfolio.PortfolioTarget class and its consumers or related classes
invalid_insight_direction
invalid_insight_direction(
symbol: Union[Symbol, str, BaseContract],
insight_direction: InsightDirection,
) -> str
Returns a string message saying the insight direction is invalid for the given symbol
invalid_target_percent
invalid_target_percent(
algorithm: IAlgorithm, percent: float
) -> str
Returns a string message saying the portfolio target percent is invalid
symbol_not_found
symbol_not_found(
symbol: Union[Symbol, str, BaseContract],
) -> str
Returns a string message saying the given symbol was not found in the portfolio
to_string
to_string(portfolio_target: PortfolioTarget) -> str
Parses the given portfolio target into a string message containing basic information about it
unable_to_compute_order_quantity_due_to_null_result
unable_to_compute_order_quantity_due_to_null_result(
symbol: Union[Symbol, str, BaseContract],
result: GetMaximumLotsResult,
) -> str
Returns a string message saying it was impossible to compute the order quantity of the given symbol. It also explains the reason why it was impossible
AccountEvent
Bases: Object
Provides user-facing messages for the Securities.AccountEvent class and its consumers or related classes
to_string
to_string(account_event: AccountEvent) -> str
Returns a string message containing basic information about the given account_event
BuyingPowerModel
Bases: Object
Provides user-facing messages for the Securities.BuyingPowerModel class and its consumers or related classes
invalid_initial_margin_requirement
invalid_initial_margin_requirement: str = (
"Initial margin requirement must be between 0 and 1"
)
String message saying: Initial margin requirement must be between 0 and 1
invalid_maintenance_margin_requirement
invalid_maintenance_margin_requirement: str = (
"Maintenance margin requirement must be between 0 and 1"
)
String messsage saying: Maintenance margin requirement must be between 0 and 1
invalid_free_buying_power_percent_requirement
invalid_free_buying_power_percent_requirement: str = (
"Free Buying Power Percent requirement must be between 0 and 1"
)
String message saying: Free Buying Power Percent requirement must be between 0 and 1
invalid_leverage
invalid_leverage: str = (
"Leverage must be greater than or equal to 1."
)
String message saying: Leverage must be greater than or equal to 1
failed_to_converge_on_the_target_margin
failed_to_converge_on_the_target_margin(
parameters: GetMaximumOrderQuantityForTargetBuyingPowerParameters,
signed_target_final_margin_value: float,
order_fees: float,
) -> str
Returns a string message saying GetMaximumOrderQuantityForTargetBuyingPower failed to converge on the target margin. It also contains useful information to reproduce the issue
failed_to_converge_on_the_target_margin_underlying_security_info
failed_to_converge_on_the_target_margin_underlying_security_info(
underlying: Security,
) -> str
Returns a string message containing basic information related with the underlying security such as the price, the holdings and the average price of them
insufficient_buying_power_due_to_null_order_ticket
insufficient_buying_power_due_to_null_order_ticket(
order: Order,
) -> str
Returns a string message saying the order associated with the id of the given order is null
insufficient_buying_power_due_to_unsufficient_margin
insufficient_buying_power_due_to_unsufficient_margin(
order: Order,
initial_margin_required_for_remainder_of_order: float,
free_margin: float,
) -> str
Returns a string mesage containing information about the order ID, the initial margin and the free margin
margin_being_adjusted_in_the_wrong_direction
margin_being_adjusted_in_the_wrong_direction(
target_margin: float,
margin_for_one_unit: float,
security: Security,
) -> str
Returns a string message saying the margin is being adjusted in the wrong direction. It also provides useful information to reproduce the issue
margin_being_adjusted_in_the_wrong_direction_underlying_security_info
margin_being_adjusted_in_the_wrong_direction_underlying_security_info(
underlying: Security,
) -> str
Returns a string message containing basic information related with the underlying security such as the price, the holdings and the average price of them
order_quantity_less_than_lot_size
order_quantity_less_than_lot_size(
security: Security, target_order_margin: float
) -> str
Returns a string message saying that the order quantity is less that the lot size of the given security and that it has been rounded to zero
PositionGroupBuyingPowerModel
Bases: Object
Provides user-facing messages for the Securities.Positions.PositionGroupBuyingPowerModel class and its consumers or related classes
delta_cannot_be_applied
delta_cannot_be_applied: str = (
"No buying power used, delta cannot be applied"
)
String message saying: No buying power used, delta cannot be applied
computed_zero_initial_margin
computed_zero_initial_margin(
position_group: IPositionGroup,
) -> str
Returns a string message saying the zero initial margin requirement was computed for the given position group
failed_to_converge_on_target_margin
failed_to_converge_on_target_margin(
target_margin: float,
position_group_quantity: float,
order_fees: float,
parameters: GetMaximumLotsForTargetBuyingPowerParameters,
) -> str
Returns a string message saying the process to converge on the given target margin failed
position_group_quantity_rounded_to_zero
position_group_quantity_rounded_to_zero(
target_order_margin: float,
) -> str
Returns a string message saying the position group order quantity has been rounded to zero
Cash
Bases: Object
Provides user-facing messages for the Securities.Cash class and its consumers or related classes
null_or_empty_cash_symbol
null_or_empty_cash_symbol: str = (
"Cash symbols cannot be null or empty."
)
String message saying: Cash symbols cannot be null or empty
adding_security_symbol_for_cash_currency_feed
adding_security_symbol_for_cash_currency_feed(
symbol: Union[Symbol, str, BaseContract],
cash_currency_symbol: str,
) -> str
Returns a string message saying the security symbol is being added for cash currency feed (this comes from the given cash currency symbol)
no_tradable_pair_found_for_currency_conversion
no_tradable_pair_found_for_currency_conversion(
cash_currency_symbol: str,
account_currency: str,
market_map: List[KeyValuePair[SecurityType, str]],
) -> str
Returns a string message saying no tradeable pair was found for the given currency symbol. It also mentions that the given account currency will be set to zero
to_string
to_string(cash: Cash, account_currency: str) -> str
Parses the given Cash object into a string containing basic information about it
CashBook
Bases: Object
Provides user-facing messages for the Securities.CashBook class and its consumers or related classes
unexpected_request_for_null_currency
unexpected_request_for_null_currency: str = (
"Unexpected request for NullCurrency Cash instance"
)
String message saying: Unexpected request for NullCurrency Cash instance
cash_symbol_not_found
cash_symbol_not_found(symbol: str) -> str
Returns a string message saying the given cash symbol was not found
conversion_rate_not_found
conversion_rate_not_found(currency: str) -> str
Returns a string message saying the conversion rate for the given currency is not available
failed_to_remove_record
failed_to_remove_record(symbol: str) -> str
Returns a string message saying it was impossible to remove the cash book record for the given symbol
to_string
to_string(cash_book: CashBook) -> str
Parses the given CashBook into a string mesage with basic information about it
CashBuyingPowerModel
Bases: Object
Provides user-facing messages for the Securities.CashBuyingPowerModel class and its consumers or related classes
unsupported_leverage
unsupported_leverage: str = (
"CashBuyingPowerModel does not allow setting leverage. Cash accounts have no leverage."
)
String message saying: CashBuyingPowerModel does not allow setting leverage. Cash accounts have no leverage
get_maximum_order_quantity_for_delta_buying_power_not_implemented
get_maximum_order_quantity_for_delta_buying_power_not_implemented: (
str
) = ...
String message saying: The CashBuyingPowerModel does not require GetMaximumOrderQuantityForDeltaBuyingPower
shorting_not_supported
shorting_not_supported: str = (
"The cash model does not allow shorting."
)
String message saying: The cash model does not allow shorting
invalid_security
invalid_security: str = ...
String message saying: The security type must be Crypto or Forex
buy_order_quantity_greater_than_max_for_buying_power
buy_order_quantity_greater_than_max_for_buying_power(
total_quantity: float,
maximum_quantity: float,
open_orders_reserved_quantity: float,
order_quantity: float,
base_currency: IBaseCurrencySymbol,
security: Security,
order: Order,
) -> str
Returns a string message containing the portfolio holdings, the buy order and the maximum buying power
failed_to_converge_on_target_order_value
failed_to_converge_on_target_order_value(
target_order_value: float,
current_order_value: float,
order_quantity: float,
order_fees: float,
security: Security,
) -> str
Returns a string message saying GetMaximumOrderQuantityForTargetBuyingPower failed to converge to the given target order value
no_data_in_internal_cash_feed_yet
no_data_in_internal_cash_feed_yet(
security: Security, portfolio: SecurityPortfolioManager
) -> str
Returns a string message saying the internal cash feed required for converting the quote currency, from the given security, to the target account currency, from the given portfolio, does not have any data
order_quantity_less_than_lot_size
order_quantity_less_than_lot_size(
security: Security,
) -> str
Returns a string message saying the order quantity is less than the lot size for the given security
order_quantity_less_than_lot_size_order_details
order_quantity_less_than_lot_size_order_details(
target_order_value: float,
order_quantity: float,
order_fees: float,
) -> str
Returns a string message containing information about the target order value, the order fees and the order quantity
sell_order_short_holdings_not_supported
sell_order_short_holdings_not_supported(
total_quantity: float,
open_orders_reserved_quantity: float,
order_quantity: float,
base_currency: IBaseCurrencySymbol,
) -> str
Returns a string message saying Cash Modeling trading does not permit short holdings as well as portfolio holdings and an advise to ensure the user is selling only what it has
unsupported_security
unsupported_security(security: Security) -> str
Returns a string message saying: The security is not supported by this cash model. It also mentioned that currently just crypt and forex securities are supported
zero_contract_multiplier
zero_contract_multiplier(security: Security) -> str
Returns a string mesasge saying the contract multiplier for the given security is zero
DefaultMarginCallModel
Bases: Object
Provides user-facing messages for the Securities.DefaultMarginCallModel class and its consumers or related classes
margin_call_order_tag
margin_call_order_tag: str = 'Margin Call'
String message saying: Margin Call
DynamicSecurityData
Bases: Object
Provides user-facing messages for the Securities.DynamicSecurityData class and its consumers or related classes
properties_cannot_be_set
properties_cannot_be_set: str = (
"DynamicSecurityData is a view of the SecurityCache. It is readonly, properties can not be set"
)
String message saying: DynamicSecurityData is a view of the SecurityCache. It is readonly, properties can not bet set
property_not_found
property_not_found(name: str) -> str
Returns a string message saying no property exists with the given name
unexpected_types_for_get_all
unexpected_types_for_get_all(type: Type, data: Any) -> str
Returns a string message saying a list of the given type was expected but the one found was of the given data type
EquityPriceVariationModel
Bases: Object
Provides user-facing messages for the Securities.EquityPriceVariationModel class and its consumers or related classes
invalid_security_type
invalid_security_type(security: Security) -> str
Returns a string message saying the type of the given security was invalid
ErrorCurrencyConverter
Bases: Object
Provides user-facing messages for the Securities.ErrorCurrencyConverter class and its consumers or related classes
account_currency_unexpected_usage
account_currency_unexpected_usage: str = (
"Unexpected usage of ErrorCurrencyConverter.AccountCurrency"
)
String message saying: Unexpected usage of ErrorCurrencyConverter.AccountCurrency
convert_to_account_currency_purposefully_throw
convert_to_account_currency_purposefully_throw: str = ...
String message saying: This method purposefully throws as a proof that a test does not depend on a currency converter
FuncSecuritySeeder
Bases: Object
Provides user-facing messages for the Securities.FuncSecuritySeeder class and its consumers or related classes
seeded_security_info
seeded_security_info(seed_data: BaseData) -> str
Returns a string message with basic information about the given BaseData object
unable_to_security_price
unable_to_security_price(security: Security) -> str
Returns a string message saying it was impossible to seed price for the given security
unable_to_seed_security
unable_to_seed_security(security: Security) -> str
Returns a string message saying it was impossible to seed the given security
IdentityCurrencyConverter
Bases: Object
Provides user-facing messages for the Securities.IdentityCurrencyConverter class and its consumers or related classes
unable_to_handle_cash_in_non_account_currency
unable_to_handle_cash_in_non_account_currency: str = ...
String message saying: The IdentityCurrencyConverter can only handle CashAmounts in units of the account currency
InitialMarginParameters
Bases: Object
Provides user-facing messages for the Securities.InitialMarginParameters class and its consumers or related classes
for_underlying_only_invokable_for_i_derivative_security
for_underlying_only_invokable_for_i_derivative_security: (
str
) = "ForUnderlying is only invokable for IDerivativeSecurity (Option|Future)"
String message saying: ForUnderlying is only invokable for IDerivativeSecurity (Option|Future)
LocalMarketHours
Bases: Object
Provides user-facing messages for the Securities.LocalMarketHours class and its consumers or related classes
to_string
to_string(instance: LocalMarketHours) -> str
Parses the given LocalMarketHours object into a string message containing basic information about it
MaintenanceMarginParameters
Bases: Object
Provides user-facing messages for the Securities.MaintenanceMarginParameters class and its consumers or related classes
for_underlying_only_invokable_for_i_derivative_security
for_underlying_only_invokable_for_i_derivative_security: (
str
) = "ForUnderlying is only invokable for IDerivativeSecurity (Option|Future)"
String message saying: ForUnderlying is only invokable for IDerivativeSecurity
MarketHoursDatabase
Bases: Object
Provides user-facing messages for the Securities.MarketHoursDatabase class and its consumers or related classes
future_usa_market_type_no_longer_supported
future_usa_market_type_no_longer_supported: str = ...
String message saying: Future.Usa market type is no longer supported as we mapped each ticker to its actual exchange
exchange_hours_not_found
exchange_hours_not_found(
key: SecurityDatabaseKey,
available_keys: List[SecurityDatabaseKey] = None,
) -> str
Returns a string message saying it was impossible to locate exchange hours for the given key. It also mentiones the available keys
suggested_market_based_on_ticker
suggested_market_based_on_ticker(market: str) -> str
Returns a string message that suggests the given market based on the provided ticker
MarketHoursSegment
Bases: Object
Provides user-facing messages for the Securities.MarketHoursSegment class and its consumers or related classes
invalid_extended_market_open_time
invalid_extended_market_open_time: str = (
"Extended market open time must be less than or equal to market open time."
)
String message saying: Extended market open time must be less than or equal to market open time
invalid_market_close_time
invalid_market_close_time: str = (
"Market close time must be after market open time."
)
String message saying: Market close time must be after market open time
invalid_extended_market_close_time
invalid_extended_market_close_time: str = (
"Extended market close time must be greater than or equal to market close time."
)
String message saying: Extended market close time must be greater than or equal to market close time
to_string
to_string(instance: MarketHoursSegment) -> str
Parses a MarketHourSegment object into a string message containing basic information about it
RegisteredSecurityDataTypesProvider
Bases: Object
Provides user-facing messages for the Securities.RegisteredSecurityDataTypesProvider class and its consumers or related classes
two_different_types_detected_for_the_same_type_name
two_different_types_detected_for_the_same_type_name(
type: Type, existing_type: Type
) -> str
Returns a string message saying two different types were detected trying to register the same type name. It also mentions the two different types
Security
Bases: Object
Provides user-facing messages for the Securities.Security class and its consumers or related classes
valid_symbol_properties_instance_required
valid_symbol_properties_instance_required: str = (
"Security requires a valid SymbolProperties instance."
)
String message saying: Security requires a valid SymbolProperties instance
unmatching_quote_currencies
unmatching_quote_currencies: str = (
"symbolProperties.QuoteCurrency must match the quoteCurrency.Symbol"
)
String message saying: symbolProperties.QuoteCurrency must match the quoteCurrency.Symbol
set_local_time_keeper_must_be_called_before_using_local_time
set_local_time_keeper_must_be_called_before_using_local_time: (
str
) = "Security.SetLocalTimeKeeper(LocalTimeKeeper) must be called in order to use the LocalTime property."
String message saying: Security.SetLocalTimeKeeper(LocalTimeKeeper) must be called in order to use the LocalTime property
unmatching_symbols
unmatching_symbols: str = 'Symbols must match.'
String message saying: Symbols must match
unmatching_exchange_time_zones
unmatching_exchange_time_zones: str = (
"ExchangeTimeZones must match."
)
String message saying: ExchangeTimeZones must match
SecurityDatabaseKey
Bases: Object
Provides user-facing messages for the Securities.SecurityDatabaseKey class and its consumers or related classes
key_not_in_expected_format
key_not_in_expected_format(key: str) -> str
Returns a string message saying the specified and given key was not in the expected format
to_string
to_string(instance: SecurityDatabaseKey) -> str
Parses a SecurityDatabaseKey into a string message with basic information about it
SecurityDefinitionSymbolResolver
Bases: Object
Provides user-facing messages for the Securities.SecurityDefinitionSymbolResolver class and its consumers or related classes
no_security_definitions_loaded
no_security_definitions_loaded(
securities_definition_key: str,
) -> str
Returns a string message saying no security definitions data have been loaded from the given file
SecurityExchangeHours
Bases: Object
Provides user-facing messages for the Securities.SecurityExchangeHours class and its consumers or related classes
last_market_open_not_found
last_market_open_not_found(
local_date_time: Union[datetime, date],
is_market_always_open: bool,
) -> str
Returns a string message saying it did not find last market open for the given local date time. It also mentions if the market is always open or not
unable_to_locate_next_market_close_in_two_weeks
unable_to_locate_next_market_close_in_two_weeks(
is_market_always_open: bool,
) -> str
Returns an error message when the next market close could not be located within two weeks. Includes additional guidance if the market is always open (e.g., crypto assets).
unable_to_locate_next_market_open_in_two_weeks
unable_to_locate_next_market_open_in_two_weeks(
is_market_always_open: bool,
) -> str
Returns an error message when the next market open could not be located within two weeks. Includes additional guidance if the market is always open (e.g., crypto assets).
SecurityHolding
Bases: Object
Provides user-facing messages for the Securities.SecurityHolding class and its consumers or related classes
to_string
to_string(instance: SecurityHolding) -> str
Parses the given SecurityHolding object into a string message containing basic information about it
SecurityManager
Bases: Object
Provides user-facing messages for the Securities.SecurityManager class and its consumers or related classes
symbol_not_found_in_securities
symbol_not_found_in_securities(
symbol: Union[Symbol, str, BaseContract],
) -> str
Returns a string message saying the given symbol was not found in the user security list
unable_to_overwrite_security
unable_to_overwrite_security(
symbol: Union[Symbol, str, BaseContract],
) -> str
Returns a string message saying the given symbol could not be overwritten
SecurityPortfolioManager
Bases: Object
Provides user-facing messages for the Securities.SecurityPortfolioManager class and its consumers or related classes
dictionary_add_not_implemented
dictionary_add_not_implemented: str = (
"Portfolio object is an adaptor for Security Manager. To add a new asset add the required data during initialization."
)
Returns a string message saying Portfolio object is an adaptor for Security Manager and that to add a new asset the required data should added during initialization
dictionary_clear_not_implemented
dictionary_clear_not_implemented: str = (
"Portfolio object is an adaptor for Security Manager and cannot be cleared."
)
Returns a string message saying the Portfolio object object is an adaptor for Security Manager and cannot be cleared
dictionary_remove_not_implemented
dictionary_remove_not_implemented: str = (
"Portfolio object is an adaptor for Security Manager and objects cannot be removed."
)
Returns a string message saying the Portfolio object is an adaptor for Security Manager and objects cannot be removed
cannot_change_account_currency_after_adding_security
cannot_change_account_currency_after_adding_security: (
str
) = "Cannot change AccountCurrency after adding a Security. Please move SetAccountCurrency() before AddSecurity()."
Returns a string message saying the AccountCurrency cannot be changed after adding a Security and that the method SetAccountCurrency() should be moved before AddSecurity()
cannot_change_account_currency_after_setting_cash
cannot_change_account_currency_after_setting_cash: str = (
"Cannot change AccountCurrency after setting cash. Please move SetAccountCurrency() before SetCash()."
)
Returns a string message saying the AccountCurrency cannot be changed after setting cash and that the method SetAccountCurrency() should be moved before SetCash()
account_currency_already_set
account_currency_already_set(
cash_book: CashBook, new_account_currency: str
) -> str
Returns a string message saying the AccountCurrency has already been set and that the new value for this property will be ignored
order_request_margin_information
order_request_margin_information(
margin_used: float, margin_remaining: float
) -> str
Returns a string message saying the order request margin information, this is, the margin used and the margin remaining
setting_account_currency
setting_account_currency(account_currency: str) -> str
Returns a string message saying the AccountCurrency is being set to the given account currency
total_margin_information
total_margin_information(
total_margin_used: float, margin_remaining: float
) -> str
Returns a string message saying the total margin information, this is, the total margin used as well as the margin remaining
SecurityService
Bases: Object
Provides user-facing messages for the Securities.SecurityService class and its consumers or related classes
symbol_not_found_in_symbol_properties_database
symbol_not_found_in_symbol_properties_database(
symbol: Union[Symbol, str, BaseContract],
) -> str
Returns a string message saying the given Symbol could not be found in the Symbol Properties Database
SecurityTransactionManager
Bases: Object
Provides user-facing messages for the Securities.SecurityTransactionManager class and its consumers or related classes
cancel_open_orders_not_allowed_on_initialize_or_warm_up
cancel_open_orders_not_allowed_on_initialize_or_warm_up: (
str
) = "This operation is not allowed in Initialize or during warm up: CancelOpenOrders. Please move this code to the OnWarmupFinished() method."
Returns a string message saying CancelOpenOrders operation is not allowed in Initialize or during warm up
order_canceled_by_cancel_open_orders
order_canceled_by_cancel_open_orders(
time: Union[datetime, date],
) -> str
Returns a string message saying the order was canceled by the CancelOpenOrders() at the given time
order_not_filled_within_expected_time
order_not_filled_within_expected_time(
fill_timeout: timedelta,
) -> str
Returns a string message saying the order did not fill within the given amount of seconds
unable_to_locate_order_ticket
unable_to_locate_order_ticket(order_id: int) -> str
Returns a string message saying the ticket for the given order ID could not be localized
SymbolProperties
Bases: Object
Provides user-facing messages for the Securities.SymbolProperties class and its consumers or related classes
invalid_lot_size
invalid_lot_size: str = (
"SymbolProperties LotSize can not be less than or equal to 0"
)
String message saying the SymbolProperties LotSize can not be less than or equal to 0
invalid_price_magnifier
invalid_price_magnifier: str = (
"SymbolProprties PriceMagnifier can not be less than or equal to 0"
)
String message saying the SymbolProperties PriceMagnifier can not be less than or equal to 0
invalid_strike_multiplier
invalid_strike_multiplier: str = (
"SymbolProperties StrikeMultiplier can not be less than or equal to 0"
)
String message saying the SymbolProperties StrikeMultiplier can not be less than or equal to 0
to_string
to_string(instance: SymbolProperties) -> str
Parses a given SymbolProperties object into a string message
SymbolPropertiesDatabase
Bases: Object
Provides user-facing messages for the Securities.SymbolPropertiesDatabase class and its consumers or related classes
database_file_not_found
database_file_not_found(file: str) -> str
Returns a string saying the given symbol properties file could not be localized
duplicate_key_in_file
duplicate_key_in_file(
file: str, key: SecurityDatabaseKey
) -> str
Returns a string saying a duplicated key was found while processing the given file