Harmony (ONE)

Harmony is an EVM-compatible, sharded Layer 1 blockchain secured by Effective Proof-of-Stake (EPoS) and Fast Byzantine Fault Tolerant (FBFT) consensus, which gives it roughly two-second blocks and fast, deterministic finality. Its beacon shard, Shard 0, runs an Ethereum-compatible execution layer: standard Ethereum contracts, the eth_* JSON-RPC surface, and tooling such as Foundry, Hardhat, Ethers.js, and Viem work directly against it. The native token is ONE. Harmony also exposes native hmy_* / hmyv2_* RPC methods and a dual address format (a bech32 one1... form alongside the Ethereum 0x form); this reference covers the Ethereum-compatible eth_* surface on Shard 0.

Key Features

  • EVM Compatibility: Shard 0 runs standard Ethereum contracts, JSON-RPC, and tooling unchanged
  • Sharded Layer 1: A beacon shard (Shard 0) plus additional shards, secured natively rather than by another chain
  • EPoS + FBFT Consensus: Effective Proof-of-Stake with FBFT gives fast, deterministic finality and no probabilistic reorgs
  • ONE Gas Token: Native gas is paid in ONE; Harmony uses legacy gas pricing, not EIP-1559 base fees
  • Dual Addressing: Accounts have a bech32 one1... form and an Ethereum 0x form; the eth_* API uses the 0x form
  • Ethereum Tooling: Compatible with MetaMask, Foundry, Hardhat, Remix, Ethers.js, and Viem

TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC API SPECIFICATION.

GetBlock's RPC API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. Harmony's Shard 0 implements the standard Ethereum JSON-RPC interface; the canonical specification for these methods is the Ethereum JSON-RPC specification at ethereum.org, and Harmony-specific behavior and native methods are documented at docs.harmony.one.

Network Information

PropertyValue
Network NameHarmony
Chain ID1666600000 (Shard 0)
Native CurrencyONE
EVM CompatibleYes (Shard 0)
ConsensusEffective Proof-of-Stake + FBFT
Block Time~2 seconds
FinalityFast, deterministic (~2 seconds)
Gas PricingLegacy (no EIP-1559 base fee)

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Supported Networks

NetworkChain IDJSON-RPCWSSGraphQLMEV protected (WebSocket)MEV protected (JSON-RPC)Frankfurt, GermanyNew York, USASingapore, Singapore
Mainnet (Shard 0)1666600000✅✅❌❌❌✅❌❌

Quickstart

  1. Setup project

    bashmkdir harmony-api-quickstart && cd harmony-api-quickstart && npm init --yes
  2. Install dependency

    bashnpm install axios
  3. Add code

    index.js

    javascriptconst axios = require('axios');
    
    const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';
    
    const payload = {
      jsonrpc: '2.0',
      method: 'eth_blockNumber',
      params: [],
      id: 'getblock.io'
    };
    
    axios.post(url, payload, {
      headers: { 'Content-Type': 'application/json' }
    })
    .then(response => {
      console.log('Latest block:', parseInt(response.data.result, 16));
    })
    .catch(error => console.error(error));
  4. Run the script

    bashnode index.js
  5. Reponse

    bash{
        "jsonrpc": "2.0",
        "result": "0x5907ed0",
        "id": "getblock.io"
    }
  1. Setup project

    bashmkdir harmony-api-quickstart && cd harmony-api-quickstart
    python -m venv venv && source venv/bin/activate
  2. Install dependency

    bashpip install requests
  3. Add code

    main.py

    pythonimport requests
    import json
    
    url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
    
    payload = json.dumps({
        "jsonrpc": "2.0",
        "method": "eth_blockNumber",
        "params": [],
        "id": "getblock.io"
    })
    
    headers = {
        'Content-Type': 'application/json'
    }
    
    response = requests.post(url, headers=headers, data=payload)
    print(response.text)
  4. Run the script

    bashpython main.py

Available API Methods

Chain & Client Info

MethodDescription
web3_clientVersionClient software version identifier
web3_sha3Keccak-256 hash of hex-encoded data
net_versionNetwork ID as a decimal string
net_listeningWhether the node is listening for P2P connections
net_peerCountNumber of connected peers
eth_chainIdChain ID per EIP-155
eth_blockNumberCurrent chain tip block number
eth_syncingSync status, or false if fully synced

Gas & Fees

MethodDescription
eth_gasPriceLegacy gas price estimate in wei

Account & State

MethodDescription
eth_getBalanceONE balance of an address at a given block
eth_accountsAccounts owned by the client
eth_getStorageAtValue at a specific contract storage slot
eth_getTransactionCountAddress nonce (transaction count)
eth_getCodeDeployed bytecode at an address

Blocks

MethodDescription
eth_getBlockByHashBlock data by block hash
eth_getBlockByNumberBlock data by block number or tag
eth_getBlockTransactionCountByHashTransaction count in a block, by hash
eth_getBlockTransactionCountByNumberTransaction count in a block, by number

Transactions

MethodDescription
eth_getTransactionByHashTransaction data by transaction hash
eth_getTransactionByBlockHashAndIndexTransaction by block hash and index
eth_getTransactionByBlockNumberAndIndexTransaction by block number and index
eth_getTransactionReceiptTransaction receipt with status, gas, and logs

Execution & Simulation

MethodDescription
eth_callExecute a message call without a transaction
eth_estimateGasEstimate gas required to execute a transaction

Filters & Logs

MethodDescription
eth_newFilterCreate a log filter with address and topic criteria
eth_newBlockFilterCreate a filter for new block hashes
eth_newPendingTransactionFilterCreate a filter for pending transaction hashes
eth_uninstallFilterRemove a previously created filter
eth_getFilterChangesPoll new entries for a filter since the last poll
eth_getFilterLogsGet all logs matching a log filter
eth_getLogsQuery logs matching criteria in one call

Transaction Submission

MethodDescription
eth_sendRawTransactionSubmit a signed transaction to the network

WebSocket Subscriptions

MethodDescription
eth_subscribeSubscribe to newHeads, logs, newPendingTransactions, or syncing
eth_unsubscribeCancel an active subscription

Support

For technical support and questions:

See Also