Files
aiomql/docs/core/config.md
T
Ichinga Samuel 027f9fd8de add docs
2023-10-11 09:49:06 +01:00

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_trades bool - Whether to keep record of trades or not.
  • filename str - Name of the config file
  • records_dir str - Path to the directory where trade records are saved
  • win_percentage float - Percentage of achieved target profit in a trade to be considered a win
  • login int - Trading account number
  • password str - Trading account password
  • server str - Broker server
  • path str - Path to terminal file
  • timeout int - 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