Skip to content

Config models

Pydantic models for configuration endpoints — server config, user config, setup, save results.

rainbowminer_api_client.models.config

Models for config-related endpoints.

Covers: /config, /userconfig, /loadconfig, /saveconfig, /loadconfigjson, /saveconfigjson, /setup.json.

Config

Bases: RootModel[dict[str, Any]]

Response of /config — the merged running config (dynamic).

The RainbowMiner config object has hundreds of keys and varies by version; it is exposed as a plain dict for maximum compatibility.

UserConfig

Bases: RootModel[dict[str, Any]]

Response of /userconfig — user overrides of the config (dynamic).

MinerConfig

Bases: RainbowMinerModel

A single miner entry from /loadconfig?ConfigName=Miners.

Attributes:

Name Type Description
Name str

Miner base name.

Device str

Target device.

MainAlgorithm str

Primary algorithm.

SecondaryAlgorithm str

Secondary algorithm (dual mining).

Params str

Extra miner command-line parameters.

MSIAprofile str | None

MSI Afterburner profile index.

OCprofile str | None

Overclock profile name.

Difficulty str | None

Pool difficulty override.

Penalty float | int | str | None

Profit penalty factor.

Disable bool

Whether the miner is disabled.

Tuning dict[str, Any] | None

Miner-specific tuning parameters.

PoolsConfig

Bases: RootModel[dict[str, Any]]

Response of /loadconfig?ConfigName=Pools — pool config (dynamic).

LoadConfigJsonResult

Bases: RainbowMinerModel

Response of /loadconfigjson.

Attributes:

Name Type Description
Success bool

Whether the config file was read successfully.

Data str | None

The raw config file contents (JSON string).

SaveResult

Bases: RainbowMinerModel

Response of /saveconfig and /saveconfigjson.

Attributes:

Name Type Description
Success bool

Whether the config was saved.

Data dict[str, Any] | None

Saved data echo (saveconfig only).

SetupJson

Bases: RainbowMinerModel

Response of /setup.json — aggregated setup config.

Attributes:

Name Type Description
Autostart dict[str, Any] | None

Autostart configuration.

Exclude list[str]

List of server config vars excluded from sync.

Config Any | None

Main config object.

Pools Any | None

Pools config object.

Coins Any | None

Coins config object.

OCProfiles Any | None

OC profiles config object.

Scheduler Any | None

Scheduler config object.

Userpools Any | None

Userpools config object.