GET /api/gas
Ethereum Gas Prices (Always Free)
Get current Ethereum mainnet gas prices in Gwei. Always free.
Response Fields​
- slow: Safe low price (longer confirmation)
- standard: Average price (normal confirmation)
- fast: High price (fast confirmation)
- baseFee: Current base fee
Use Cases​
- Estimate transaction costs
- Choose optimal gas price
- Monitor network congestion
Endpoint​
GET https://api.web3identity.com/api/gas
Parameters​
| Name | In | Type | Required | Description |
|---|---|---|---|---|
chain | query | string | ❌ | Network (ethereum, polygon, arbitrum) |
Example Request​
curl -s "https://api.web3identity.com/api/gas" | jq
Responses​
200 Current gas prices​
{
"chain": "ethereum",
"slow": 0.03,
"standard": 0.04,
"fast": 0.05,
"unit": "gwei",
"source": "rpc",
"cached": false,
"cachedAt": null,
"timestamp": "2026-02-09T06:30:00.000Z"
}
400 Bad Request - Invalid parameters or malformed request​
{
"error": "Invalid parameter format",
"code": "INVALID_PARAMETER"
}
402 Payment Required - Free tier exhausted​
{
"example": "response"
}
404 Not Found - Resource does not exist​
{
"error": "Resource not found",
"code": "NOT_FOUND"
}
429 Rate Limited​
{
"example": "response"
}
500 Internal Server Error - Something went wrong on our end​
{
"error": "Internal server error",
"code": "INTERNAL_ERROR"
}
Auto-generated from OpenAPI spec