Bware Docs
  • About Bware Labs Decentralized API
  • API Docs
    • Ethereum API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket API
        • eth_syncing method
    • Binance Smart Chain API
      • RPC
        • eth_getTransactionByHash method
        • eth_getBlockByNumber method
        • eth_blockNumber method
        • eth_syncing method
        • eth_getBalance method
        • eth_accounts method
        • eth_gasPrice method
      • Websocket API
        • eth_syncing method
    • Avalanche API
      • X-Chain
      • C-Chain
      • P-Chain
      • Keystore API
      • Health API
      • Admin API
      • Info API
      • Metrics API
    • Moonbeam/Moonriver API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket
    • Astar/Shiden APIs
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket
    • Fantom API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websockets
        • eth_syncing method
    • Polkadot API
      • RPC
        • chain_getBlock
        • chain_getHeader
        • system_chainType
        • state_getMetadata
      • Websockets
        • system_chainType
    • Elrond API
      • REST API
        • Get Block By Hash
        • Get Shard Status
  • Tutorials
    • Using Bware Labs Platform
      • Getting a Bware Labs full endpoint
    • Using Bware Labs Endpoint in PolkadotJs
    • Using Bware Labs Endpoint in Metamask
    • Using a Bware Labs endpoint in code
Powered by GitBook
On this page
  • Parameters
  • Example

Was this helpful?

  1. API Docs
  2. Binance Smart Chain API
  3. RPC

eth_getBalance method

Returns the balance of an account with a given address

Previouseth_syncing methodNexteth_accounts method

Last updated 4 years ago

Was this helpful?

Parameters

  1. DATA, 20 Bytes - address to check for the balance.

  2. QUANTITY|TAG - integer block number, or the string "latest", "earliest" or "pending", see the

If the Node is Full Archive, then it's possible to query for the balance at a certain block height.

Returns

QUANTITY - integer of the current balance in wei.

Example

// Request
curl -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xBf727B60eE5fC8F1a5912068bfb171A59D5DB3c1", "0xf537a"] ,"id":32}' https://bsc-api.bwarelabs.com/<your-endpoint-id>

// Response
{
    "jsonrpc": "2.0",
    "id": 32,
    "result": "0x13d1c2ff9f6800"
}
default block parameter