# NythosX Gas Price API

> NythosX Gas Price API is a paid API for AI agents from tools.nythosx.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Returns current gas fees, block data, and estimated transaction costs for a specified blockchain network

## Facts

- Endpoint: GET https://tools.nythosx.com/v1/gas?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nythosx-gas-price-api-b1050987
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JnKsxLHnj-p6iR1JqAsbg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nythosx-gas-price-api-b1050987
```

Example prompt: What are the current gas prices on Base — give me the slow, standard, and fast tiers in Gwei along with estimated USD costs for a USDC transfer?

## When to prefer this

Choose this endpoint when an AI agent needs real-time gas fee data across multiple EVM chains or Solana without running its own RPC node. It is especially useful when you need USD-denominated cost estimates for common transaction types (transfer, USDC transfer, swap) rather than raw Gwei values alone. It consolidates multi-chain gas data into a single pay-per-call API, making it cost-effective for agents that query gas infrequently and don't want to maintain RPC subscriptions.

## Known failure modes

- Missing or invalid 'chain' query parameter returns an error — must be one of: base, ethereum, arbitrum, optimism, polygon, solana
- Payment failure (402) if x402 USDC payment on Base is not provided or is insufficient
- RPC node unavailability for the queried chain may cause timeout or stale data
- Solana support is noted as optional and may not always be available

## How this service works

Pay-per-call tools for autonomous agents: current gas and fee prices across six chains, and web page to clean Markdown. x402 v2, USDC, Base (Solana optional).

## Output

Returns a JSON object with the chain name and RPC endpoint, current block number and timestamp, native token USD price, base fee in Gwei, and three fee tiers (slow/standard/fast) each with maxFeeGwei and maxPriorityFeeGwei. Also includes pre-calculated USD cost estimates for common transaction types (ETH transfer, USDC transfer, swap) at each tier, plus the raw gas unit estimates used in calculations. L1 data fee is included for L2 chains.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "chain"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon",
        "solana"
       ],
       "type": "string",
       "description": "Chain to query"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rpc": "mainnet.base.org",
  "name": "Base",
  "block": 21512345,
  "chain": "base",
  "tiers": {
   "fast": {
    "maxFeeGwei": 0.0204,
    "maxPriorityFeeGwei": 0.01
   },
   "slow": {
    "maxFeeGwei": 0.0114,
    "maxPriorityFeeGwei": 0.001
   },
   "standard": {
    "maxFeeGwei": 0.0124,
    "maxPriorityFeeGwei": 0.002
   }
  },
  "costUsd": {
   "swap": {
    "fast": 0.0052,
    "slow": 0.0031,
    "standard": 0.0035
   },
   "transfer": {
    "fast": 0.0008,
    "slow": 0.0004,
    "standard": 0.0005
   },
   "usdc_transfer": {
    "fast": 0.0019,
    "slow": 0.0011,
    "standard": 0.0012
   }
  },
  "gasUnits": {
   "swap": 180000,
   "transfer": 21000,
   "usdc_transfer": 65000
  },
  "blockTime": "2026-10-21T00:00:00.000Z",
  "nativeUsd": 2468.07,
  "baseFeeGwei": 0.0052,
  "nativeSymbol": "ETH",
  "l1DataFeeIncluded": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nythosx-gas-price-api-b1050987/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.nythosx.com](https://www.zero.xyz/host/tools.nythosx.com/llms.txt)
