API for Querying License Rewards

This feature is currently only available to premium partners, enabling efficient querying of the license rewards in bulk.

Prerequisite

Please make sure you obtain x-ak & x-sk issued by Aethir.

Query License Rewards

Description

Retrieves the rewards (including bonus rewards) for the specified license IDs from the previous day

URL

https://app.aethir.com/console-api/v2/client/query-daily-reward

Method

POST

Rate Limit

Each x-ak can make a request every 5 seconds.

Request Headers

Header
Type
Mandatory

x-ak

string

Yes

x-op-token

string

Yes

x-ak is a verification code issued to qualified premium partners.

x-op-token is consists of three parts

x-op-token = header.payload.signature
  • Header

    A compact JSON string encoded with base64, representing the header.

    {
      "alg": "HS256",  // Encryption algorithm, fixed as HS256
      "typ": "CHK_OP"  // Token type, fixed as CHK_OP
    }
  • Payload

    A compact JSON string encoded with base64, representing the payload.

    {
      "ak": "",       // Issued to nodeOperator's AK
      "exp": 1,       // Token expiration timestamp in ms, configured by the user
      "ip": "",       // Client IP
      "nonce": 1      // Random number generated by the user
    }
  • Signature

    signature = base64UrlEncode(HmacSHA256.sign(base64UrlEncode(header) + "." + base64UrlEncode(payload), sk))

    where skis a verification code issued to qualified premium partners.

Request Body

{
  "licenseIds": [licenseID1, licenseID2, ...]
}

Response

{
  "code": 135000,
  "msg": "OK",
  "data": {
    "dailyReward": {
      "1003": 0
    },
    "rewardDate": "2024-12-10"
  },
  "time": "2024-12-11 05:25:49"
}
Field
Type
Description

code

Number

API status code. 135000 indicates a successful request.

msg

String

Message indicating the result of the request.

data

Object

Contains the details of the reward data.

dailyReward

Object

Mapping of license IDs to their corresponding rewards.

rewardDate

String

Date for which the rewards are fetched (YYYY-MM-DD).

time

String

Timestamp when the response was generated (YYYY-MM-DD HH:MM:SS).

Last updated