Skip to content

Blockchain

Endpoint Overview

Method Endpoint Description
GET /v1/blockchain/networks Lists all supported blockchain networks.
GET /v1/blockchain/balance/{network}/{address} Retrieves the balance of an address on a given blockchain network.
GET /v1/blockchain/transactionstatus/{network}/{transactionId} Retrieves the confirmation status of a transaction.
GET /v1/blockchain/transactioninfo/{network}/{transactionId} Provides detailed transaction information including fees, sender, receiver, and timestamp.
GET /latest/block/{network} Retrieves the latest block details (block hash and block number) for a specified network.
GET /latest/blocknumber/{network} Retrieves the latest block number for a specified network.
GET /latest/blockhash/{network} Retrieves the latest block hash for a specified network.
GET /blocknumber/{network}/{blockhash} Retrieves the block number for a given block hash on a specified network.
GET /blockhash/{network}/{blocknumber} Retrieves the block hash for a given block number on a specified network.

Retrieve Supported Networks

/v1/blockchain/networks

Purpose: Lists all supported blockchain networks, including their short identifiers, names, and native symbols.

Example Requests

GET /v1/blockchain/networks

Example Response

json
{
  "data": [
    {
      "network": "ERC20",
      "networkName": "Ethereum",
      "nativeContractAddress": "ETHEREUM", // Unique identifier assigned by Omnibit since native tokens typically lack a contract address
      "nativeSymbol": "ETH",
      "nativeTokenId": 7312
    }
    //...
  ],
  "success": true,
  "timestamp": 1740651646093,
  "requestId": "4c4e31d8-bba3-49ed-a997-321c5c2c2a16",
  "message": ""
}

Retrieve Address Balance

/v1/blockchain/balance/{network}/{address}

Purpose: Queries the balance of a specific address on the specified blockchain network.
Note: You must provide at least one query parameter (symbol, tokenId, or contractAddress).

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "TRX").
address string Yes Blockchain wallet address.

Query Parameters:

Name Type Mandatory Description
symbol string No* Token symbol (e.g., "TRX").
tokenId number Mandatory* Token ID (e.g., 825).
contractAddress string No Contract address of the token.

Note: At least one query parameter (symbol, tokenId, or contractAddress) must be provided.

Example Requests

http
GET /v1/blockchain/balance/TRX/TBFNPitRKTbRxGYXZu?symbol=TRX

Example Response

json
{
  "data": {
    "network": "TRX",
    "name": "TRON",
    "symbol": "TRX",
    "balance": 142.922878,
    "tokenId": 1958
  },
  "success": true,
  "timestamp": 1740653173034,
  "requestId": "1847989f-dcba-42ef-942a-33b746c357e4",
  "message": ""
}

Retrieve Transaction Status

/v1/blockchain/transactionstatus/{network}/{transactionId}

Purpose: Checks the status of a specific transaction on the blockchain.
Possible Statuses: CONFIRMED, PROCESSING, FAILED, ERROR.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "TRX").
transactionId string Yes Unique transaction hash/ID on the blockchain.

Example Requests

http
GET /v1/blockchain/transactionstatus/TRX/57d952ed1741bfd7...

Example Response

json
{
  "data": "CONFIRMED",
  "success": true,
  "timestamp": 1740653267894,
  "requestId": "a38289ff-0e36-4fcd-9276-625fcad762e3",
  "message": ""
}

Retrieve Transaction Information

/v1/blockchain/transactioninfo/{network}/{transactionId}

Purpose: Provides detailed information about a transaction, including fee details, confirmation status, block data, and transfer information.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "ERC20").
transactionId string Yes Unique transaction hash/ID on the blockchain.

Example Requests

http
GET /v1/blockchain/transactioninfo/ERC20/0x8f1191513d568aba769063985ace4b2acce621bd90a41a02f7cf956937da9f28

Example Response

json
{
  "data": {
    "transactionId": "0x8f1191513d568aba769063985ace4b2acce621bd90a41a02f7cf956937da9f28",
    "network": "ERC20",
    "fee": 0.0000411846999984,
    "feeSymbol": "ETH",
    "feeTokenId": 7312,
    "status": "CONFIRMED",
    "confirmations": 311722,
    "blockNumber": 21820786,
    "blockHash": "0xbebb9ea682c3d32b0526331cfd419b7f4c07a0e5966896428e0955f24e1f45d3",
    "timestamp": 1739246807000,
    "transfers": [
      {
        "fromAddress": "0x294ab63f30c53f970da1d02668ef14ca3d17b6ce",
        "toAddress": "0xa902ab3c5bd69198066b1e895eafa85ae409282e",
        "amount": 0.0100000002,
        "tokenSymbol": "ETH",
        "tokenId": 7312,
        "contractAddress": "ETHEREUM",
        "transferType": "NATIVE"
      }
    ]
  },
  "success": true,
  "timestamp": 1743009263272,
  "requestId": "76b45d30-3b03-46a7-9163-f22f301168c0",
  "message": "",
  "error": null
}

Retrieve Latest Block Details

/latest/block/{network}

Purpose: Retrieves the latest block details for the specified blockchain network.
Details: Returns a block object containing the block hash and block number.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "SPL").

Example Requests

http
GET /v1/blockchain/latest/block/SPL

Example Response

json
{
  "data": {
    "blockNumber": 329344003,
    "blockHash": "4whrxxTDjrzMvqoAkbws5HGHyjcnfKcd8gg6LeCV1i6v"
  },
  "success": true,
  "timestamp": 1743010216111,
  "requestId": "3f45abbb-bd6f-44c8-9514-c69f20c536fc",
  "message": "",
  "error": null
}

Retrieve Latest Block Number

/latest/blocknumber/{network}

Purpose: Retrieves the latest block number for the specified blockchain network.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "ERC20").

Example Requests

http
GET /v1/blockchain/latest/blocknumber/ERC20

Example Response

json
{
  "data": 22132590,
  "success": true,
  "timestamp": 1743010255496,
  "requestId": "68f98a07-0dcf-487b-9ae8-83fdb6ae5714",
  "message": "",
  "error": null
}

Retrieve Latest Block Hash

/latest/blockhash/{network}

Purpose: Retrieves the latest block hash for the specified blockchain network.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "ERC20").

Example Requests

http
GET /v1/blockchain/latest/blockhash/ERC20

Example Response

json
{
  "data": "0x1af8d95b3ce48a7968ec97ab7bd195a4899902a366cdc5e83c8672d884a7ef3b",
  "success": true,
  "timestamp": 1743010290257,
  "requestId": "9367b018-ee68-488c-8d6e-8d1c45cdcfaf",
  "message": "",
  "error": null
}

Retrieve Block Number by Block Hash

/blocknumber/{network}/{blockhash}

Purpose: Retrieves the block number for a given block hash on the specified blockchain network.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "ERC20").
blockhash string Yes The block hash to query.

Example Requests

http
GET /v1/blockchain/blocknumber/ERC20/0x1af8d95b3ce48a7968ec97ab7bd195a4899902a366cdc5e83c8672d884a7ef3b

Example Response

json
{
  "data": 22132593,
  "success": true,
  "timestamp": 1743010320286,
  "requestId": "e0a2ddee-2328-4caf-88f7-9a2aee6f468f",
  "message": "",
  "error": null
}

Retrieve Block Hash by Block Number

/blockhash/{network}/{blocknumber}

Purpose: Retrieves the block hash for a given block number on the specified blockchain network.

Path Parameters:

Name Type Mandatory Description
network string Yes Blockchain network identifier (e.g., "ERC20").
blocknumber number Yes The block number to query.

Example Requests

http
GET /v1/blockchain/blockhash/ERC20/22132593

Example Response

json
{
  "data": "0x1af8d95b3ce48a7968ec97ab7bd195a4899902a366cdc5e83c8672d884a7ef3b",
  "success": true,
  "timestamp": 1743010348634,
  "requestId": "510f71ce-fa81-4ef2-bc63-ed86abb218d1",
  "message": "",
  "error": null
}

Tip:
To identify the correct contractAddress or tokenId, use:

  • GET /v1/tokeninformation/{tokenId}
  • GET /v1/tokeninformation/symbols/{symbol}