{"uid":"cap_CWHqOGjSZB3qta1wthQ51","slug":"crypto-microdata-for-agents-x402-payment-test-get-crypto-test-78e56112","name":"Crypto Microdata for Agents – x402 Payment Test (GET /crypto/test)","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/crypto/test?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"],"type":"string"},"queryParams":{"type":"object","properties":{"echo":{"type":"string","examples":["my-agent-1"],"maxLength":64,"description":"Optional string echoed back (correlate your test call)"},"testRunId":{"type":"string","examples":["run-001"],"maxLength":100,"description":"Optional caller-supplied correlation ID for a bounded validation run (echoed back)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"t":"2026-10-28T14:00:00Z","ok":true,"next":["/crypto/simulate","/crypto/ens","/crypto/liquidations?coin=BTC","/crypto/base-gas"],"receiptId":"rcpt_0b9f6c1e2a7d4c55","testRunId":"run-001","nextAction":"call_paid_data","paymentVerified":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4pwEV2oB_LJuRKA1-9Dxs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates an x402 USDC micropayment end-to-end and returns a receipt plus links to the next available paid crypto-data endpoints.","exampleAgentPrompt":"Run a quick x402 payment test with echo tag 'my-agent-1' and testRunId 'run-001' so I can confirm my USDC micropayment pipeline on Base is working and see which crypto data endpoints I should call next.","exampleUseCases":[{"title":"First-time x402 integration smoke test","prompt":"I just wired up my x402 USDC client on Base — can you fire a test call with echo 'onboarding-check' and testRunId 'smoke-001' so I can confirm the payment goes through and grab the receipt ID?"},{"title":"Pre-trade agent payment validation","prompt":"Before my trading agent starts pulling live prices, verify the x402 payment flow is healthy by running a test call tagged testRunId 'pre-trade-run' and tell me which paid data endpoints are listed in the response."},{"title":"Correlation of payment test in a CI pipeline","prompt":"In my CI run, send a crypto test payment with testRunId 'ci-build-42' and echo 'ci-agent', then confirm paymentVerified is true and return the receiptId so I can log it."}],"resultDescription":"Returns a JSON object with a timestamp, ok=true flag, paymentVerified=true, a receiptId for the completed micropayment, the echoed testRunId, a nextAction hint ('call_paid_data'), and an array of sibling endpoint paths the agent can call next (e.g. /crypto/base-gas, /crypto/simulate, /crypto/liquidations).","failureModes":["Payment not received or USDC balance insufficient — 402 Payment Required returned before any data","Invalid or missing x402 payment header — request rejected before processing","Worker cold-start or Cloudflare outage — 503 or timeout","Echo or testRunId exceeds max length (64 / 100 chars) — validation error","Network error reaching the Cloudflare Worker edge — connection timeout"],"whenToPreferThis":"Use this endpoint as the cheapest ($0.001 USDC) way to verify that your x402 payment client, USDC wallet on Base, and HTTP plumbing are all working before spending budget on real crypto data calls. Prefer it over calling a substantive data endpoint for integration testing or CI health checks, since it is purpose-built for validation and returns receipt metadata plus a discovery list of next steps.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:38.058Z","isFirstParty":false,"canonicalSlug":"crypto-microdata-for-agents-x402-payment-test-get-crypto-test-78e56112"}