mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-01 14:37:42 +00:00
1.6 KiB
1.6 KiB
Table of Contents
aiomql.core.config
Config Objects
class Config()
A class for handling configuration settings for the aiomql package.
Arguments:
**kwargs- Configuration settings as keyword arguments. Variables set this way supersede those set in the config file.
Attributes:
record_tradesbool - Whether to keep record of trades or not.filenamestr - Name of the config filerecords_dirstr - Path to the directory where trade records are savedwin_percentagefloat - Percentage of achieved target profit in a trade to be considered a winloginint - Trading account numberpasswordstr - Trading account passwordserverstr - Broker serverpathstr - Path to terminal filetimeoutint - Timeout for terminal connection
Notes:
By default, the config class looks for a file named aiomql.json. You can change this by passing the filename keyword argument to the constructor. By passing reload=True to the load_config method, you can reload and search again for the config file.
account_info
def account_info() -> dict['login', 'password', 'server']
Returns Account login details as found in the config object if available
Returns:
dict- A dictionary of login details