Data API

Fetch block and transaction related data

The data API methods can be used to fetch block, transaction, and other related data from the chain. The available methods have been classified based on the endpoints and listed below.

Network

Fetch the list of available networks

Method: POST

URL: /network/list

Sample Request:

{
  "metadata": {}
}

Sample Response:

{
  "network_identifiers": [
    {
      "blockchain": "ont",
      "network": "mainnet"
    }
  ]
}

Fetch network options

Method: POST

URL: /network/options

Sample Request:

Sample Response:

Fetch the network status

Method: POST

URL: /network/status

Sample Request:

Sample Response:

Account

Fetch account balance

Method: POST

URL: /account/balance

Sample Request:

Sample Response:

Block

Fetch block details

Method: POST

URL: /block

Sample Request:

Please note that the transaction record consists of two operations, i.e. the from operation, and the to operation. The transaction amount for the from operation is negative, while the amount for the to operation is equal and positive.

The currency field contains token details. The two tokens are denoted in the following manner:

ONT Parameters

ONG Parameters

Fetch transaction information from a block

Method: POST

URL: /block/transaction

Sample Request:

Sample Response:

Mempool

Fetch all mempool transactions

Method: POST

URL: /mempool

Sample Request:

Sample Response:

Fetch details for a mempool transaction

Method: POST

URL: /mempool/transaction

Sample Request:

Sample Response:

Last updated