Complete guide to using the QuantumShield Security API with x402 micropayments.
QuantumShield API provides real-time security intelligence for blockchain tokens, wallets, and smart contracts. Built for AI agents and developers who need instant risk assessment without subscriptions or API keys.
https://quantumshield-api.vercel.appBase (Chain ID: 8453)USDCx402 is an open payment protocol that lets you pay per API request using stablecoins. No API keys, no subscriptions—just pay and use.
{
"error": "Payment Required",
"message": "This endpoint requires $0.002 USDC payment",
"paymentDetails": {
"x402Version": 1,
"accepts": [{
"scheme": "exact",
"network": "base",
"maxAmountRequired": "0.002",
"asset": "USDC",
"payTo": "0x7d9ea6549d5b86ef07b9fa2f1cbac52fc523df65"
}],
"facilitatorUrl": "https://x402.org/facilitator"
}
}GET /api/token/security?address=<contract>&chain=<chain>address - Token contract address (required)chain - Network: base, eth, bsc, polygon, arbitrum (default: base)GET /api/contract/audit?address=<contract>&chain=<chain>address - Contract address (required)chain - Network (default: base)GET /api/liquidity/check?address=<contract>&chain=<chain>address - Token address (required)chain - Network (default: base)GET /api/wallet/risk?address=<wallet>&chain=<chain_id>address - Wallet address (required)chain - Chain ID (default: 1)GET /api/honeypot/check?address=<contract>&chain=<chain>address - Token address (required)chain - Network (default: base)GET /api/pair/analysis?address=<contract>&chain=<chain>address - Token address (required)chain - Network (default: base)GET /api/whale/activity?address=<contract>&chain=<chain>address - Token address (required)chain - Network (default: base)# Step 1: Make initial request (will return 402) curl https://quantumshield-api.vercel.app/api/token/security?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base # Step 2: After payment, retry with X-Payment header curl -H "X-Payment: <payment-proof>" \ https://quantumshield-api.vercel.app/api/token/security?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base
const checkToken = async (address, chain = 'base') => {
const url = `https://quantumshield-api.vercel.app/api/token/security?address=${address}&chain=${chain}`;
// Initial request - will return 402
const response = await fetch(url);
if (response.status === 402) {
const { paymentDetails } = await response.json();
console.log('Payment required:', paymentDetails);
// TODO: Process payment via x402 facilitator
// const paymentProof = await processPayment(paymentDetails);
// Retry with payment proof
// const data = await fetch(url, {
// headers: { 'X-Payment': paymentProof }
// });
}
return response.json();
};
// Usage
checkToken('0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', 'base');import requests
def check_token(address: str, chain: str = "base"):
url = f"https://quantumshield-api.vercel.app/api/token/security"
params = {"address": address, "chain": chain}
# Initial request - will return 402
response = requests.get(url, params=params)
if response.status_code == 402:
payment_details = response.json()["paymentDetails"]
print(f"Payment required: {payment_details}")
# TODO: Process payment via x402 facilitator
# payment_proof = process_payment(payment_details)
# Retry with payment proof
# headers = {"X-Payment": payment_proof}
# response = requests.get(url, params=params, headers=headers)
return response.json()
# Usage
result = check_token("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "base")
print(result)x402 is an open payment protocol that enables pay-per-request API calls using cryptocurrency. It's based on HTTP 402 'Payment Required' status code, finally giving it a purpose after decades of being unused.
We support Base, Ethereum, BSC, Polygon, and Arbitrum for token analysis. Payments are processed on Base using USDC.
You can bridge USDC from other chains using the official Base Bridge, or purchase directly through exchanges that support Base network.
No! That's the beauty of x402. You pay per request with no signup, no API keys, and no subscriptions required.
Once payment is verified, responses typically return within 1-2 seconds. The security data is fetched from GoPlus Security API in real-time.
Yes! This API is specifically designed for AI agents. x402 enables autonomous agents to pay for services without human intervention.
Visit x402.org for the protocol specification, or check out x402scan.com to see live x402 transactions and services.
Check out our GitHub or reach out for support