> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Gas Price

Fetch current gas prices for an EVM chain from the b3 gas oracle. Returns legacy tiers (low / standard / fast / instant) and, when available, EIP-1559 base fee + priority/max-fee tiers and historical analysis (level, percentile, vs1h/vs4h/vs24h ratios). Values are in gwei. Ideal for: gas-gated batching, cost-aware send timing, gas dashboards.

![Get Gas Price logo](https://ai-icon.b3.fun/logo/ethereum)
Catalog action EVM Onchain

Fetch current gas prices for an EVM chain from the b3 gas oracle. Returns legacy tiers (low / standard / fast / instant) and, when available, EIP-1559 base fee + priority/max-fee tiers and historical analysis (level, percentile, vs1h/vs4h/vs24h ratios). Values are in gwei. Ideal for: gas-gated batching, cost-aware send timing, gas dashboards.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `get-gas-price` |
| Category | EVM Onchain |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `evm`, `gas`, `oracle`, `read` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainId` | `number` | Yes | EVM chain ID. Supported chains depend on the gas oracle's coverage; unsupported IDs return UNSUPPORTED_CHAIN. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainId` | `number` | Yes | - |
| `chainName` | `string` | Yes | Human-readable chain name \(e.g., 'Ethereum'\) |
| `blockNumber` | `number` | Yes | Block number the snapshot was taken at |
| `timestamp` | `string` | Yes | ISO timestamp of the snapshot |
| `source` | `string` | Yes | Underlying data source string returned by the oracle. May vary across chains and over time. |
| `gasPrice` | `object` | Yes | Legacy gas-price tiers in gwei. Use these for non-EIP-1559 chains. |
| `eip1559` | `object` | No | EIP-1559 base fee + tip tiers \(gwei\). Omitted on chains without EIP-1559 \(e.g., BSC\). |
| `analysis` | `object` | No | Historical context for the current gas price. Use this for relative thresholds \(e.g., 'send when gas is 30% below 24h median'\). |
| `cached` | `boolean` | No | True if the response was served from cache |
| `stale` | `boolean` | No | True if the cached value has exceeded its freshness window |
| `cacheAge` | `number` | No | Age of the cached value, in seconds |

## Examples

**Workflow node**

```json
{
  "type": "get-gas-price",
  "payload": {
    "chainId": 8453
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/get-gas-price/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "chainId": 8453
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.