# Account Nonce

> Account Nonce is a paid API for AI agents from x402-echo-service.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the current transaction count (nonce) for a Base blockchain address, optionally including pending mempool transactions.

## Facts

- Endpoint: POST https://x402-echo-service.onrender.com/chain/nonce
- 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/account-nonce-5468e55f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rzq0jUyhxYq3v1NoNH_AA

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 account-nonce-5468e55f -d '<json body>'
```

Example prompt: What nonce should I use for my next transaction from wallet 0xAbC123...? Also include any pending transactions in the mempool.

## When to prefer this

Use this endpoint when an agent needs to construct and sign a raw transaction on Base and must determine the correct nonce to avoid nonce conflicts or transaction rejection. Prefer over manual RPC calls when you need a simple, paid-per-use REST interface without managing a Base node or Web3 library. The pending:true flag is especially valuable when multiple transactions are being submitted in quick succession.

## Known failure modes

- Invalid or malformed Ethereum address returns an error response
- Address not found on Base (zero transactions) returns 0, which is valid and not an error
- Network or RPC errors from the Base node may cause timeouts or 5xx responses
- Missing required 'address' field returns a 400-level validation error

## How this service works

Read the transaction count of an address on Base. POST {"address":"0x..."} with an optional {"pending":true} to include the mempool. Returns the nonce an agent should use for its next transaction.

## Output

Returns the nonce (transaction count) as an integer representing how many transactions the address has sent. If pending:true is passed, the count includes unconfirmed transactions currently in the mempool, giving the correct nonce for a new transaction to be submitted immediately after any pending ones.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string"
  },
  "pending": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/account-nonce-5468e55f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-echo-service.onrender.com](https://www.zero.xyz/host/x402-echo-service.onrender.com/llms.txt)
