# Solana Recent Blockhash Lookup

> Solana Recent Blockhash Lookup is a paid API for AI agents from x402-swarms-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns a current Solana recent blockhash and last valid block height for use in building and signing transactions, paid via USDC on Solana.

## Facts

- Endpoint: POST https://x402-swarms-production.up.railway.app/x402/recent-blockhash
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-swarms-production-up-railway-app-ab937652
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PPbj-sTq-pY9yo_InDCFb

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 x402-swarms-production-up-railway-app-ab937652 -d '<json body>'
```

Example prompt: I need to build and sign a Solana transaction — can you fetch a current recent blockhash and last valid block height from the Solana network? Pay 0.001 USDC for the lookup.

## When to prefer this

Use this endpoint when an agent or application needs a fresh Solana recent blockhash to construct or sign a transaction programmatically, especially in pay-per-call microservice architectures using the x402 payment protocol. Prefer this over direct RPC calls when you want a simple HTTP API abstraction with metered billing in USDC.

## Known failure modes

- Insufficient payment amount — payment amount does not meet required $0.001 USDC threshold
- Invalid currency — only USDC on Solana is accepted
- Solana RPC unavailable — upstream network error fetching blockhash
- Stale/cached blockhash returned — cached:true flag indicates blockhash may be slightly older
- Payment verification failure — x402 payment not confirmed on-chain

## How this service works

Provides a current Solana recent blockhash for building and signing transactions; requires payment in USDC on Solana.

## Output

Returns a JSON object containing a recent Solana blockhash string, the last valid block height (integer), a timestamp and ISO queriedAt string, a flag indicating whether the result was cached, and the payment amount used for the request.

## Example request

```json
{
 "amount": 0.001,
 "currency": "USDC"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "amount",
  "currency"
 ],
 "properties": {
  "amount": {
   "type": "number"
  },
  "currency": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "cached",
  "payment",
  "blockhash",
  "queriedAt",
  "timestamp",
  "lastValidBlockHeight"
 ],
 "properties": {
  "cached": {
   "type": "boolean"
  },
  "payment": {
   "type": "object",
   "required": [
    "amount"
   ],
   "properties": {
    "amount": {
     "type": "string"
    }
   }
  },
  "blockhash": {
   "type": "string"
  },
  "queriedAt": {
   "type": "string"
  },
  "timestamp": {
   "type": "number"
  },
  "lastValidBlockHeight": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-swarms-production-up-railway-app-ab937652/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-swarms-production.up.railway.app](https://www.zero.xyz/host/x402-swarms-production.up.railway.app/llms.txt)
