Ethereum Price API - Ruby Gem

Ethereum Price is a simple tool for getting the current price of Ethereum. It returns the current price, market cap, 24-hour trading volume, and 24-hour price change in any currency.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_ethereum'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_ethereum

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_ethereum'

# Initialize the client
client = APIVerve::Ethereum::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({
  currency: "USD",
  hourly: true
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ currency: "USD", hourly: true })
  puts response["data"]
rescue APIVerve::Ethereum::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Ethereum::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Ethereum::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "currency": "USD",
    "price": 2685.12,
    "marketCap": 323000000000,
    "volume24h": 14850000000,
    "change24h": 2.34,
    "lastUpdated": "2026-02-07T12:00:00.000Z",
    "high24h": 2742.5,
    "low24h": 2618.75,
    "changeDirection": "up",
    "formatted": {
      "price": "$2,685.12",
      "marketCap": "$323.00B",
      "volume": "$14.85B",
      "priceWords": "two thousand six hundred eighty-five dollars"
    }
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.