Tim55667757 / TKSBrokerAPI

TKSBrokerAPI is the trading platform for automation and simplifying the implementation of trading scenarios, as well as working with Tinkoff Invest API server via the REST protocol. The TKSBrokerAPI platform may be used in two ways: from the console, it has a rich keys and commands, or you can use it as Python module.
https://tim55667757.github.io/TKSBrokerAPI/
Apache License 2.0
25 stars 9 forks source link

Implement `UpdateClassFields()` method #96

Closed Tim55667757 closed 1 year ago

Tim55667757 commented 1 year ago
def UpdateClassFields(instance: object, params: dict) -> None:
    """
    This method read config file in YAML format as dictionary and apply `key: value` as names of class fields and
    values of class field. Example for class `TradeScenario`:
    `config["tickers"] = ["TICKER1", "TICKER2"] ==> TradeScenario(TinkoffBrokerServer).tickers = ["TICKER1", "TICKER2"]`.

    :param instance: instance of class to parametrize.
    :param params: dict with all parameters in `key: value` format.
    """
Tim55667757 commented 1 year ago

Implemented in v1.6.dev126

debug build: https://app.travis-ci.com/github/Tim55667757/TKSBrokerAPI/builds/258202708 PyPI for testing: https://pypi.org/project/tksbrokerapi/1.6.dev126/