# chainquery testmempoolaccept

> chainquery testmempoolaccept is a paid API for AI agents from x402.chainquery.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Tests whether raw Bitcoin transactions would be accepted to the mempool without actually broadcasting them, via a chainquery full node.

## Facts

- Endpoint: GET https://x402.chainquery.com/v1/rpc/testmempoolaccept
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainquery-testmempoolaccept-4070ae62
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_udRmltAUmrITWWGZIDuNw

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 chainquery-testmempoolaccept-4070ae62
```

Example prompt: Before I broadcast this Bitcoin transaction, can you test whether it would be accepted to the mempool using chainquery's full node? Here's the raw hex: 0200000001abc...

## When to prefer this

Use this endpoint when you need to validate a fully signed raw Bitcoin transaction against real mainnet mempool rules before broadcasting it, without spending any funds or affecting the network state. Prefer this over local validation libraries when you need live mempool policy checks from an independent full node.

## Known failure modes

- Invalid or malformed raw transaction hex returns rejection with reason field
- Transaction with insufficient fee rate rejected with 'min relay fee not met'
- Double-spend attempt returns 'txn-mempool-conflict'
- Malformed params JSON returns an error
- Network or node unavailability returns HTTP error
- Payment not included or insufficient returns HTTP 402

## How this service works

chainquery Bitcoin RPC: pay-per-call Bitcoin Core over x402, no API key. Test whether raw transactions would be accepted to the mempool, without broadcasting, via chainquery's independent full node. Bitcoin Core testmempoolaccept.

## Output

Returns a testmempoolaccept result object per Bitcoin Core RPC spec, including whether each transaction is accepted, the rejection reason if any, the transaction fee, and vsize. No transaction is broadcast to the network.

## 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": {
      "params": {
       "type": "string",
       "description": "optional: JSON-encoded array of positional RPC params"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "description": "testmempoolaccept result"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainquery-testmempoolaccept-4070ae62/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.chainquery.com](https://www.zero.xyz/host/x402.chainquery.com/llms.txt)
