matroskin 0.1.0

whatsminer api client lib
Documentation
# set.device.custom_data

Set or update custom data fields, such as a customer-defined serial number (CustomerSn) or informational messages (msg0-msg9).

The key must be either `CustomerSn` or `msg` followed by a number from 0 to 9. The value must consist of printable characters.

Each `msg` field value must be less than 128 bytes in length.

## Parameters

| Name | Type | Description |
|------|------|-------------|
| param | Object | The container for the custom data. |
| param.key | String | The name of the custom data field to set. Valid values: `CustomerSn`, `msg0`, `msg1`, `msg2`, `msg3`, `msg4`, `msg5`, `msg6`, `msg7`, `msg8`, `msg9` |
| param.value | String | The value to assign to the custom data field. For `msg` fields, the length must be less than 128 bytes. |

## Examples

### Request

```json
{
    "cmd": "set.device.custom_data",
    "param": {
        "key": "CustomerSn",
        "value": "CUSTSN-12345"
    },
    "ts": 419304089,
    "token": "Y0Ijoro/",
    "account": "super"
}
```

### Response

```json
{
    "code": 0,
    "when": 3521,
    "msg": "ok",
    "desc": "set.device.custom_data"
}
```