Skip to main content

GetAddrType

Retrieve the type of the current account, whether it is staked, whether it is invested, and whether rewards can currently be claimed.

Parameter​

  • id: Pass-through information
  • jsonrpc: json version
  • params:
    • addr: Query Address
{
"id":"1",
"jsonrpc":"2.0",
"params":{"addr":"0xadc2A709EC1413eCcEB4d115E50BD9ebBA35E3Ce"}
}

Response​

  • id:
  • jsonrpc: json version
  • method: method name
  • result:
    • code:
      • 0 success
      • -1 Database abnormal, Get invest addrs by node failed!
      • -2 The account number to be invested have been invested by 999 people
      • -3 Database abnormal, Get bonus addr invest utxos by bonusAddr failed
      • -4 Database abnormal, Get transaction by hash failed
      • -5 Failed to parse transaction body
    • message: error message
    • isBonus: Whether rewards can currently be claimed
    • isQualified: Whether the account is eligible to claim rewards
    • isInvested: Whether the account has invested
    • isStaked: Whether the account is staked
{
"id": "1",
"jsonrpc": "2.0",
"method": "GetAddrType",
"result": {
"code": 0,
"isBonus": false,
"isInvested": true,
"isQualified": true,
"isStaked": true,
"message": "success"
}
}