# chainquery decoderawtransaction

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

Decodes a raw Bitcoin transaction hex string into a structured JSON object with inputs, outputs, txid, version, and locktime via Bitcoin Core RPC.

## Facts

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

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-decoderawtransaction-b28ccfff
```

Example prompt: Decode this raw Bitcoin transaction hex for me and show me the inputs, outputs, txid, version, and locktime: 0200000001abc123...

## When to prefer this

Use this endpoint when you need to decode a raw Bitcoin transaction hex without an API key, paying only $0.005 USDC per call via x402. Ideal for agents that need on-demand, pay-as-you-go Bitcoin transaction inspection without registering for a node provider account.

## Known failure modes

- Invalid or malformed hex string returns a Bitcoin Core RPC error
- Missing params query parameter when hex is required returns an error
- Payment not settled via x402 protocol results in 402 Payment Required response
- Truncated or incomplete transaction hex causes decoding failure
- Non-hex characters in input cause parse error

## How this service works

chainquery Bitcoin RPC: pay-per-call Bitcoin Core over x402, no API key. Decode a raw transaction hex into JSON: inputs, outputs, txid, version, locktime. Bitcoin Core decoderawtransaction.

## Output

A JSON object containing the decoded transaction fields: txid, hash, version, size, vsize, weight, locktime, vin (array of inputs with txid, vout, scriptSig, sequence), and vout (array of outputs with value, n, scriptPubKey).

## 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": "decoderawtransaction result"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainquery-decoderawtransaction-b28ccfff/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)
