# Miningpool API

## Basic Information

### Interface Address

● Method for obtaining the key&#x20;

a. Log in to the official website and go to the “Account Management” to find the “Access Key” option. After obtaining it, please make sure to keep your private key secure.

● Online Environment&#x20;

a. Official website online：<https://api.spiderpool.com/&#x20>;

### Description

● H、KH、MH、GH、TH、PH、EH，Hashrate units differ by 1000

### Attention

● All interfaces are requested using private key signing and public key verification&#x20;

● Unified request format

```json
{
    "dataJson": "", 
    "accessKey": "", 
    "timestamp": 1628381288000,
    "sign": ""
}
```

For example, when accessing the `/v2/addUser` interface

```json
{
    "dataJson": "{"userName":"test001","password":"123456"}",
    "accessKey": "D1504708600B44B499489C16CE7C32A5",
    "timestamp": 1628381288000,
    "sign": "N0n0iqKLUtssteqhbsOHGv2N7UaJh+YnPio90fciAM4hn2L82jAhafG/ynxdgFnBf2ZJ2R2C1d0uRvSNSHnEJKA8rvMx6ytQa2E4gpD8LG0kkdzYwgv9pyEFOGsS4+cUdV+nF/WJiPDRqfx8Cb0gPjBuCj+HboVx5++HOe2v+sA="
}
```

● Unified return format

```json
{
    "code": "",
    "msg": "",
    "data": object,
}
```

**code="SUCCESS"** indicates a successful operation; any other responses indicate failure.

● Request Example&#x20;

{% tabs %}
{% tab title="Java" %}
{% file src="/files/DwyflKcLxzPYuLl893aw" %}

```
    long timestamp = System.currentTimeMillis();
    String spiderUrl = "https://api.spiderpool.com/v2/subaccount/createSubaccount";
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("coin", "eth");
    jsonObject.put("subaccount", "chizg101");
    jsonObject.put("walletAddress", "0x9ed670910a8e5895428bb85e600d7d388a904a22");

    Map<String, Object> param = new HashMap<>();
    String dataJsonStr = jsonObject.toJSONString() + "|" + timestamp;
    String sign = RSACoder.sign(dataJsonStr.getBytes(StandardCharsets.UTF_8), privateKey);

    param.put("dataJson", jsonObject.toJSONString());
    param.put("accessKey", "5A842DAA0B8A4746B362FBF382A04CD9");
    param.put("timestamp", timestamp);
    param.put("sign", sign);

    String jsonBody = JSON.toJSONString(param);

    String reslut = HttpclientUtil.postRequest(spiderUrl, jsonBody,null,true);
```

{% endtab %}

{% tab title="Python" %}

```
    import requests
    from Crypto.PublicKey import RSA
    from Crypto.Signature import PKCS1_v1_5
    from Crypto.Hash import MD5
    import base64
    import time
    import calendar
    datajson = "{'subAccountName':'test0414dan08','coin':'eth'}"
    timestamp = str(int(round(calendar.timegm(time.gmtime())*1000)))
    data = datajson + "|%s" % (timestamp)
    #private key
    privatekey='''MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJpigNWb2r6fbue9CfnaRyundft0WS4e/hhtdCef74UdH9stDtRidv24hieP7uXdq8KHVmzqAqiNVAHsg4WttwO9Fyz0YPuJZ/mXLqI0S4SOzGZ7hqErDOOF1Z9WE/ykapGAT/SBc5q0lLN6Z3iz7AygZYy4UxrH3cR2BsrUEyGnAgMBAAECgYBNTxpY3Uzyu//bh+xg849EKv2Hx8GIuPhg3x6VYR+eNvFm3e9ZJ12SvD5hvU/SR+jk5sS+kYh3Qx5YQEm0PUMxjyRkBpZUVitkBpRvBaQKfRvS9D65rUlUYhgHnyhwdvmIvJYob9dB+HkOgZMqEwWrWqe4B8E4i8ei9fwLkVSn0QJBAPHUljaXd4gvtkJVExlKB4u7irTEVjwTi9Nbh2pUWk3jgb1/Ua0kbNtQ0vEiBtQ6ROOSqbPoBCiH5YwR0KKjw2UCQQCjbj9Z98wUEXIao2EQ11U4T281B9vqUSYPBR4u7UVEDkeEyxL0gzXmqJc8pAmgCygSi0Ggg5xxD5TjoW+4xg4bAkEAjeE9qBXBiWMEuXIUXHf0aWTEgj3WojSNiplen2GSAbSCv9zc3IpMW3fV6qcd/pGZLTM04Vo0Zlskr8Mb9u/BiQJAcR60Nt+voAxbQFjprLB/ShShUsF31H4Kq8bNF4ofsXV4x0+QdTIEsvzqgYzBJMfUGtHMwP+X3yH72ns5S1m7FQJAKCWFdZzN9D+2HX7yZsc4/Q7l+J//LpZJjLsVhcDh3RGRU3QX6SzCWlLwOq4FX+nUYej2B3rr0ymr+tiy/k7fbQ==
    '''
    private_keyBytes = base64.b64decode(privatekey)
    prikey = RSA.importKey(private_keyBytes)
    signer = PKCS1_v1_5.new(prikey)
    hash_obj = MD5.new(data.encode('utf-8'))
    signtrue = base64.b64encode(signer.sign(hash_obj))
    sign = str(signtrue)[2:-1]
    url = "https://api.spiderpool.com/v2/subaccount/createSubaccount"
    data = {
        "dataJson": datajson,
        "accessKey": "5A842DAA0B8A4746B362FBF382A04CD9",
        "timestamp": timestamp,
        "sign": sign
    }
    result = requests.post(url,json=data)
    print(result.text)
```

{% endtab %}

{% tab title="Node" %}

```
const http = require('http');
const crypto = require('crypto');
const privateKey = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAM8WblrosGzrRPSo+xBiL1zMCimpq64nqw66Wh4Z3lG1WIAfe+mes3oFzLsiOuPALCUZHbaMQ9fC7gcgQIL8PtlPRnuqxO1VrKDPE1hCN2cy+7HuSgWMrhnkgP11eVrDFEV4c9ugA1pl9e/4s2F3QCuCKCCrDh+lFTcwLOB+/jqbAgMBAAECgYEAme0ZX9c/c+Y4XgbQfvAMNlSvZSJpqsxveEYJwAAIYQGDY9CDITZGP3faImqiDTGFXpnZnRuLPe/1TzSo3vOxniuW2Bdyu7gn39b6/bmwveIUVzHG3K5VUMV5r8uGiFoPkbl9jQmBBluAWhPsEdMMibdW+WGXsMiLigVdocCDF9ECQQD7SQMY4op0UuaUjFY3oPs5zTXzupopMFxMFxIn4WnZYTruRXFnJnzS2r+Cm6t+TdjXES0kHjky2ml5FSVfVLMjAkEA0vkgZTh/jGFSQ619Fa3TYzSa8TNGw309pXnXWQRKJO6USmWKOfdONp1u0aN/QlsFCGi8OmjTxeL8KsNWAEHuKQJAHqWr/Af9LOzDdJCdH1HB8i3GC8DRdn6QczNJIpYKa9nA7ziG+TaneKv3OX2078Wc0bYllEcfYMVkocDjevoAkwJBAIuVCDnwB3N5cFQWlIujVhhs1ZZ/tnHgisjQtAnRLL0CnFoclDeFx9maj5dj9O6SCeJmaSK7+GEUrIIeeufwtwECQQCq5yGYqnuXHQSra6qSpoC+65AyROVdDhXWRPdroFFbtTdE9EdaKImgac4B2ARKMGsKSXNXSXStHneN1R7n+iX/"

const signer = (json) => {
    const privateKeys = "-----BEGIN PRIVATE KEY-----\n" + privateKey + "\n-----END PRIVATE KEY-----"
    const sign = crypto.createSign('md5');
    sign.update(json);
    return sign.sign(privateKeys, 'base64');
}

const jsonObject = JSON.stringify({
    queryTime: 1620732754
})
const timestamp = new Date().valueOf()
const dataJsonStr = `${jsonObject}|${timestamp}`
const sign = signer(dataJsonStr)
const postData = JSON.stringify({
    dataJson: jsonObject,
    accessKey: "AF7180A7203F49779052F1D1336EBE3C",
    timestamp: timestamp,
    sign: sign
});
const options = {
    hostname: 'https://api.spiderpool.com',
    path: '/v2/game/getData',
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Content-Length': Buffer.byteLength(postData)
    }
};
const req = http.request(options, (res) => {
    res.setEncoding('utf8');
    res.on('data', (chunk) => {
        console.log(`Response body: ${chunk}`);
    });
});
// Translate the data into the request body
req.write(postData);
req.end();

```

{% endtab %}

{% tab title="Php" %}

```
$private = 'PRIVATE_KEY';
$dataJson = json_encode([
    'walletAddress' => 'eth_address',
    'subaccount' => 'sub_account_name',
    'coin' => 'eth',
]);
$timestamp = round(microtime(true) * 1000);
if (openssl_sign($dataJson . '|' . $timestamp, $signature, $private, OPENSSL_ALGO_MD5)) {
    $signature = base64_encode($signature);
    $httpClient = new \GuzzleHttp\Client(['timeout' => 10]);
    $response = $httpClient->post('https://api.spiderpool.com/v2/subaccount/createSubaccount', [
        \GuzzleHttp\RequestOptions::BODY => json_encode([
            'dataJson' => $dataJson,
            'accessKey' => 'ACCESS_KEY',
            'timestamp' => $timestamp,
            'sign' => $signature,
        ]),
    ]);

    dd($response->getBody()->getContents());
}
dd('fail');

```

{% endtab %}
{% endtabs %}

## API

### Create Subaccount

#### **Request `AUTH`**

`POST /v2/subaccount/createSubaccount`

#### **Parameters**

<table><thead><tr><th width="153" align="center">Name</th><th width="87" align="center">Type</th><th width="105" align="center">Required</th><th width="88" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency, e.g. btc,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount (5-20 lowercase alphanumeric characters)</td></tr><tr><td align="center">walletAddress</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">Wallet address (please fill in the address that complies with the chain environment)</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": "SUCCESS"
}
```

* Error Response：

```json
{
    "code": "......", // INVALID_SUBACCOUNT / SUBACCOUNT_EXIST / IVAILD_WALLETADDRESS
    "msg": "......"
}
```

### Modify Subaccount

#### **Request `AUTH`**

`POST /v2/subaccount/modifyWalletAddress`

#### **Parameters**

<table><thead><tr><th width="218" align="center">Name</th><th width="102" align="center">Type</th><th width="113" align="center">Required</th><th width="90" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency, e.g.，btc,eth,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">newWalletAddress</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">New wallet address(please fill in the address that complies with the rules according to the chain environment))</td></tr></tbody></table>

* Correct Response：

```json
{
    "code": "SUCCESS"
}
```

* Error response：

```json
{
    "code": "......", // INVALID_SUBACCOUNT / SUBACCOUNT_EXIST / IVAILD_WALLETADDRESS
    "msg": "......"
}
```

### Observer Pattern

#### **Request `AUTH`**

`POST /v2/subaccount/subAccountObserverLink`

#### **Parameters**

<table><thead><tr><th width="135" align="center">Name</th><th width="82" align="center">Type</th><th width="98" align="center">Required</th><th width="90" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g. btc,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">type</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Type：newSign for adding、resetSign for resetting、deleteSign deleting</td></tr></tbody></table>

* Correct Response：

```json
{
	"code":"SUCCESS",
	"data":{
		"subaccount":"btctestchizg002",
		"sign":"v92480670d100d4c67f9e22d6ae612fd3e78aebb6e1b1fcdba994ba454ade6482",
		"coin":"btc"
	}
}
```

* Error Response：

```json
{
    "code": "......", // INVALID_SUBACCOUNT / SUBACCOUNT_EXIST / IVAILD_WALLETADDRESS
    "msg": "......"
}
```

### Get Subaccount list

#### **Request `AUTH`**

`POST /v2/sp/subaccount/list`

#### **Parameters**

<table><thead><tr><th width="177" align="center">Name</th><th width="114" align="center">Type</th><th width="105" align="center">Required</th><th width="88" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr></tbody></table>

* Correct Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748485449635,
    "data": [
        {
            "subaccount": "test",
            "coin": "btc",
            "withdrawAddress": "3CBZ7ayUBz8cUiGfA3F5Fcgo2RQdKYPk94"
        },
        ...
    ],
    "success": true
}
```

### Get Subaccount pagination List - With hashrate

#### **Request `AUTH`**

`POST /v2/sp/subaccount/pageWithHashRate`

#### **Parameters**

<table><thead><tr><th width="170.60003662109375" align="center">Name</th><th width="114" align="center">Type</th><th width="105" align="center">Required</th><th width="88" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">Subaccount name,Supports fuzzy query</td></tr><tr><td align="center">showStatus</td><td align="center">Integer</td><td align="center">false</td><td align="center">1</td><td align="center">0: Hide subaccounts,1: Show</td></tr><tr><td align="center">pageNumber</td><td align="center">Integer</td><td align="center">false</td><td align="center">1</td><td align="center">Page number</td></tr><tr><td align="center">pageSize</td><td align="center">Integer</td><td align="center">false</td><td align="center">10</td><td align="center">page Size</td></tr></tbody></table>

* Correct Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748485522530,
    "data": {
        "total": 4,
        "list": [
            {
                "subaccount": "test",
                "coin": "btc",
                "walletAddress": "3CBZ7ayUBz8cUiGfA3F5Fcgo2RQdKYPk94",
                "realtimeHashrate": "3747113236364438.3",    // Realtime Hashrate(H/s)
                "avgHashrate1440": "3354490437959777.1",     // Average Hashrate over 24 hours
                "activeWorkerNum": 882,     //The number of online workers
                "inactiveWorkerNum": 118    //The number of offline workers
            },
            ...
        ]
    },
    "success": true
}
```

### Get Subaccount Profit Detail Information

#### **Request `AUTH`**

(The scheduled task starts at 4:30, it is recommended to fetch data after 5:30)&#x20;

`POST /v2/subaccount/getSubaccountProfitDetailInfo`

#### **Parameters**

<table><thead><tr><th width="178" align="center">Name</th><th width="92" align="center">Type</th><th width="104" align="center">Required</th><th width="136" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">startTimestamp</td><td align="center">Integer</td><td align="center">false</td><td align="center">0</td><td align="center">Query start timestamp (seconds)</td></tr><tr><td align="center">endTimestamp</td><td align="center">Integer</td><td align="center">false</td><td align="center">Current time Query end timestamp (seconds)</td><td align="center"></td></tr><tr><td align="center">pageNumber</td><td align="center">Integer</td><td align="center">false</td><td align="center">1</td><td align="center">Page number</td></tr><tr><td align="center">pageSize</td><td align="center">Integer</td><td align="center">false</td><td align="center">10</td><td align="center">Number of entries per page</td></tr><tr><td align="center">bizType</td><td align="center">String</td><td align="center">false</td><td align="center">alone_mining</td><td align="center">Business type (used by FB coin). alone_mining: single mining; join_mining: joint mining</td></tr></tbody></table>

* Correct Response：

```json
{
    "code": "SUCCESS",
    "data": {
        "total": 35,
        "dayProfitList": [
            {
                "dayDate": 1569600000000,
                "avgHashrate": "90057979829",
                "dayProfit": 0.647981779,
            },
            ......
        ]
    }
}
```

### Get Subaccount Payment Record

#### **Request `AUTH`**

`POST /v2/subaccount/getSubaccountPaymentRecord`

#### **Parameters**

<table><thead><tr><th width="168" align="center">Name</th><th width="102" align="center">Type</th><th width="100" align="center">Required</th><th width="126" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g., btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">startTimestamp</td><td align="center">Integer</td><td align="center">false</td><td align="center">0</td><td align="center">Query start timestamp (milliseconds)</td></tr><tr><td align="center">endTimestamp</td><td align="center">Integer</td><td align="center">false</td><td align="center">currentTime</td><td align="center">Query end timestamp (milliseconds)</td></tr><tr><td align="center">pageNumber</td><td align="center">Integer</td><td align="center">false</td><td align="center">1</td><td align="center">Page number</td></tr><tr><td align="center">pageSize</td><td align="center">Integer</td><td align="center">false</td><td align="center">10</td><td align="center">Number of entries per page</td></tr></tbody></table>

* Correct Response：

```json
{
    "code": "SUCCESS",
        "data": {
        "list": [
            {
                "paymentDate": 1564531200000, // Payment time
                "paymentAddress": "mv8W2k7UMkqbHbfbvRXcEzaehPGvZCmkV5" // Payment address
                "paymentMoney": 0.0666348000, // Payment amount
                "txId": "097a39595c261f141de2174d8639fd9c18122236b14f9d08c91e82aea2a87e61", // Transaction Id
            }
        ],
            "total": 1 // Total number of records
    }
}
```

### Get Subaccount Profit Information

#### **Request `AUTH`**

`POST /v2/subaccount/getSubaccountProfitInfo`

#### **Parameters**

<table><thead><tr><th width="149" align="center">Name</th><th width="78" align="center">Type</th><th width="90" align="center">Required</th><th width="91" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">bizType</td><td align="center">String</td><td align="center">false</td><td align="center">alone_mining</td><td align="center">Business type (used by FB coin). alone_mining: single mining; join_mining: joint mining</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": "SUCCESS",
    "data": {
            "yesterdayProfit": 0.61505330, // 24-hour profit
            "unpaidProfit": 0.57536600,    // Unpaid profit
            "totalProfit": 26.026078521,   // Total profit
            "dayEstimateProfit": 0.57536600 //profit for today. fb not support
    }
}
```

### Get Subaccount Day Profit Information

#### **Request `AUTH`**

`POST` /v2/sp/subaccount/getDayProfitDetailInfo

#### **Parameters**

<table><thead><tr><th width="149" align="center">Name</th><th width="78" align="center">Type</th><th width="90" align="center">Required</th><th width="132" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">timeStamp</td><td align="center">int</td><td align="center">true</td><td align="center"></td><td align="center">UTC+0</td></tr><tr><td align="center">bizType</td><td align="center">String</td><td align="center">false</td><td align="center">alone_mining</td><td align="center">Business type (used by FB coin). alone_mining: single mining; join_mining: joint mining</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1717677079167,
    "data": {
        "day": 1716854400,
        "coin": "btc",
        "userName": "test",
        "avgShareAccept": 6792538500482.84,
        "dayProfit": 0.0000052632731696429,
        "ppsDayProfit": 0.00000505032710936514,
        "pplnsDayProfit": 0.00000021294606027776,
        "difficult": "84381461788831" //fb coin not support
    }
}
```

### Get Subaccount Hour Profit Information

#### **Request `AUTH`**

`POST` /v2/sp/subaccount/getHourProfitDetailInfo

#### **Parameters**

<table><thead><tr><th width="149" align="center">Name</th><th width="78" align="center">Type</th><th width="90" align="center">Required</th><th width="91" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">timeStamp</td><td align="center">int</td><td align="center">true</td><td align="center"></td><td align="center">UTC+0</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1717677390714,
    "data": {
        "day": 1716861600,
        "coin": "btc",
        "userName": "test",
        "ppsDayProfit": 0.00000021294606027776
    }
}
```

### Get Main Account Realtime Hashrate

#### **Request**&#x20;

`POST /v2/sp/hashrate/user/realHashRate`

#### **Parameters**

<table><thead><tr><th width="140" align="center">Name</th><th width="97" align="center">Type</th><th width="100" align="center">Required</th><th width="103" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
        "msg": "Success",
        "t": 1748487057257,
	"data":{
                "hashRate": "4120389144707508.906",    // H/s
                "staleRate": "0.00189",                
                "rejectRate": "0.001716",              
                "secondTimestamp": 1748484576
        },
        "success": true
}

```

### Get Subaccount Realtime Hashrate

#### **Request**&#x20;

`POST /v2/sp/hashrate/subaccount/realHashRate`

#### **Parameters**

<table><thead><tr><th width="153" align="center">Name</th><th width="103" align="center">Type</th><th width="108.60003662109375" align="center">Required</th><th width="77.39996337890625" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount Name</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748485059326,
    "data": {
        "subaccount": "test",
        "hashRate": "3764743203804501.3",    // H/s
        "staleRate": "0.003499",             
        "rejectRate": "0.007297",            
        "secondTimestamp": 1748485059,
        "lastShareTime": 1748484468
    },
    "success": true
}

```

### Get Subaccount Full Hashrate

#### **Request**&#x20;

`POST /v2/sp/hashrate/subaccount/fullHashRate`

#### **Parameters**

<table><thead><tr><th width="125" align="center">Name</th><th width="86.20001220703125" align="center">Type</th><th width="94.20001220703125" align="center">Required</th><th width="139" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount Name</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748487379592,
    "data": {
        "subaccount": "test",
        "hashRate10": "3832641468476948.48",        //Average hashrate in 10 minutes(H/s)
        "staleRate10": "0.00303",                   
        "rejectRate10": "0.008857",                 
        "hashRateHour": "3438555662139319.18",      //Average hashrate in 1 hour(H/s)
        "staleRateHour": "0.002197",                
        "rejectRateHour": "0.007173",               
        "hashRateDay": "3356108141020665.17",       //Average hashrate in 24 hour(H/s)
        "staleRateDay": "0.002946",                 
        "rejectRateDay": "0.005107",               
        "lastShareTime": 1748486880
    },
    "success": true
}
```

### Get Subaccount Hashrate chart

#### **Request**&#x20;

`POST /v2/sp/hashrate/subaccount/hashRateChart`

#### **Parameters**

<table><thead><tr><th width="112.20001220703125" align="center">Name</th><th width="87" align="center">Type</th><th width="110.20001220703125" align="center">Required</th><th width="115.79998779296875" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">timeLevel</td><td align="center">String</td><td align="center">false</td><td align="center">day_30</td><td align="center">hour_24：24 hour for 10-minute data<br>day_7：7 day for 1-hour data<br>day_30：30 day for 1-day data<br>day_90：90 day for 1-day data</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748487567538,
    "data": [
        {
            "subaccount": "test",
            "hashRate": "3340571201268661.6",             // H/s
            "staleRate": "0.003044",                      
            "rejectRate": "0.005074",                    
            "secondTimestamp": 1745884800,             
            "lastShareTime": 1745971190
        },
        ...
    ],
    "success": true
}
```

### Get Subaccount historical Hashrate chart

#### **Request**&#x20;

`POST /v2/sp/hashrate/subaccount/timeRangeHashRateChart`

#### **Parameters**

<table><thead><tr><th width="137.79998779296875" align="center">Name</th><th width="103" align="center">Type</th><th width="97.4000244140625" align="center">Required</th><th width="96.60003662109375" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">timeLevel</td><td align="center">String</td><td align="center">false</td><td align="center">day</td><td align="center">day：Day-level data,Data for the past year<br>hour：Hourly level data,Data for the past 30 days</td></tr><tr><td align="center">startTimestamp</td><td align="center">Long</td><td align="center">true</td><td align="center"></td><td align="center">start timestamp</td></tr><tr><td align="center">endTimestamp</td><td align="center">Long</td><td align="center">true</td><td align="center"></td><td align="center">end timestamp</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748487891624,
    "data": [
        {
            "subaccount": "test",
            "hashRate": "2385258781180243.8",        // H/s
            "staleRate": "0.00299",                  
            "rejectRate": "0.00494",                
            "secondTimestamp": 1748304000,
            "lastShareTime": 1748390397
        },
        ...
    ],
    "success": true
}
```

### Get Subaccount online/offline workers count

#### **Request**&#x20;

`POST /v2/sp/hashrate/subaccount/onOffLineWorkerCount`

#### **Parameters**

<table><thead><tr><th width="138.60003662109375" align="center">Name</th><th width="103" align="center">Type</th><th width="99" align="center">Required</th><th width="87.79998779296875" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748488319658,
    "data": {
        "subaccount": "test",
        "totalWorkerCount": 1000,    
        "onlineWorkerCount": 903,    
        "offlineWorkerCount": 97     
    },
    "success": true
}
```

### Get Subaccount workers list

#### **Request**&#x20;

`POST /v2/sp/hashrate/worker/list`

#### **Parameters**

<table><thead><tr><th width="149" align="center">Name</th><th width="103" align="center">Type</th><th width="105.4000244140625" align="center">Required</th><th width="98.199951171875" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">workerName</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">worker name, supporting fuzzy query</td></tr><tr><td align="center">sortField</td><td align="center">String</td><td align="center">false</td><td align="center">worker_name</td><td align="center">worker_name<br>minute_hash_rate<br>day_hash_rate<br>day_stale_rate<br>day_reject_rate<br>share_time</td></tr><tr><td align="center">sortRule</td><td align="center">String</td><td align="center">false</td><td align="center">asc</td><td align="center">asc<br>desc</td></tr><tr><td align="center">status</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">online<br>offline</td></tr><tr><td align="center">pageNum</td><td align="center">Integer</td><td align="center">false</td><td align="center">1</td><td align="center">page number</td></tr><tr><td align="center">pageSize</td><td align="center">Integer</td><td align="center">false</td><td align="center">10</td><td align="center">page size</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748490725324,
    "data": {
        "total": 1000,   
        "pageNum": 1,         
        "pageSize": 10,      
        "pages": 100,       
        "records": [
            {
                "subaccount": "test",  
                "workerName": "w-1",   
                "minuteHashRate": "3182613716008.96",    
                "minuteStaleRate": "0",    
                "minuteRejectRate": "0",    
                "hourHashRate": "3178790002069.04",
                "hourStaleRate": "0",
                "hourRejectRate": "0",
                "dayHashRate": "3352794785964.9",
                "dayStaleRate": "0.007917",
                "dayRejectRate": "0.009978",
                "lastShareTime": 1748490153,
                "status": "online"
            },
            ...
        ]
    },
    "success": true
}
```

### Get Subaccount Worker Hashrate Chart

#### **Request**&#x20;

`POST /v2/sp/hashrate/worker/hashRateChart`

#### **Parameters**

<table><thead><tr><th width="138.5999755859375" align="center">Name</th><th width="97.39996337890625" align="center">Type</th><th width="95.79998779296875" align="center">Required</th><th width="116.60009765625" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">workerName</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">worker name</td></tr><tr><td align="center">timeLevel</td><td align="center">String</td><td align="center">false</td><td align="center">day_30</td><td align="center">hour_24：24 hour for 10-minute data<br>day_7：7 day for 1-hour data<br>day_30：30 day for 1-day data<br>day_90：90 day for 1-day data</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1748492183299,
    "data": [
        {
            "subaccount": "test",    
            "workerName": "w-1",     
            "hashRate": "3517727395943.1",   
            "staleRate": "0.007917",    
            "rejectRate": "0",          
            "secondTimestamp": 1745884800, 
            "lastShareTime": 1745970909  
        },
        ...
    ],
    "success": true
}
```

### Get Subaccount Worker Daily Share Number

#### **Request**&#x20;

`POST /v2/sp/hashrate/worker/dailyShareCount`

#### **Parameters**

<table><thead><tr><th width="173" align="center">Name</th><th width="103" align="center">Type</th><th width="75" align="center">Required</th><th width="135" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">timeStamp</td><td align="center">int</td><td align="center">true</td><td align="center">-</td><td align="center">UTC+0</td></tr><tr><td align="center">pageNum</td><td align="center">Integer</td><td align="center">false</td><td align="center">1</td><td align="center">page number</td></tr><tr><td align="center">pageSize</td><td align="center">Integer</td><td align="center">false</td><td align="center">10</td><td align="center">page size，max 1000</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": 200,
    "msg": "Success",
    "t": 1768210318542,
    "data": {
        "total": 1000,
        "pageNum": 1,
        "pageSize": 10,
        "pages": 100,
        "records": [
            {
                "coin": "btc",
                "day": 1764547200,
                "workerName": "w-1",
                "acceptShareNumber": 418, 
                "rejectShareNumber": 1,
                "staleShareNumber": 2
            },
            ...
        ]
    },
    "success": true
}
```

### Get Priority on-chain Fees

#### **Request**

`POST` /v2/sp/txPriorityChain/getChainingFee

#### **Parameters**

<table><thead><tr><th width="141" align="center">Name</th><th width="86" align="center">Type</th><th width="106" align="center">Required</th><th width="175" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">txHash</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">tx hash</td></tr><tr><td align="center">informEmail</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">User email</td></tr><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">btc fb</td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
	"msg": "Success",
	"t": 1718250294397,
	"data": {
		"coin": "btc", //coin
		"curTxSize": 110, //tx size
		"unconfirmedPreTxSize": 110,
		"unit": "btc", //fee currency
		"totalFee": 0.00009721, //Actual fees paid
		"theoreticalPayAmount": 0.00003584, //Theoretical fees paid
		"txHash": "d0b0c82931c5c34fccb1f4acd42cadc999450921a1a3925ba6dce20ce10598f9", //tx hash
		"informEmail": "test@test.com", //User email
		"timeout": 6000 //Order expiration time seconds
	},
	"success": true
}

```

### Priority on-chain

#### **Request**

`POST` /v2/sp/txPriorityChain/submit

#### **Parameters**

<table><thead><tr><th width="141" align="center">Name</th><th width="86" align="center">Type</th><th width="106" align="center">Required</th><th width="175" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">btc fb</td></tr><tr><td align="center">txHash</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">tx hash</td></tr><tr><td align="center">informEmail</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">User email</td></tr><tr><td align="center">curTxSize</td><td align="center">Integer</td><td align="center">true</td><td align="center"></td><td align="center">tx size</td></tr><tr><td align="center">totalFee</td><td align="center">BigDecimal</td><td align="center">true</td><td align="center"></td><td align="center">Actual fees paid</td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
	"msg": "Success",
	"t": 1718253030928,
	"data": {
		"coin": "btc", //coin
		"txHash": "d0b0c82931c5c34fccb1f4acd42cadc999450921a1a3925ba6dce20ce10598f9", //tx hash
		"curTxSize": 110, //tx size
		"unconfirmedPreTxSize": 110,
		"currency": "btc", //fee currency
		"totalFee": 0.00009721, //Actual fees paid
		"theoreticalPayAmount": 0.00003584, //Theoretical fees paid
		"informEmail": "test@test.com", //User email
		"status": 3, //Order status 3: Paid 4: Accelerating 5: Already on the chain
		"createTime": 1718253029277 //order time
	},
	"success": true
}

```

### Get Priority on-chain Order List

#### **Request**

`POST` /v2/sp/txPriorityChain/queryOrderPage

#### **Parameters**

<table><thead><tr><th width="161" align="center">Name</th><th width="86" align="center">Type</th><th width="106" align="center">Required</th><th width="175" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">pageNumber</td><td align="center">Integer</td><td align="center">true</td><td align="center"></td><td align="center">pageNumber</td></tr><tr><td align="center">pageSize</td><td align="center">Integer</td><td align="center">true</td><td align="center"></td><td align="center">pageSize</td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
	"msg": "Success",
	"t": 1718254361407,
	"data": {
		"total": 3,
		"list": [
			{
				"coin": "BTC",
				"txHash": "d0b0c82931c5c34fccb1f4acd42cadc999450921a1a3925ba6dce20ce10598f9",
				"curTxSize": 110,
				"unconfirmedPreTxSize": 110,
				"currency": "BTC",
				"totalFee": 0.00009721,
				"theoreticalPayAmount": 0.00003584,
				"informEmail": "test@test.com",
				"status": 5, //Order status 3: Paid 4: Accelerating 5: Already on the chain
				"blockHeight": 847608,
				"blockTime": 1718185820,
				"createTime": 1718253029000
			}
		]
	},
	"success": true
}

```

### Get Priority on-chain Order Detail

#### **Request**

`POST` /v2/sp/txPriorityChain/orderDetail

#### **Parameters**

<table><thead><tr><th width="161" align="center">Name</th><th width="86" align="center">Type</th><th width="106" align="center">Required</th><th width="175" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">txHash</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">tx hash</td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
	"msg": "Success",
	"t": 1718253030928,
	"data": {
		"coin": "BTC",
		"txHash": "d0b0c82931c5c34fccb1f4acd42cadc999450921a1a3925ba6dce20ce10598f9",
		"curTxSize": 110,
		"unconfirmedPreTxSize": 110,
		"currency": "BTC",
		"totalFee": 0.00009721,
		"theoreticalPayAmount": 0.00003584,
		"informEmail": "test@test.com",
		"status": 3,		
		"blockHeight": 847608,
		"blockTime": 1718185820,
		"createTime": 1718253029277
	},
	"success": true
}

```

### Get Priority on-chain Account Info

#### **Request**

`POST` /v2/sp/txPriorityChain/accountInfo

#### **Parameters**

<table><thead><tr><th width="161" align="center">Name</th><th width="86" align="center">Type</th><th width="106" align="center">Required</th><th width="175" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
	"msg": "Success",
	"t": 1718254872915,
	"data": [
		{
			"currency": "BTC",
			"availableBalance": 4.99882903,
			"totalConsumeAmount": 0.00117097
		}
	],
	"success": true
}
```

### broadcastTransaction

#### **Request**

`POST`  /v2/sp/txPriorityChain/submitRawTransaction

#### **Parameters**

<table><thead><tr><th width="140" align="center">Name</th><th width="124" align="center">Type</th><th width="100" align="center">Required</th><th width="188" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true </td><td align="center"></td><td align="center">btc</td></tr><tr><td align="center">rawTransactionList</td><td align="center">List</td><td align="center">true</td><td align="center"></td><td align="center">rawTransactionList</td></tr><tr><td align="center">isPrivate</td><td align="center">bool</td><td align="center">false</td><td align="center">false</td><td align="center">Private transactions are not broadcast to other nodes</td></tr></tbody></table>

* Successful Response：

```json
{
	"code": 200,
	"msg": "Success",
	"t": 1751597387279,
	"data": ["hash1", "hash2"], //Broadcast successful transaction ID
	"success": true
}
```

### IncomeDistributeUserList

#### **Request**

`POST` /v2/sp/incomeDistribute/userList

#### **Parameters**

<table><thead><tr><th width="163">Name</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>coin</td><td>String</td><td>true</td><td></td><td>coin</td></tr><tr><td>subaccount</td><td>String</td><td>true</td><td></td><td>subaccount</td></tr></tbody></table>

* Successful Response：

```json
{
	"code":200,
	"msg":"Success",
	"t":1740535004319,
	"data":[
		{
			"toSubAccount":"ceshi1",
			"percentage":"50",
			"remark":"ceshi"
		},
		{
			"toSubAccount":"ceshi23",
			"percentage":"15",
			"remark":"15"
		}
	],
	"success":true
}
```

### IncomeDistributeDelete

#### **Request**

`POST` /v2/sp/incomeDistribute/delete

#### **Parameters**

<table><thead><tr><th width="163">Name</th><th width="108">Type</th><th width="109">Required</th><th width="85">Default</th><th>Description</th></tr></thead><tbody><tr><td>coin</td><td>String</td><td>true</td><td></td><td>coin</td></tr><tr><td>subaccount</td><td>String</td><td>true</td><td></td><td>subaccount</td></tr><tr><td>toSubAccount</td><td>String</td><td>true</td><td></td><td>subaccount that accept income</td></tr></tbody></table>

* Successful Response：

```json
{
	"code":200,
	"msg":"Success",
	"t":1740535239034,
	"data":null,
	"success":true
}
```

### AddOrUpdateIncomeDistribute

#### **Request**

`POST` /v2/sp/incomeDistribute/upsert

#### **Parameters**

<table><thead><tr><th width="163">Name</th><th width="108">Type</th><th width="109">Required</th><th width="79">Default</th><th>Description</th></tr></thead><tbody><tr><td>coin</td><td>String</td><td>true</td><td></td><td>coin</td></tr><tr><td>subaccount</td><td>String</td><td>true</td><td></td><td>subaccount</td></tr><tr><td>toSubAccount</td><td>String</td><td>true</td><td></td><td>subaccount that accept income</td></tr><tr><td>percentage</td><td>String</td><td>true</td><td></td><td>percentage: 0.01-100</td></tr><tr><td>remark</td><td>String</td><td>false</td><td></td><td>max length: 20</td></tr></tbody></table>

* Successful Response：

```json
{
	"code":200,
	"msg":"Success",
	"t":1740535239034,
	"data":null,
	"success":true
}
```

### IncomeDistribute-RemainingPercent

#### **Request**

`POST` /v2/sp/incomeDistribute/remainingPercent

#### **Parameters**

<table><thead><tr><th width="163">Name</th><th width="108">Type</th><th width="109">Required</th><th width="79">Default</th><th>Description</th></tr></thead><tbody><tr><td>coin</td><td>String</td><td>true</td><td></td><td>coin</td></tr><tr><td>subaccount</td><td>String</td><td>true</td><td></td><td>subaccount</td></tr></tbody></table>

* Successful Response：

```json
{
	"code":200,
	"msg":"Success",
	"t":1740536889868,
	"data":7E+1,
	"success":true
}
```

### IncomeDistribute-QueryTransferIncomeRecorder

#### **Request**

`POST` /v2/sp/incomeDistribute/transferIncome

#### **Parameters**

<table><thead><tr><th width="163">Name</th><th width="108">Type</th><th width="109">Required</th><th width="79">Default</th><th>Description</th></tr></thead><tbody><tr><td>coin</td><td>String</td><td>true</td><td></td><td>coin</td></tr><tr><td>subaccount</td><td>String</td><td>true</td><td></td><td>subaccount</td></tr><tr><td>timestamp</td><td>Integer</td><td>true</td><td></td><td>UTC+0 0 o'clock second-level timestamp</td></tr></tbody></table>

* Successful Response：

<pre class="language-json"><code class="lang-json"><strong>{
</strong>	"code": 200,
	"msg": "Success",
	"t": 1758533264479,
	"data": [{
		"subaccount": "test2",
		"coin": "btc",
		"amount": "0.0000091000",
		"timestamp": 1757899834,
		"address": "tb1q……mz7t"
	}],
	"success": true
}
</code></pre>

## Deprecate API

The following AP ls are to be deprecated.If you are still using them, please follow the instructions to\
switch to the corresponding new interfaces.

### Get Subaccount Information

Deprecated. Please use [Get Subaccount pagination List - With hashrate](#get-subaccount-pagination-list-with-hashrate)

#### **Request `AUTH`**

`POST /v2/subaccount/getSubaccountInfo`

#### **Parameters**

<table><thead><tr><th width="250" align="center">Name</th><th width="114" align="center">Type</th><th width="90" align="center">Required</th><th width="81" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc,eth,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">false</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">isGetSubaccountDetailInfo</td><td align="center">Boolean</td><td align="center">false</td><td align="center">-</td><td align="center">Whether to get details</td></tr></tbody></table>

* Successful Response：

```json
{
    "code": "SUCCESS", 
    "data": [
      {
        "coin": "btc",
        "subaccount": "test001",
        "walletAddress": "33Vxq5DN4vAXkv7swDp4zNZJWkazsDgwLq",
        "realtimeHashrate": "9789798686766", // Real-time hashrate
        "avgHashrate1440": "88667987952", // 24-hour average hashrate
        "activeWorkerNum": 100,//Number of active miners
        "inactiveWorkerNum": 10,//Number of inactive miners
     
      },
    ......
]
}

```

### Get subaccount hashrate detailed information

Deprecated. Please use [Get Subaccount Hashrate chart](#get-subaccount-hashrate-chart)

#### **REQUEST `AUTH`**

`POST /v2/subaccount/getSubaccountHashrateDetailInfo`

#### **PARAMETERS**

<table><thead><tr><th width="136" align="center">Name</th><th width="80" align="center">Type</th><th width="102" align="center">Required</th><th width="96" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Abbreviation of the cryptocurrency, e.g.，btc,eth,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">mode</td><td align="center">String</td><td align="center">false</td><td align="center">hourly</td><td align="center">mode=hourly indicates a 24-hour chart, mode=daily indicates a 30-day chart</td></tr></tbody></table>

* Correct response：

```json
{
    "code": "SUCCESS",
    "data": {
         "coin": "btc",
         "subaccount": "btc_test001",
         "startTime": 1569674700000,
         "timeInterval": 3600, // 
         "hashrates": ["86989808092", "87758098015", "88708080889", "87167897971", ......],
    }
}

```

### Get Subaccount Worker Information

Deprecated. Please use [Get Subaccount workers list](#get-subaccount-workers-list)

#### **Request `AUTH`**

`POST /v2/worker/getSubaccountWorkerDetailInfo`

#### **Parameters**

<table><thead><tr><th width="141" align="center">Name</th><th width="80" align="center">Type</th><th width="96" align="center">Required</th><th width="90" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc,eth,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr></tbody></table>

* Successful Response：

```json
{
  "code": "SUCCESS", 
  "data": [
    {
      "workerName": "test001",
      "realtimeHashrate": "2079080822",
      "avgHashrate1440": "20979879837",
      "avgRejectrate1440": 0.001,
      "status": "active", // Status: active: online; inactive: offline; lost: lost connection
      "lastShareTime": 1578653368,
    },
    ......
]
}

```

### Get Subaccount Worker Hashrate Detailed Information

Deprecated. Please use [Get Subaccount Worker Hashrate Chart](#get-subaccount-worker-hashrate-chart)

#### **Request**

`POST /v2/worker/getSubaccountWorkerHashrateDetailInfo`

#### **Parameters**

<table><thead><tr><th width="141" align="center">Name</th><th width="86" align="center">Type</th><th width="106" align="center">Required</th><th width="175" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Currency abbreviation, e.g.，btc,eth,fb</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Subaccount name</td></tr><tr><td align="center">worker</td><td align="center">String</td><td align="center">true</td><td align="center">-</td><td align="center">Miner name</td></tr><tr><td align="center">mode</td><td align="center">String</td><td align="center">false</td><td align="center">hourly mode=hourlyfor 24-hour chart, mode=daily for 30-day chart (BTC only)</td><td align="center"></td></tr></tbody></table>

* Successful Response：

```json
{
    "code": "SUCCESS",
    "data": {
        "startTime": 1581742800000,
		"timeInterval": 3600,
		"hashrates": [
			"32369622321725",
			"30336747489926"
		]
	}
}

```

### getHashrate

Deprecated. Please use [Get Subaccount historical Hashrate chart](#get-subaccount-historical-hashrate-chart)

#### **Request**

`POST` /v2/subaccount/getHashrate

#### **Parameters**

<table><thead><tr><th width="182" align="center">Name</th><th width="122" align="center">Type</th><th width="106" align="center">Required</th><th width="153" align="center">Default</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">coin</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">coin</td></tr><tr><td align="center">subaccount</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">subaccount</td></tr><tr><td align="center">mode</td><td align="center">String</td><td align="center">true</td><td align="center"></td><td align="center">day/hour</td></tr><tr><td align="center">startTimestamp</td><td align="center">Integer</td><td align="center">true</td><td align="center"></td><td align="center"></td></tr><tr><td align="center">endTimestamp</td><td align="center">Integer</td><td align="center">false</td><td align="center"></td><td align="center"></td></tr></tbody></table>

* Successful Response：

```json
{ 
    "code": "SUCCESS", 
    "data": [ 
        { 
            "coin": "btc", 
            "userName": "test01", 
            "timestamp": 1709078400, 
            "shareAcceptDiff": 47710208,
            "shareRejectDiff": 47710208,
            "shareAcceptHashRate": 683045943484525.2, // H/s
            "shareRejectHashRate": 683045943484525.2, // H/s
            "rejectRate": 1,
        }, 
        ...... 
    ] 
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.spiderpool.com/spiderpool-api/miningpool-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
