API Reference

Overview

The Real Explorer API allows developers to programmatically access blockchain data from the Real Network. Use these endpoints to query transactions, blocks, accounts, tokens, and validator activity. This enables seamless integration of Real data into dApps, wallets, compliance tools, and reporting dashboards.

Base URL

https://api.explorer.reallayer.com/v1

Authentication

  • Public Endpoints: No API key required.

  • Rate Limits: 60 requests/minute per IP (higher tiers available on request).


Endpoints

1. Get Transaction Details

Retrieve details of a specific transaction.

Request

GET /transactions/{txHash}

Example

GET /transactions/0xabc123...

Response

{
  "hash": "0xabc123...",
  "blockNumber": 10482,
  "timestamp": "2025-09-09T12:05:00Z",
  "from": "0xUserAddress",
  "to": "0xContractAddress",
  "value": "500000000000000000",
  "gasUsed": 21000,
  "status": "success",
  "logs": [
    {
      "event": "Transfer",
      "from": "0xUserAddress",
      "to": "0xOtherUser",
      "value": "500000000000000000"
    }
  ]
}

2. Get Block Details

Fetch metadata and transactions for a given block.

Request

GET /blocks/{blockNumber}

Response

{
  "blockNumber": 10482,
  "hash": "0xblockhash...",
  "timestamp": "2025-09-09T12:05:00Z",
  "validator": "0xValidatorAddress",
  "gasUsed": 800000,
  "transactions": ["0xabc123...", "0xdef456..."]
}

3. Get Account Information

Check balances and activity for a given address.

Request

GET /accounts/{address}

Response

{
  "address": "0xUserAddress",
  "balance": "1000000000000000000",
  "nonce": 42,
  "transactions": [
    "0xabc123...",
    "0xdef456..."
  ]
}

4. Get Token Information (REAL-20)

Retrieve metadata and activity for a token.

Request

GET /tokens/{contractAddress}

Response

{
  "contractAddress": "0xTokenContract",
  "name": "Tokenized Real Estate",
  "symbol": "TREAL",
  "decimals": 18,
  "totalSupply": "100000000000000000000",
  "holders": 124,
  "transfers": [
    {
      "from": "0xIssuer",
      "to": "0xInvestor",
      "value": "1000000000000000000",
      "txHash": "0xabc123..."
    }
  ]
}

5. Get Validator Data

Monitor staking and validator performance.

Request

GET /validators/{validatorAddress}

Response

{
  "validator": "0xValidatorAddress",
  "staked": "500000000000000000000",
  "commission": "0.05",
  "uptime": "99.9",
  "rewards": "200000000000000000"
}

Response Shape and Errors

  • All responses are JSON.

  • Errors:

{
  "error": {
    "code": 404,
    "message": "Transaction not found",
    "details": null
  }
}
  • Lists are paginated with:

    • page (default 1)

    • pageSize (default 25, max 100)

    • nextPage (cursor string, if provided, prefer cursor over page numbers)


1) curl in 60 seconds

Get a transaction

curl -s "https://api.explorer.reallayer.com/v1/transactions/0xabc123..."

Get a block

curl -s "https://api.explorer.reallayer.com/v1/blocks/10482"

Get an account (balance + summary)

curl -s "https://api.explorer.reallayer.com/v1/accounts/0xUserAddress"

List an account’s transactions (paginated)

curl -s "https://api.explorer.reallayer.com/v1/accounts/0xUserAddress/transactions?page=1&pageSize=50"

Get REAL-20 token info

curl -s "https://api.explorer.reallayer.com/v1/tokens/0xTokenContract"

List token transfers with filters

curl -s "https://api.explorer.reallayer.com/v1/tokens/0xTokenContract/transfers?from=0xIssuer&to=0xInvestor&since=2025-09-01T00:00:00Z"

Get validator stats

curl -s "https://api.explorer.reallayer.com/v1/validators/0xValidatorAddress"

2) JavaScript (Node / fetch)

Install node-fetch if needed: npm i node-fetch (Node 18+ has global fetch)

Get a transaction

const TX = "0xabc123...";
const BASE = "https://api.explorer.reallayer.com/v1";

async function main() {
  const res = await fetch(`${BASE}/transactions/${TX}`);
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  const data = await res.json();
  console.log(data.status, data.gasUsed, data.logs?.length);
}
main().catch(console.error);

List an account’s transactions with pagination

const BASE = "https://api.explorer.reallayer.com/v1";
const ADDRESS = "0xUserAddress";

async function listAllTx(address) {
  let url = `${BASE}/accounts/${address}/transactions?page=1&pageSize=100`;
  let all = [];
  for (let i = 0; i < 10; i++) { // safety cap
    const res = await fetch(url);
    if (!res.ok) throw new Error(`HTTP ${res.status}`);
    const { items, nextPage } = await res.json();
    all = all.concat(items || []);
    if (!nextPage) break;
    url = `${BASE}/accounts/${address}/transactions?nextPage=${encodeURIComponent(nextPage)}`;
  }
  return all;
}

listAllTx(ADDRESS).then(tx => console.log(`Fetched ${tx.length} txs`)).catch(console.error);

Filter token transfers (by time window, address)

const BASE = "https://api.explorer.reallayer.com/v1";
const TOKEN = "0xTokenContract";

async function tokenTransfers({ from, to, since, until }) {
  const params = new URLSearchParams({ from, to, since, until, pageSize: "100" });
  const res = await fetch(`${BASE}/tokens/${TOKEN}/transfers?` + params.toString());
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  return res.json();
}

tokenTransfers({
  from: "0xIssuer",
  to: "0xInvestor",
  since: "2025-09-01T00:00:00Z",
  until: "2025-09-09T23:59:59Z"
}).then(console.log).catch(console.error);

3) Python (requests)

pip install requests

Get an account and its latest transactions

import requests

BASE = "https://api.explorer.reallayer.com/v1"
ADDRESS = "0xUserAddress"

acct = requests.get(f"{BASE}/accounts/{ADDRESS}")
acct.raise_for_status()
print(acct.json())

txs = requests.get(f"{BASE}/accounts/{ADDRESS}/transactions", params={"pageSize": 50})
txs.raise_for_status()
data = txs.json()
print("Fetched:", len(data.get("items", [])), "transactions")

Stream pages with a cursor

import requests

BASE = "https://api.explorer.reallayer.com/v1"
TOKEN = "0xTokenContract"

def iterate_token_transfers(token):
    url = f"{BASE}/tokens/{token}/transfers"
    params = {"pageSize": 100}
    while True:
        r = requests.get(url, params=params)
        r.raise_for_status()
        payload = r.json()
        for item in payload.get("items", []):
            yield item
        next_page = payload.get("nextPage")
        if not next_page:
            break
        # On cursor-based pagination, switch to nextPage param
        url = f"{BASE}/tokens/{token}/transfers"
        params = {"nextPage": next_page}

for tr in iterate_token_transfers(TOKEN):
    print(tr["txHash"], tr["from"], "->", tr["to"], tr["value"])

Filter by event signature (log topic)

import requests

BASE = "https://api.explorer.reallayer.com/v1"
CONTRACT = "0xContractAddress"
TRANSFER_TOPIC = "0xddf252ad..."  # keccak("Transfer(address,address,uint256)")

r = requests.get(f"{BASE}/contracts/{CONTRACT}/logs", params={
    "topic0": TRANSFER_TOPIC,
    "since": "2025-09-01T00:00:00Z",
    "until": "2025-09-09T23:59:59Z",
    "pageSize": 100
})
r.raise_for_status()
print(r.json())

Common Filtering Patterns

Most list endpoints accept some or all of the following query params:

  • Time window:

    • since=2025-09-01T00:00:00Z

    • until=2025-09-09T23:59:59Z

  • Address filters: from, to

  • Contract filters: contract=0x...

  • Event topics (logs): topic0, topic1, topic2, topic3

  • Pagination: page, pageSize, nextPage

Example: list logs for a contract within a window

curl -s "https://api.explorer.reallayer.com/v1/contracts/0xContractAddress/logs?topic0=0xddf252ad...&since=2025-09-01T00:00:00Z&until=2025-09-09T23:59:59Z&pageSize=100"

Practical Workflows

Verify a deployment and inspect events

  1. Deploy your contract.

  2. GET /transactions/{txHash} → confirm status: "success".

  3. GET /contracts/{address} → confirm bytecode and (optionally) verified source/ABI.

  4. GET /contracts/{address}/logs?topic0=<EventSig> → read emitted events for indexing or analytics.

Track fractional token distribution

  1. GET /tokens/{real20Address} → read metadata & supply.

  2. GET /tokens/{real20Address}/holders → list current holders (paginated).

  3. GET /tokens/{real20Address}/transfers?since=... → incremental backfills for your indexer.

Compliance reporting (export)

  1. Pull account transactions by month:

    /accounts/{address}/transactions?since=2025-09-01&until=2025-09-30&pageSize=100

  2. Join with GET /transactions/{hash} for logs/details as needed.


Tips

  • Prefer cursor pagination (nextPage) when present—more reliable under high churn.

  • When building indexers, throttle to stay under 60 req/min and honor Retry-After.

  • Cache static data (token metadata, contract ABI) to reduce calls.


Example Use Cases

  • Wallets: Show user balances, transaction history, and token holdings.

  • Marketplaces: Display real-time asset transfers and fractional ownership.

  • Compliance Tools: Automate audit logs for regulators.

  • Analytics Dashboards: Track validator uptime and network health.


Please Note: All endpoints return data in JSON and support pagination for lists of transactions and events.

Last updated