{
  "openapi": "3.0.3",
  "info": {
    "title": "RuPool Client API",
    "version": "1.0.0",
    "description": "Клиентский REST API RuPool. Все запросы выполняются по HTTPS с парой ключ + секрет. Управление ключами — в настройках кабинета. Адреса выплат и передача субаккаунтов меняются только в кабинете."
  },
  "servers": [
    {
      "url": "https://api.rupool.pro/v1/api"
    }
  ],
  "security": [
    {
      "APIKey": [],
      "APISecret": []
    }
  ],
  "tags": [
    {
      "name": "usersettings",
      "description": "Настройки"
    },
    {
      "name": "subaccounts",
      "description": "Субаккаунты"
    },
    {
      "name": "mining",
      "description": "Майнинг"
    },
    {
      "name": "workers",
      "description": "Воркеры"
    },
    {
      "name": "workerearnings",
      "description": "Начисления воркеров"
    },
    {
      "name": "workerprofiles",
      "description": "Оборудование"
    },
    {
      "name": "payments",
      "description": "Выплаты"
    },
    {
      "name": "earnings",
      "description": "Начисления"
    },
    {
      "name": "expenses",
      "description": "Расходы"
    }
  ],
  "paths": {
    "/settings": {
      "get": {
        "tags": [
          "usersettings"
        ],
        "summary": "Настройки пользователя",
        "operationId": "usersettings_get_settings",
        "description": "Право доступа: `manage_settings`. ",
        "x-permission": "manage_settings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/usersettings_UserSettingsPublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "usersettings"
        ],
        "summary": "Изменить настройки пользователя",
        "operationId": "usersettings_put_settings",
        "description": "Право доступа: `manage_settings`. Передавайте только изменяемые поля. displayCurrency: usd, eur, rub, cny.",
        "x-permission": "manage_settings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/usersettings_UserSettingsPublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/usersettings_UpdateUserSettingsRequest"
              }
            }
          }
        }
      }
    },
    "/subaccounts": {
      "get": {
        "tags": [
          "subaccounts"
        ],
        "summary": "Список субаккаунтов",
        "operationId": "subaccounts_get_subaccounts",
        "description": "Право доступа: `manage_subaccounts`. ",
        "x-permission": "manage_subaccounts",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subaccounts_SubaccountPublic"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "subaccounts"
        ],
        "summary": "Создать субаккаунт",
        "operationId": "subaccounts_post_subaccounts",
        "description": "Право доступа: `manage_subaccounts`. name: 1–100 латинских букв и цифр; уникальность без учёта регистра.",
        "x-permission": "manage_subaccounts",
        "parameters": [],
        "responses": {
          "201": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/subaccounts_SubaccountPublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subaccounts_CreateSubaccountRequest"
              }
            }
          }
        }
      }
    },
    "/subaccounts/{id}": {
      "get": {
        "tags": [
          "subaccounts"
        ],
        "summary": "Получить субаккаунт",
        "operationId": "subaccounts_get_subaccounts_id",
        "description": "Право доступа: `manage_subaccounts`. ",
        "x-permission": "manage_subaccounts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Числовой ID записи.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/subaccounts_SubaccountPublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "subaccounts"
        ],
        "summary": "Изменить заметки и метаданные",
        "operationId": "subaccounts_put_subaccounts_id",
        "description": "Право доступа: `manage_subaccounts`. ",
        "x-permission": "manage_subaccounts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Числовой ID записи.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/subaccounts_SubaccountPublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subaccounts_UpdateSubaccountRequest"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "subaccounts"
        ],
        "summary": "Удалить субаккаунт",
        "operationId": "subaccounts_delete_subaccounts_id",
        "description": "Право доступа: `manage_subaccounts`. Удаление может быть запрещено бизнес-правилами, например для субаккаунта по умолчанию.",
        "x-permission": "manage_subaccounts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Числовой ID записи.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subaccounts/{id}/wallets": {
      "get": {
        "tags": [
          "subaccounts"
        ],
        "summary": "Список кошельков субаккаунта",
        "operationId": "subaccounts_get_subaccounts_id_wallets",
        "description": "Право доступа: `manage_subaccounts`. Только чтение. Адрес и настройки выплат меняются в кабинете.",
        "x-permission": "manage_subaccounts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Числовой ID записи.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subaccounts_WalletPublic"
                      }
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/mining/summary": {
      "get": {
        "tags": [
          "mining"
        ],
        "summary": "Общая сводка майнинга",
        "operationId": "mining_get_mining_summary",
        "description": "Право доступа: `read_stats`. Хешрейт в H/s; earningsToday — суммы по монетам.",
        "x-permission": "read_stats",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/mining_MiningSummary"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers": {
      "get": {
        "tags": [
          "workers"
        ],
        "summary": "Список воркеров",
        "operationId": "workers_get_workers",
        "description": "Право доступа: `read_stats`. meta содержит total, page, pageSize, totalPages. Список возвращается целиком.",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string",
              "default": "btc"
            }
          },
          {
            "name": "subaccountId",
            "in": "query",
            "description": "Числовой ID субаккаунта, полученный через GET /subaccounts.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/workers_Worker"
                      }
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers/stats": {
      "get": {
        "tags": [
          "workers"
        ],
        "summary": "Статистика воркеров",
        "operationId": "workers_get_workers_stats",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string",
              "default": "btc"
            }
          },
          {
            "name": "subaccountId",
            "in": "query",
            "description": "Числовой ID субаккаунта, полученный через GET /subaccounts.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/workers_WorkerStats"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers/hashrate-history": {
      "get": {
        "tags": [
          "workers"
        ],
        "summary": "История хешрейта",
        "operationId": "workers_get_workers_hashrate_history",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string",
              "default": "btc"
            }
          },
          {
            "name": "subaccountId",
            "in": "query",
            "description": "Числовой ID субаккаунта, полученный через GET /subaccounts.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Шаг графика и глубина: 15m — 3 дня; 1h — 7 дней; 1d — 30 дней.",
            "schema": {
              "type": "string",
              "default": "1h",
              "enum": [
                "15m",
                "1h",
                "1d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/workers_HashrateHistoryItem"
                      }
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers/by-name/{subaccount}/{worker}": {
      "get": {
        "tags": [
          "workers"
        ],
        "summary": "Подробности воркера",
        "operationId": "workers_get_workers_by_name_subaccount_worker",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "subaccount",
            "in": "path",
            "required": true,
            "description": "Имя субаккаунта (не ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "path",
            "required": true,
            "description": "Имя воркера без префикса субаккаунта.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string",
              "default": "btc"
            }
          },
          {
            "name": "withHistory",
            "in": "query",
            "description": "Включить историю хешрейта.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Шаг графика и глубина: 15m — 3 дня; 1h — 7 дней; 1d — 30 дней.",
            "schema": {
              "type": "string",
              "default": "1h",
              "enum": [
                "15m",
                "1h",
                "1d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/workers_WorkerDetailResponse"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers/by-name/{subaccount}/{worker}/earnings": {
      "get": {
        "tags": [
          "workerearnings"
        ],
        "summary": "Начисления воркера",
        "operationId": "workerearnings_get_workers_by_name_subaccount_worker_earnings",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "subaccount",
            "in": "path",
            "required": true,
            "description": "Имя субаккаунта (не ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "path",
            "required": true,
            "description": "Имя воркера без префикса субаккаунта.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы, начиная с 1.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Размер страницы 1–100. Значения вне диапазона заменяются на 20.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/workerearnings_WorkerEarningPublic"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/workerearnings_Meta"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers/by-name/{subaccount}/{worker}/earnings/summary": {
      "get": {
        "tags": [
          "workerearnings"
        ],
        "summary": "Сводка начислений воркера",
        "operationId": "workerearnings_get_workers_by_name_subaccount_worker_earnings_summary",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "subaccount",
            "in": "path",
            "required": true,
            "description": "Имя субаккаунта (не ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "path",
            "required": true,
            "description": "Имя воркера без префикса субаккаунта.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/workerearnings_Summary"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workers/by-name/{subaccount}/{worker}/profile": {
      "get": {
        "tags": [
          "workerprofiles"
        ],
        "summary": "Профиль оборудования",
        "operationId": "workerprofiles_get_workers_by_name_subaccount_worker_profile",
        "description": "Право доступа: `manage_workers`. data может быть null, если профиль ещё не создан.",
        "x-permission": "manage_workers",
        "parameters": [
          {
            "name": "subaccount",
            "in": "path",
            "required": true,
            "description": "Имя субаккаунта (не ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "path",
            "required": true,
            "description": "Имя воркера без префикса субаккаунта.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string",
              "default": "btc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/workerprofiles_WorkerProfilePublic"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "workerprofiles"
        ],
        "summary": "Создать или изменить профиль оборудования",
        "operationId": "workerprofiles_put_workers_by_name_subaccount_worker_profile",
        "description": "Право доступа: `manage_workers`. coin передаётся в JSON. powerConsumptionWatts — Вт; дробная часть при сохранении отбрасывается.",
        "x-permission": "manage_workers",
        "parameters": [
          {
            "name": "subaccount",
            "in": "path",
            "required": true,
            "description": "Имя субаккаунта (не ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "path",
            "required": true,
            "description": "Имя воркера без префикса субаккаунта.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/workerprofiles_WorkerProfilePublic"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/workerprofiles_UpdateRequest"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "workerprofiles"
        ],
        "summary": "Удалить профиль оборудования",
        "operationId": "workerprofiles_delete_workers_by_name_subaccount_worker_profile",
        "description": "Право доступа: `manage_workers`. ",
        "x-permission": "manage_workers",
        "parameters": [
          {
            "name": "subaccount",
            "in": "path",
            "required": true,
            "description": "Имя субаккаунта (не ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "path",
            "required": true,
            "description": "Имя воркера без префикса субаккаунта.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string",
              "default": "btc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "История выплат",
        "operationId": "payments_get_payments",
        "description": "Право доступа: `read_payouts`. ",
        "x-permission": "read_payouts",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subaccount",
            "in": "query",
            "description": "Имя субаккаунта. Если не задано, фильтр не применяется.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы, начиная с 1.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Размер страницы 1–100. Значения вне диапазона заменяются на 20.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/payments_PaymentPublic"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/payments_ListPaymentsMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings": {
      "get": {
        "tags": [
          "earnings"
        ],
        "summary": "История начислений",
        "operationId": "earnings_get_earnings",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subaccount",
            "in": "query",
            "description": "Имя субаккаунта. Если не задано, фильтр не применяется.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы, начиная с 1.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Размер страницы 1–100. Значения вне диапазона заменяются на 20.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/earnings_EarningPublic"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/earnings_ListEarningsMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/payouts": {
      "get": {
        "tags": [
          "earnings"
        ],
        "summary": "Выплаты, сгруппированные по транзакции",
        "operationId": "earnings_get_earnings_payouts",
        "description": "Право доступа: `read_payouts`. ",
        "x-permission": "read_payouts",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subaccount",
            "in": "query",
            "description": "Имя субаккаунта. Если не задано, фильтр не применяется.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы, начиная с 1.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Размер страницы 1–100. Значения вне диапазона заменяются на 20.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/earnings_PayoutGroup"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/earnings_ListEarningsMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/summary": {
      "get": {
        "tags": [
          "earnings"
        ],
        "summary": "Сводка начислений и выплат",
        "operationId": "earnings_get_earnings_summary",
        "description": "Право доступа: `read_stats`. ",
        "x-permission": "read_stats",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/earnings_EarningsSummary"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/expenses": {
      "get": {
        "tags": [
          "expenses"
        ],
        "summary": "Список расходов",
        "operationId": "expenses_get_expenses",
        "description": "Право доступа: `manage_settings`. ",
        "x-permission": "manage_settings",
        "parameters": [
          {
            "name": "coin",
            "in": "query",
            "description": "Тикер монеты, например btc. В статистике: btc, ltc, doge, bch, rvn. DOGE использует статистику merged mining LTC.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subaccount",
            "in": "query",
            "description": "Имя субаккаунта. Если не задано, фильтр не применяется.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker",
            "in": "query",
            "description": "Имя воркера.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы, начиная с 1.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Размер страницы 1–100. Значения вне диапазона заменяются на 20.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/expenses_ExpensePublic"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/expenses_Meta"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "expenses"
        ],
        "summary": "Добавить расход",
        "operationId": "expenses_post_expenses",
        "description": "Право доступа: `manage_settings`. expenseDate — дата YYYY-MM-DD; amount — сумма в указанной currency.",
        "x-permission": "manage_settings",
        "parameters": [],
        "responses": {
          "201": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/expenses_ExpensePublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/expenses_CreateRequest"
              }
            }
          }
        }
      }
    },
    "/expenses/{id}": {
      "put": {
        "tags": [
          "expenses"
        ],
        "summary": "Изменить расход",
        "operationId": "expenses_put_expenses_id",
        "description": "Право доступа: `manage_settings`. Передавайте только изменяемые поля.",
        "x-permission": "manage_settings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Числовой ID записи.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/expenses_ExpensePublic"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/expenses_UpdateRequest"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "expenses"
        ],
        "summary": "Удалить расход",
        "operationId": "expenses_delete_expenses_id",
        "description": "Право доступа: `manage_settings`. ",
        "x-permission": "manage_settings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Числовой ID записи.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успешный ответ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некорректный запрос",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Ключ или секрет отсутствует, неверен, отозван, истёк либо IP не разрешён",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав доступа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Объект не найден",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Ошибка обработки запроса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "APIKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RuPool-API-Key"
      },
      "APISecret": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RuPool-API-Secret"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "success",
          "error",
          "message"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "earnings_EarningPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "subaccount": {
            "type": "string"
          },
          "coin": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "amountBtc": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "txId": {
            "type": "string"
          },
          "txUrl": {
            "type": "string"
          },
          "hashrate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "isPaid": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "subaccount",
          "coin",
          "amount",
          "txId",
          "txUrl",
          "isPaid",
          "type",
          "date"
        ]
      },
      "earnings_EarningsSummary": {
        "type": "object",
        "properties": {
          "totalEarnings": {
            "type": "number",
            "format": "double"
          },
          "totalPayouts": {
            "type": "number",
            "format": "double"
          },
          "unpaid": {
            "type": "number",
            "format": "double"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "totalEarnings",
          "totalPayouts",
          "unpaid",
          "count"
        ]
      },
      "earnings_ListEarningsMeta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "earnings_PayoutGroup": {
        "type": "object",
        "properties": {
          "txId": {
            "type": "string"
          },
          "txUrl": {
            "type": "string"
          },
          "coin": {
            "type": "string"
          },
          "totalAmount": {
            "type": "number",
            "format": "double"
          },
          "recordCount": {
            "type": "integer",
            "format": "int64"
          },
          "subaccounts": {
            "type": "string"
          },
          "date": {
            "type": "string"
          }
        },
        "required": [
          "txId",
          "txUrl",
          "coin",
          "totalAmount",
          "recordCount",
          "subaccounts",
          "date"
        ]
      },
      "expenses_CreateRequest": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string",
            "nullable": true,
            "example": "btc"
          },
          "subaccount": {
            "type": "string",
            "nullable": true,
            "example": "main"
          },
          "worker": {
            "type": "string",
            "nullable": true,
            "example": "rig1"
          },
          "category": {
            "type": "string",
            "example": "electricity"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "expenseDate": {
            "type": "string",
            "example": "2026-10-28"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "category",
          "amount",
          "currency",
          "expenseDate"
        ]
      },
      "expenses_ExpensePublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "coin": {
            "type": "string",
            "nullable": true
          },
          "subaccount": {
            "type": "string",
            "nullable": true
          },
          "worker": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency": {
            "type": "string"
          },
          "expenseDate": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "category",
          "amount",
          "currency",
          "expenseDate",
          "createdAt",
          "updatedAt"
        ]
      },
      "expenses_Meta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "expenses_UpdateRequest": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string",
            "nullable": true,
            "example": "btc"
          },
          "subaccount": {
            "type": "string",
            "nullable": true,
            "example": "main"
          },
          "worker": {
            "type": "string",
            "nullable": true,
            "example": "rig1"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "example": "electricity"
          },
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "example": "USD"
          },
          "expenseDate": {
            "type": "string",
            "nullable": true,
            "example": "2026-10-28"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "mining_CoinSummary": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string"
          },
          "coinName": {
            "type": "string"
          },
          "algorithm": {
            "type": "string"
          },
          "hashrate15m": {
            "type": "number",
            "format": "double"
          },
          "hashrate15mRedirected": {
            "type": "number",
            "format": "double"
          },
          "totalWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "onlineWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "offlineWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "unstableWorkers": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "coin",
          "coinName",
          "algorithm",
          "hashrate15m",
          "hashrate15mRedirected",
          "totalWorkers",
          "onlineWorkers",
          "offlineWorkers",
          "unstableWorkers"
        ]
      },
      "mining_MiningSummary": {
        "type": "object",
        "properties": {
          "coins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/mining_CoinSummary"
            }
          },
          "totalHashrate": {
            "type": "number",
            "format": "double"
          },
          "totalWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "onlineWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "offlineWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "unstableWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "earningsToday": {
            "type": "object",
            "additionalProperties": true
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "coins",
          "totalHashrate",
          "totalWorkers",
          "onlineWorkers",
          "offlineWorkers",
          "unstableWorkers",
          "earningsToday",
          "generatedAt"
        ]
      },
      "payments_ListPaymentsMeta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "payments_PaymentPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "subaccount": {
            "type": "string"
          },
          "coin": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "address": {
            "type": "string"
          },
          "txId": {
            "type": "string"
          },
          "txUrl": {
            "type": "string"
          },
          "isPaid": {
            "type": "boolean"
          },
          "paymentType": {
            "type": "integer",
            "format": "int64"
          },
          "hashrate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "subaccount",
          "coin",
          "amount",
          "address",
          "txId",
          "txUrl",
          "isPaid",
          "paymentType",
          "date"
        ]
      },
      "subaccounts_CreateSubaccountRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "example": "farm1"
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "subaccounts_SubaccountPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "uuid": {
            "type": "string"
          },
          "ownerId": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "wallets": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/subaccounts_WalletPublic"
                }
              ],
              "nullable": true
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "uuid",
          "ownerId",
          "name",
          "status",
          "isDefault",
          "createdAt",
          "updatedAt"
        ]
      },
      "subaccounts_UpdateSubaccountRequest": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "subaccounts_WalletPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "subaccountId": {
            "type": "integer",
            "format": "int64"
          },
          "coin": {
            "type": "string"
          },
          "payoutAddress": {
            "type": "string"
          },
          "minPayout": {
            "type": "number",
            "format": "double"
          },
          "autoPayoutEnabled": {
            "type": "boolean"
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "payoutFreezeUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "subaccountId",
          "coin",
          "payoutAddress",
          "minPayout",
          "autoPayoutEnabled",
          "createdAt",
          "updatedAt"
        ]
      },
      "usersettings_UpdateUserSettingsRequest": {
        "type": "object",
        "properties": {
          "defaultCoin": {
            "type": "string",
            "nullable": true,
            "example": "btc"
          },
          "defaultSubaccountId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "displayCurrency": {
            "type": "string",
            "nullable": true,
            "example": "usd"
          },
          "dashboardConfig": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "usersettings_UserSettingsPublic": {
        "type": "object",
        "properties": {
          "defaultCoin": {
            "type": "string"
          },
          "defaultSubaccountId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "displayCurrency": {
            "type": "string"
          },
          "dashboardConfig": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "defaultCoin",
          "displayCurrency"
        ]
      },
      "workerearnings_Meta": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "workerearnings_Summary": {
        "type": "object",
        "properties": {
          "totalAmount": {
            "type": "number",
            "format": "double"
          },
          "lastDate": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "totalGross": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "totalFee": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "totalNet": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "required": [
          "totalAmount",
          "lastDate",
          "count"
        ]
      },
      "workerearnings_WorkerEarningPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "coin": {
            "type": "string"
          },
          "subaccount": {
            "type": "string"
          },
          "worker": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "hashrateShare": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "earningDate": {
            "type": "string"
          },
          "sourcePaymentId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "grossAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "feeAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "feeRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "required": [
          "id",
          "coin",
          "subaccount",
          "worker",
          "amount",
          "earningDate",
          "createdAt"
        ]
      },
      "workerprofiles_UpdateRequest": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string",
            "example": "btc"
          },
          "deviceModel": {
            "type": "string",
            "nullable": true,
            "example": "Antminer S21"
          },
          "serialNumber": {
            "type": "string",
            "nullable": true
          },
          "purchaseDate": {
            "type": "string",
            "nullable": true,
            "example": "2026-10-28"
          },
          "purchasePrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "purchaseCurrency": {
            "type": "string",
            "nullable": true,
            "example": "USD"
          },
          "electricityCostKwh": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "electricityCurrency": {
            "type": "string",
            "nullable": true,
            "example": "USD"
          },
          "powerConsumptionWatts": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "coin"
        ]
      },
      "workerprofiles_WorkerProfilePublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "coin": {
            "type": "string"
          },
          "subaccount": {
            "type": "string"
          },
          "worker": {
            "type": "string"
          },
          "deviceModel": {
            "type": "string",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "nullable": true
          },
          "purchaseDate": {
            "type": "string",
            "nullable": true
          },
          "purchasePrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "purchaseCurrency": {
            "type": "string",
            "nullable": true
          },
          "electricityCostKwh": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "electricityCurrency": {
            "type": "string",
            "nullable": true
          },
          "powerConsumptionWatts": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "coin",
          "subaccount",
          "worker",
          "createdAt",
          "updatedAt"
        ]
      },
      "workers_CoinInfo": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "algorithm": {
            "type": "string"
          }
        },
        "required": [
          "symbol",
          "name",
          "algorithm"
        ]
      },
      "workers_HashrateHistoryItem": {
        "type": "object",
        "properties": {
          "hashrate": {
            "type": "number",
            "format": "double"
          },
          "sharesAccepted": {
            "type": "integer",
            "format": "int64"
          },
          "sharesRejected": {
            "type": "integer",
            "format": "int64"
          },
          "activeWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "hashrateRedirected": {
            "type": "number",
            "format": "double"
          },
          "recordedAt": {
            "type": "string"
          }
        },
        "required": [
          "hashrate",
          "sharesAccepted",
          "sharesRejected",
          "activeWorkers",
          "hashrateRedirected",
          "recordedAt"
        ]
      },
      "workers_Worker": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "coinSymbol": {
            "type": "string"
          },
          "subaccountName": {
            "type": "string"
          },
          "subaccountNormalized": {
            "type": "string"
          },
          "worker": {
            "type": "string"
          },
          "workerNormalized": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "hashrate15m": {
            "type": "number",
            "format": "double"
          },
          "hashrate1h": {
            "type": "number",
            "format": "double"
          },
          "hashrate24h": {
            "type": "number",
            "format": "double"
          },
          "sharesAccepted": {
            "type": "integer",
            "format": "int64"
          },
          "sharesRejected": {
            "type": "integer",
            "format": "int64"
          },
          "sharesStale": {
            "type": "integer",
            "format": "int64"
          },
          "rejectRate": {
            "type": "number",
            "format": "double"
          },
          "connectionsCount": {
            "type": "integer",
            "format": "int64"
          },
          "lastShareAt": {
            "type": "string",
            "nullable": true
          },
          "lastSeenAt": {
            "type": "string",
            "nullable": true
          },
          "firstSeenAt": {
            "type": "string",
            "nullable": true
          },
          "sessionStartedAt": {
            "type": "string",
            "nullable": true
          },
          "lastIp": {
            "type": "string",
            "nullable": true
          },
          "lastUserAgent": {
            "type": "string",
            "nullable": true
          },
          "lastDifficulty": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "redirected": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "coinSymbol",
          "subaccountName",
          "subaccountNormalized",
          "worker",
          "workerNormalized",
          "status",
          "isActive",
          "hashrate15m",
          "hashrate1h",
          "hashrate24h",
          "sharesAccepted",
          "sharesRejected",
          "sharesStale",
          "rejectRate",
          "connectionsCount",
          "lastShareAt",
          "lastSeenAt",
          "firstSeenAt",
          "lastIp",
          "lastUserAgent",
          "lastDifficulty",
          "createdAt",
          "updatedAt",
          "redirected"
        ]
      },
      "workers_WorkerDetailResponse": {
        "type": "object",
        "properties": {
          "worker": {
            "allOf": [
              {
                "$ref": "#/components/schemas/workers_Worker"
              }
            ],
            "nullable": true
          },
          "coin": {
            "allOf": [
              {
                "$ref": "#/components/schemas/workers_CoinInfo"
              }
            ],
            "nullable": true
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/workers_HashrateHistoryItem"
            }
          },
          "earnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/workers_WorkerEarningItem"
            }
          }
        },
        "required": [
          "worker"
        ]
      },
      "workers_WorkerEarningItem": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "hashrateHs": {
            "type": "number",
            "format": "double"
          },
          "coin": {
            "type": "string"
          }
        },
        "required": [
          "date",
          "amount",
          "hashrateHs",
          "coin"
        ]
      },
      "workers_WorkerStats": {
        "type": "object",
        "properties": {
          "totalWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "onlineWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "offlineWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "unstableWorkers": {
            "type": "integer",
            "format": "int64"
          },
          "totalHashrate": {
            "type": "number",
            "format": "double"
          },
          "totalHashrate24h": {
            "type": "number",
            "format": "double"
          },
          "avgHashrate": {
            "type": "number",
            "format": "double"
          },
          "totalShares": {
            "type": "integer",
            "format": "int64"
          },
          "rejectRate": {
            "type": "number",
            "format": "double"
          },
          "failedCoins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "totalWorkers",
          "onlineWorkers",
          "offlineWorkers",
          "unstableWorkers",
          "totalHashrate",
          "totalHashrate24h",
          "avgHashrate",
          "totalShares",
          "rejectRate"
        ]
      }
    }
  }
}
