Skip to content

Misc models

Pydantic models for miscellaneous endpoints — clients, downloads, and other utility types.

rainbowminer_api_client.models.misc

Models for miscellaneous endpoints.

Covers: /clients, /disabled, /getwtmurls, /action/toggleminer, /action/togglepool, /downloadlist, /rates.

Client

Bases: RainbowMinerModel

An entry from /clients — a connected RainbowMiner client.

Attributes:

Name Type Description
workername str | None

Worker name.

machinename str | None

Machine name.

machineip str | None

Machine IP address.

port int | None

API port.

timestamp int | None

Last-seen Unix timestamp.

isserver bool

True for the server entry itself.

WtmUrls

Bases: RootModel[dict[str, str]]

Response of /getwtmurls — device-model → WhatToMine URL mapping.

ToggleResult

Bases: RainbowMinerModel

Response of /action/toggleminer and /action/togglepool.

Attributes:

Name Type Description
Status bool

Whether the request was well-formed.

Disabled bool | None

True if the resource is now disabled, False if re-enabled. Absent when Status is False.

RatesDict

Bases: RootModel[dict[str, float | int]]

Response of /rates (default) — currency → rate mapping.

RateTableRow

Bases: RainbowMinerModel

A row from /rates?format=table.

Attributes:

Name Type Description
symbol str

Currency symbol.

rate

rate(currency: str) -> float | int | None

Get the exchange rate for a given currency.

Parameters:

Name Type Description Default
currency str

The currency symbol (e.g. "USD").

required

Returns:

Type Description
float | int | None

The rate value, or None if not present in this row.