Pay Per Call with x402

Use the Monad Indexing API without an account or API key by paying per request in USDC on Monad through the x402 protocol.

The Monad Indexing API can be used without an account or API key. Every endpoint is also exposed under an x402 path where each request is paid in USDC on Monad mainnet at the moment it is served. This is built for AI agents, scripts and anyone who wants on-chain data without a subscription.

Subscription (/v2/monad/*)x402 (/x402/v2/monad/*)
Authx-api-key headerNone. A signed USDC payment authorization per request
BillingMonthly Compute Units by planPer call, USD 0.005 – 0.02 depending on endpoint
NetworkMainnet / testnet selected by keyMonad mainnet only
SignupDashboard accountNot required
Endpoints21Same 21, same parameters and responses

Base URL

https://api.blockvision.org/x402/v2/monad

Append the same path and query parameters documented for each Monad Indexing API endpoint. For example the subscription URL https://api.blockvision.org/v2/monad/token/detail?contractAddress=0x... becomes https://api.blockvision.org/x402/v2/monad/token/detail?contractAddress=0x....

How a paid request works

x402 is an open HTTP payment standard (protocol version 2). A request goes through three steps:

  1. Quote. Call the endpoint with no payment. The API answers HTTP 402 Payment Required. The PAYMENT-REQUIRED header (and the JSON body) carry the price, the USDC contract, the receiving address and a timeout.
  2. Pay. Your client signs an EIP-3009 transferWithAuthorization for exactly that amount and retries the same request with the signature in the PAYMENT-SIGNATURE header. Nothing is broadcast yet.
  3. Settle. The API verifies the signature through the Monad x402 facilitator, runs the query, and only if the query succeeds settles the payment on-chain. The data is returned with a PAYMENT-RESPONSE header that contains the settlement transaction hash.

x402 client libraries (for example @x402/fetch for JavaScript) do all three steps automatically. You give them a wallet and call fetch as usual.

Example 402 response

HTTP/2 402
content-type: application/json
payment-required: eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOi...

{
  "x402Version": 2,
  "error": "PAYMENT-SIGNATURE header is required",
  "resource": {
    "url": "https://api.blockvision.org/x402/v2/monad/token/detail",
    "description": "Monad token detail",
    "mimeType": "application/json"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:143",
      "amount": "5000",
      "asset": "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
      "payTo": "0x38C4Cffe8B8D9417506eB5C6a82afb5E1f5F0DB1",
      "maxTimeoutSeconds": 60,
      "extra": { "name": "USDC", "version": "2" }
    }
  ]
}

amount is in USDC base units (6 decimals), so 5000 is USD 0.005. The PAYMENT-REQUIRED header is the same JSON, base64 encoded.

Payment details

FieldValue
Protocolx402 v2, scheme exact
NetworkMonad mainnet, CAIP-2 eip155:143
AssetUSDC 0x754704Bc059F8C67012fEd69BC8A327a5aafb603 (EIP-712 domain name USDC, version 2)
Receiving address0x38C4Cffe8B8D9417506eB5C6a82afb5E1f5F0DB1
Facilitatorhttps://x402-facilitator.molandak.org
Authorization validity60 seconds

Your wallet needs USDC on Monad mainnet. Gas is paid by the facilitator, so no MON is required.

Quick start (JavaScript)

npm install @x402/fetch @x402/evm viem
import { privateKeyToAccount } from "viem/accounts";
import { wrapFetchWithPayment } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const fetchWithPay = wrapFetchWithPayment(fetch, {
  schemes: [new ExactEvmScheme(account)],
});

const res = await fetchWithPay(
  "https://api.blockvision.org/x402/v2/monad/token/detail?contractAddress=0x754704Bc059F8C67012fEd69BC8A327a5aafb603"
);
console.log(await res.json());
console.log("settled tx:", res.headers.get("PAYMENT-RESPONSE"));

The first call returns 402, the library signs the authorization and retries, and you receive the normal JSON response. Check the x402 client documentation for the exact package names and versions for your language.

Quick start (curl, inspect the quote)

curl -i "https://api.blockvision.org/x402/v2/monad/token/detail?contractAddress=0x754704Bc059F8C67012fEd69BC8A327a5aafb603"

Decode the payment-required header with base64 -d to see the price and payment requirements.

Pricing

Prices are per successful call and may change. The live price list is always available free of charge at the discovery endpoints below.

EndpointPrice (USD)
Retrieve Token Detail0.005
Retrieve Multiple Token Price0.005
Retrieve Token OHLCV0.005
Retrieve Token Market Data0.005
Retrieve Contract Detail0.005
Retrieve Verified Contracts0.005
Retrieve Token Gating0.005
Retrieve Account Tokens0.01
Retrieve Account NFTs0.01
Retrieve Account Activity0.01
Retrieve Account Transactions0.01
Retrieve Account Internal Transactions0.01
Retrieve Account Token Activities0.01
Retrieve Account NFT Activities0.01
Retrieve Token Holders0.01
Retrieve Monad Holders0.01
Retrieve Collection Holders0.01
Retrieve Contract Source Code0.01
Retrieve Token Trades0.01
Retrieve Token Pools0.01
Retrieve Account DeFi0.02

Discovery endpoints (free)

URLPurpose
GET https://api.blockvision.org/x402/v2/monadList of every paid resource with its current accepts payment requirements
GET https://api.blockvision.org/.well-known/x402Service manifest with priceUsd per resource, used by the Monad API Hub and agent frameworks

When you are charged

  • You are charged only when the query succeeds. If the API returns an error, the authorization is not settled and no USDC moves.
  • An authorization is tied to one request. Reusing the same signature returns 402 with payment authorization has already been used.
  • If the facilitator rejects the signature you get 402 with the reason, for example an insufficient USDC balance or an expired authorization.
  • If settlement fails after the query succeeded, the API returns 402 with the message settlement status unknown, please do not retry with a new payment authorization. Keep the x-request-id from the response and contact support. We reconcile these manually so you are never charged without receiving data.

Response codes

StatusMeaning
200Data returned, payment settled. PAYMENT-RESPONSE holds the transaction hash
402No payment, invalid payment, price mismatch, reused authorization, or settlement failure. Body explains why
429More than 20 requests per second from one IP
503The upstream query failed or x402 is temporarily unavailable. You have not been charged

Response bodies are identical to the subscription endpoints. See each endpoint page in this section for parameters and fields.