Ontology Developer Center
DISCOVERCOMMUNITYSUPPORT
  • Introduction
  • Discover Ontology
  • Getting Started
  • Glossary
  • Decentralized Identity and Data
    • ONT ID
      • Decentralized Identifiers
        • Method Specification for Ontology
        • Method Specification for Ethereum
        • Method Specification for BSC
      • Verifiable Credentials
        • Anonymous Credentials
      • ONT Login
        • Scenarios
        • Protocol Specification
        • Front-end JavaScript SDK
          • Integration and Usage
          • API Reference
        • Front-end UI SDK
          • Integration and Usage
          • API Reference
        • Back-end Go SDK
          • Integration and Usage
          • API Reference
        • Back-end Java SDK
          • Integration and Usage
          • API Reference
      • ONT TAG
        • Workflow
        • API Reference
      • Mercury
      • OScore
    • DDXF
      • Components and Interfaces
      • GREP
      • Overall Scheme
      • Solutions
        • Marketplace
          • Deployment
          • Scenarios
          • SaaS Tenant
          • Java SDK
        • Data Storage
          • Deployment
          • Java SDK
        • Resource Auditor
        • Offline Judge
      • Use Cases
        • E-Shops
  • ONTOLOGY ELEMENTS
    • Smart Contracts
      • Types of smart contracts
    • Token Protocols
    • Consensus Mechanism
    • Ontology Oracle
      • Oracle Process Flow
  • GUIDES & TUTORIALS
    • Development Guides
      • dApp Development
        • Using the dAPI
        • Data Synchronization
      • Smart Contract Development
        • EVM Contract
          • Development Environment and Tools
          • Wallet Setup
          • Contract Development
          • How to Deploy a Smart Contract with GetBlock
        • NeoVM Contract
          • Development tools and environment
          • Launching the IDE
          • Writing and editing program logic
          • Deploying and testing on private net
        • WASM Contract
          • Development Environment
          • Project Initiation - Hello World
          • Creating your own project
          • Development using SmartX
          • Runtime API
          • Contract Fundamentals
          • Inter-contract Interaction
          • Developing Contracts in C++
        • Publish Contract Source Code
    • Integration Guides
      • dApp Integration
        • dAPI Integration
          • Chrome Plugin
          • Mobile wallet dApp
          • QR code mechanism
          • Wake call mechanism
        • Cocos 2D-x
        • Unity 3D applications
      • Mobile Wallet Integration
        • SDK integration
        • dAPI Integration
          • In-wallet applications
          • QR code mechanism
          • Wake call mechanism
        • Stake
      • Using ONT ID
      • Exchange Integration
        • Exchange Docking Guide
        • Exchange API
      • Ontology for dApp Stores
    • EVM & Token Decimals Upgrade
  • ONTOLOGY NODE
    • Abstract
    • Node Deployment
      • Standard Node
      • Rosetta Node
    • Interacting with a Public Node
  • DEVELOPER TOOLS
    • dApp Development Framework
      • Punica CLI
      • Punica boxes
      • Solo Chain
    • IDE
    • APIs
      • HTTP API
        • Restful
        • WebSocket
        • Remote Procedure Call (RPC)
      • Explorer v2 API
        • Block
        • Address
        • Contract
        • Token
        • Transactions
        • ONT ID
        • Summary
        • Node
      • Native Token API
        • ONT Contract API
        • ONG Contract API
      • ONT ID Contract API
      • Web3 API
      • OScore Open API
      • Rosetta Node API
        • Data API
        • Construction API
      • DToken Contract API
      • DDXF
        • Marketplace Contract API
        • Storage API
      • Governance API
    • Digital Wallet
      • Chrome Plugin provider
      • Chrome Plugin dAPI
      • Mobile version provider
      • Mobile version dAPI
    • SDKs
    • Signing Server
      • Installation
      • API reference
  • COMMUNITY
    • Ecosystem Programs
    • Community Libraries
    • Community Events
    • Community Channels
    • Core Contributors
  • SUPPORT
    • FAQ
      • Basic blockchain concepts
      • Ontology Nodes
      • Ontology token protocols
      • Smart contracts
      • SDKs and APIs
    • Contact Us
Powered by GitBook
On this page
  • 1. Get Round History of a Node
  • 2. Get incentives information of a node
  • 3. Get incentives information of a node using its public key
  • 4. Query On-Chain Configuration of Registered Nodes
  • 5. Get Staking Rewards of an Address (Supported from Round 244)
  • 6.Get Address Staking Snapshot (Supported from Round 244)

Was this helpful?

  1. DEVELOPER TOOLS
  2. APIs
  3. Explorer v2 API

Node

1. Get Round History of a Node

url:/v2/nodes/round-history?page_size=5&page_number=1
method:GET
Request Parameter
Type
Description

page_number

int

current page number, starting from 1

page_size

int

entries on each page

Example response

{
    "code": 0,
    "msg": "SUCCESS",
    "result": {
        "rnd_history_list": [
            {
                "id": 63,
                "rnd_start_blk": 8574300,
                "rnd_end_blk": 8634299,
                "rnd_start_time": 1592737389,
                "cycle": 85
            },
            {
                "id": 62,
                "rnd_start_blk": 8514300,
                "rnd_end_blk": 8574299,
                "rnd_start_time": 1591858049,
                "rnd_end_time": 1592737388,
                "cycle": 84
            },
            {
                "id": 61,
                "rnd_start_blk": 8454300,
                "rnd_end_blk": 8514299,
                "rnd_start_time": 1590983140,
                "rnd_end_time": 1591858045,
                "cycle": 83
            },
            {
                "id": 60,
                "rnd_start_blk": 8394300,
                "rnd_end_blk": 8454299,
                "rnd_start_time": 1590252541,
                "rnd_end_time": 1590983110,
                "cycle": 82
            },
            {
                "id": 59,
                "rnd_start_blk": 8334300,
                "rnd_end_blk": 8394299,
                "rnd_start_time": 1589414958,
                "rnd_end_time": 1590252540,
                "cycle": 81
            }
        ],
        "count": 11
    }
}
Response Parameter
Type
Description

code

int

error code

msg

String

if successful returns SUCCESS, if failed returns failure description

result

String

if successful returns round history, if failed returns ""

2. Get incentives information of a node

url:/v2/nodes/inspire/all?page_number=1&page_size=10
method:GET
Request Parameter
Type
Description

page_number

int

current page number, starting from 1

page_size

int

entries on each page

Example Response

{
    "code": 0,
    "msg": "SUCCESS",
    "result": {
        "total": 48,
        "records": [
            {
                "public_key": "02107546a6a21ac45ebc3e5cdb96f100fb1efac548339926c5ab05dde175e720f4",
                "address": "ALMCC2PCT9YjzMyftvt9ifvK8jKteQfXoY",
                "name": "Node_021075",
                "status": 1,
                "current_stake": 102500,
                "node_released_ong_incentive": 8731,
                "node_released_ong_incentive_rate": "4.06%",
                "user_released_ong_incentive": 78580,
                "user_released_ong_incentive_rate": "1463.22%",
                "node_gas_fee_incentive": 0,
                "node_gas_fee_incentive_rate": "0.00%",
                "user_gas_fee_incentive": 0,
                "user_gas_fee_incentive_rate": "0.00%",
                "node_foundation_bonus_incentive": 19926,
                "node_foundation_bonus_incentive_rate": "9.28%",
                "user_foundation_bonus_incentive": 0,
                "user_foundation_bonus_incentive_rate": "0.00%"
            },
            {
                "public_key": "0223c8669cc98e82284ac2f6197c17bbd587e259260f71ffeb3e1ee5358f3c1cc7",
                "address": "AXwfq4jnhvByDmvuFhFzHSSdKJ3GQTwZ8Z",
                "name": "Node_0223c8",
                "status": 1,
                "current_stake": 893000,
                "node_released_ong_incentive": 608538,
                "node_released_ong_incentive_rate": "283.29%",
                "user_released_ong_incentive": 152134,
                "user_released_ong_incentive_rate": "8.93%",
                "node_gas_fee_incentive": 0,
                "node_gas_fee_incentive_rate": "0.00%",
                "user_gas_fee_incentive": 0,
                "user_gas_fee_incentive_rate": "0.00%",
                "node_foundation_bonus_incentive": 173599,
                "node_foundation_bonus_incentive_rate": "80.81%",
                "user_foundation_bonus_incentive": 0,
                "user_foundation_bonus_incentive_rate": "0.00%"
            },
            {
                "public_key": "02299bd4cf2c81f3e724ba267d5d4e6fbd68cf1282fd4811922a6fb7bb7661df82",
                "address": "AczZ2AmTeAPgpsZZKzT6USBPJ93Er9ThBW",
                "name": "Node_02299b",
                "status": 1,
                "current_stake": 10000,
                "node_released_ong_incentive": 8518,
                "node_released_ong_incentive_rate": "39.65%",
                "user_released_ong_incentive": 0,
                "user_released_ong_incentive_rate": "0.00%",
                "node_gas_fee_incentive": 0,
                "node_gas_fee_incentive_rate": "0.00%",
                "user_gas_fee_incentive": 0,
                "user_gas_fee_incentive_rate": "0.00%",
                "node_foundation_bonus_incentive": 1944,
                "node_foundation_bonus_incentive_rate": "9.05%",
                "user_foundation_bonus_incentive": 0,
                "user_foundation_bonus_incentive_rate": "0.00%"
            }
        ]
    }
}
Response Parameter
Type
Description

code

int

error code

msg

String

if successful returns SUCCESS, if failed returns failure description

result

String

if successful returns incentive details, if failed returns ""

3. Get incentives information of a node using its public key

url:/v2/nodes/inspire?public_key={public_key}
method:GET
Request Parameter
Type
Description

public_key

String

public key of a node

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "result": {
        "public_key": "02107546a6a21ac45ebc3e5cdb96f100fb1efac548339926c5ab05dde175e720f4",
        "address": "ALMCC2PCT9YjzMyftvt9ifvK8jKteQfXoY",
        "name": "Node_021075",
        "status": 1,
        "current_stake": 102500,
        "node_released_ong_incentive": 8731,
        "node_released_ong_incentive_rate": "4.06%",
        "user_released_ong_incentive": 78580,
        "user_released_ong_incentive_rate": "1463.22%",
        "node_gas_fee_incentive": 0,
        "node_gas_fee_incentive_rate": "0.00%",
        "user_gas_fee_incentive": 0,
        "user_gas_fee_incentive_rate": "0.00%",
        "node_foundation_bonus_incentive": 19926,
        "node_foundation_bonus_incentive_rate": "9.28%",
        "user_foundation_bonus_incentive": 0,
        "user_foundation_bonus_incentive_rate": "0.00%"
    }
}
Response Parameter
Type
Description

code

int

error code

msg

String

if successful returns SUCCESS, if failed returns failure description

result

String

if successful returns incentive details, if failed returns ""

Fields in an incentive details object:

Field Name
Type
Description

public_key

String

public key of the node

address

String

wallet address of the node

name

String

node name

status

int

node type, 1 represents candidate node, 2 represents consensus node

current_stake

long

current stake of a node

node_released_ong_incentive

long

ONG incentive released to a node

node_released_ong_incentive_rate

String

ONG incentive earnings yield ratio of a node

user_released_ong_incentive

long

ONG incentive released to a user

user_released_ong_incentive_rate

String

ONG incentive earnings yield ratio of a user

node_gas_fee_incentive

long

gas fee received by a node

node_gas_fee_incentive_rate

String

gas fee earnings yield ratio of a node

user_gas_fee_incentive

long

gas fee received by a user

user_gas_fee_incentive_rate

String

gas fee earnings yield ratio of a user

node_foundation_bonus_incentive

long

foundation bonus received by a node

node_foundation_bonus_incentive_rate

String

foundation bonus earnings yield ratio of a node

user_foundation_bonus_incentive

long

foundation bonus received by a user

user_foundation_bonus_incentive_rate

String

foundation bonus earnings yield ratio of a user

4. Query On-Chain Configuration of Registered Nodes

url:/v2/nodes/node-on-chain-config?address={address}&public_key={public_key}  
method:GET
Request Parameters
Type
Description

address

String

Node staking wallet address

public_key

String

Node public key (operator wallet)

Response

{
  "code": 0,
  "msg": "SUCCESS",
  "result": {
    "node_apr": "3371.95%",
    "user_apr": "63966.44%",
    "fee_sharing_ratio_node_t": "90%",
    "fee_sharing_ratio_node_t1": "90%",
    "fee_sharing_ratio_node_t2": "90%",
    "fee_sharing_ratio_user_t": "5%",
    "fee_sharing_ratio_user_t1": "5%",
    "fee_sharing_ratio_user_t2": "5%",
    "promise_stake": "10000",
    "node_stake": "10000",
    "user_stake": "82",
    "total_stake": "10082",
    "cap": "100000",
    "reward": "5444.9085037",
    "withdrawable_amount": "100",
    "locked_amount": "100000",
    "current_round": 234
  }
}
Response Parameter
Type
Description

node_apr

String

Node public key

user_apr

String

Node name

fee_sharing_ratio_node_t

String

Node stake's fee sharing ratio for node in round T

fee_sharing_ratio_node_t1

String

Node stake's fee sharing ratio for node in round T+1

fee_sharing_ratio_node_t2

String

Node stake's fee sharing ratio for node in round T+2

fee_sharing_ratio_user_t

String

User stake's fee sharing ratio for node in round T

fee_sharing_ratio_user_t1

String

User stake's fee sharing ratio for node in round T+1

fee_sharing_ratio_user_t2

String

User stake's fee sharing ratio for node in round T+2

promise_stake

String

Initial stake amount (non-reducible, withdrawn upon cancelling the node)

node_stake

String

Node stake amount

user_stake

String

User stake amount

total_stake

String

Node stake amount + user stake amount

cap

String

Maximum allowed amount of user stake

reward

String

ONG rewards from node staking

withdrawable_amount

String

Amount of ONT that can be withdrawn (or null)

locked_amount

String

Amount of ONT locked (or null)

current_round

Int

Current staking round


5. Get Staking Rewards of an Address (Supported from Round 244)

uri:/v2/nodes/staking-rewards?address={address}&public_key={public_key}&round={round}
method:GET
Request Parameters
Type
Required
Description

address

String

Required

Staking wallet address

public_key

String

Optional

Node public key

round

Int

Optional

Staking round

Response

{
  "code": 0,
  "msg": "SUCCESS",
  "result": [
    {
      "address": "ALD7JkG8MMCkqwJys2eWgHLJME9oyXEz17",
      "public_key": "0239a0816bc5f989f0cc74146ada8d396bee75753267cdc9ce3b4c4f57c83d5e33",
      "rewards": "2.122491966",
      "round": 244
    },
    {
      "address": "ALD7JkG8MMCkqwJys2eWgHLJME9oyXEz17",
      "public_key": "0239a0816bc5f989f0cc74146ada8d396bee75753267cdc9ce3b4c4f57c83d5e33",
      "rewards": "8.651644582",
      "round": 244
    }
  ]
}
Response Parameter
Type
Description

address

String

Staking wallet address

public_key

String

Node public key

rewards

String

ONG rewards

round

Int

Staking round

6.Get Address Staking Snapshot (Supported from Round 244)

uri:/v2/nodes/staking-snapshot?address={address}&public_key={public_key}&round={round}
method:GET
Request Parameters
Type
Required
Description

address

String

required

staking wallet address

public_key

String

option

node public key

round

int

option

staking round

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "result": [
        {
            "address": "AXkf8gnKpYkvCWvLThvEnKpt8PHjMaNpsX",
            "public_key": "023c2e07eeaf3b3576d8fa60f860fab22304f8779771a80f0bf01274d05decd001",
            "rewards": "0",
            "staked": 0,
            "processing": 0,
            "unstaking": 500,
            "withdrawable": 500,
            "round": 247
        },
        {
            "address": "AXkf8gnKpYkvCWvLThvEnKpt8PHjMaNpsX",
            "public_key": "023c2e07eeaf3b3576d8fa60f860fab22304f8779771a80f0bf01274d05decd001",
            "rewards": "0",
            "staked": 500,
            "processing": 0,
            "unstaking": 1000,
            "withdrawable": 0,
            "round": 246
        }
    ]
}
Field_Name
Type
Description

address

String

staking wallet address

public_key

String

node public key

rewards

String

ONG rewards

staked

String

valid stakeing ONT amount

processing

String

processing ONT amount

unstaking

String

unstaking ONT amount

withdrawable

String

withdrawable ONT amount

round

int

staking round

PreviousSummaryNextNative Token API

Last updated 3 months ago

Was this helpful?