# OneSource Ethereum Pending Block RPC

> OneSource Ethereum Pending Block RPC is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns the current pending block data (hash, number, transaction count) for Ethereum mainnet or Sepolia testnet

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/pending
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-ethereum-pending-block-rpc-f9d636ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0hg79nlj_ZYXAivTGzm1-

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 onesource-ethereum-pending-block-rpc-f9d636ad
```

Example prompt: What's the current pending block on Ethereum mainnet — give me the block number and how many transactions are in it?

## When to prefer this

Use this endpoint when you need real-time pending block state on Ethereum mainnet or Sepolia testnet without an API key, paying only per call via USDC on Base or Tempo. Prefer this over Infura/Alchemy when you want pay-per-use with no subscription and micropayment-native access.

## Known failure modes

- Invalid network enum value returns an error
- Node unavailability may return 5xx
- Payment failure via x402/MPP returns 402
- No pending block available may return null hash

## How this service works

Pending block - transactions not yet mined, via eth_getBlockByNumber("pending")

## Output

A JSON object containing the pending block's hash (may be null), hexadecimal block number, and transaction count for the requested network (ethereum or sepolia).

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "result": {
         "type": [
          "object",
          "null"
         ],
         "properties": {
          "number": {
           "type": "string"
          },
          "gasUsed": {
           "type": "string"
          },
          "gasLimit": {
           "type": "string"
          },
          "timestamp": {
           "type": "string"
          },
          "transactions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "to": {
              "type": "string"
             },
             "gas": {
              "type": "string"
             },
             "from": {
              "type": "string"
             },
             "hash": {
              "type": "string"
             },
             "nonce": {
              "type": "string"
             },
             "value": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       },
       "description": "Endpoint-specific response payload"
      },
      "meta": {
       "type": "object",
       "required": [
        "endpoint",
        "request_id"
       ],
       "properties": {
        "endpoint": {
         "type": "string"
        },
        "cost_usdc": {
         "type": "string"
        },
        "request_id": {
         "type": "string"
        },
        "payment_chain": {
         "type": "string"
        },
        "payment_token": {
         "type": "string"
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "result": {
    "number": "0x133da1f",
    "gasUsed": "0xa7d8c0",
    "gasLimit": "0x1c9c380",
    "timestamp": "0x6567c8ec",
    "transactions": [
     {
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "gas": "0x5208",
      "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "hash": "0xad7e04119ecd85857728205f5b12e95f0bab8e99f9c2f60be5dc79cfc6a8df1f",
      "nonce": "0x4d2",
      "value": "0x0"
     }
    ]
   }
  },
  "meta": {
   "endpoint": "/api/chain/pending",
   "cost_usdc": "0.001",
   "request_id": "00000000abcdef01",
   "payment_chain": "base",
   "payment_token": "USDC"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-ethereum-pending-block-rpc-f9d636ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
