You don't need to set up an API key, an SDK or a framework. The whole point of x402 and agentic.market is that you give your agent a wallet once - and after that, you just ask it questions in plain language. The agent discovers the SwapHunt service itself, pays a fraction of a cent per call in USDC, and answers you.

The service is live: agentic.market/services/x402-swaphunt-dev. The full endpoint list and prices are on the SwapHunt API page.

What Is x402?

x402 is a payment protocol built on the HTTP status code 402 ("Payment Required"). It lets an AI agent pay for a single API request in USDC, without an account or an API key. The agent calls the endpoint, the server answers 402 with the price and payment details, the agent signs a USDC payment and repeats the request with the payment attached, and gets the answer back. The unit of cost is the question, not the subscription.

Key Takeaways

  • Agentic payments remove the friction layer between asking a question and getting market data: no API keys, no subscriptions, no developer account
  • A single Agentic Wallet, funded once with a few dollars of USDC on Base, covers hundreds to thousands of SwapHunt queries at $0.001–$0.005 each
  • The shift is structural: instead of integrating APIs by hand, agents discover and compose paid endpoints at the moment of the question
  • This changes what's worth building: composable research, automated market reads, and on-demand context become cheap enough to be casual

Get new research by email. No spam.

Subscribe →

The Finished Flow

You: "Is the crypto market in fear or greed right now, and has that changed this month?"

The agent: (finds x402.swaphunt.dev via the Bazaar → pays $0.002 in USDC →)
"The Fear & Greed Index is 38: Fear. A month ago it was 61, Greed, so sentiment has cooled. Data provided by Alternative.me."

(Illustrative example; the numbers are not live data.)

No API key. No SwapHunt account. The agent handles discovery and payment itself.

How to Set Up x402 Payments (2 Minutes)

Your agent needs an Agentic Wallet (a wallet for your agent, made by Coinbase) with a small amount of USDC on Base. How you set it up depends on which agent you use. SwapHunt also accepts USDC on Polygon, Arbitrum and Solana, so any x402 client with a wallet on one of those networks works too.

Terminal Agents - Claude Code, Codex CLI, Gemini CLI, Cursor

  1. Check whether a wallet already exists: npx awal status. If it does, you're done.
  2. Log in: npx awal auth login [email protected]. A 6-digit code arrives by email; confirm it with npx awal auth verify <flowId> <code> (the login command prints the flow ID).
  3. Open the wallet UI with npx awal show and buy or deposit some USDC on Base.
  4. Confirm the funds arrived: npx awal balance.

Chat Agents - Claude Desktop, ChatGPT, Cherry Studio

  1. Ask the agent: "Set up my Agentic Wallet."
  2. Run the one line it gives you in your terminal: npx @coinbase/payments-mcp.
  3. Restart the app. The agent now has a wallet and can pay.

You only need to fund the wallet with small amounts: SwapHunt calls cost $0.001–$0.005 each, so a single dollar of USDC covers between 200 and 1,000 queries.

How the Agent Learns About SwapHunt

You do nothing manually. Two things happen on their own.

Discovery. SwapHunt lists its routes in the x402 Bazaar (the discovery layer behind agentic.market) with a description, example input and example output for each, so the agent can read what each endpoint does and pick the right one for the question.

Skill. If your agent doesn't already know x402, paste this line into the chat once:

Read https://agentic.market/SKILL.md and use it to find and pay for x402 services.

The agent now knows how to discover and pay. From then on, you just ask in plain language.

Example Prompts You Can Use

Write naturally. The agent matches your question to the right endpoint by itself.

You write … Agent calls (on its own)
"Is the market in fear or greed?" GET /v1/market/fear-greed
"Is sentiment better or worse than last week?" GET /v1/market/fear-greed/compare
"How has fear and greed moved over the past three months?" GET /v1/market/fear-greed/history?days=90
"How long until the next Bitcoin halving?" GET /v1/market/halving?coin=BTC
"What trading session are we in, and is there liquidity?" GET /v1/context/session + GET /v1/context/weekend-liquidity

You don't need to know the path names (they are all listed on the API page). The table is only there to show that the agent is translating your question into the right paid call.

Why This Matters for Traders

The friction layer between a question and an answer used to be the API. You signed up, generated a key, read the docs, hit rate limits, paid a monthly subscription whether you used it heavily or barely at all. The cost of asking "is this overextended?" was high enough that you didn't ask casually: you batched questions, you cached responses, you built dashboards instead of asking.

Agentic payments invert that. The cost of a single market read is now a fraction of a cent, paid only when you actually need it. Asking costs almost nothing. That changes the rhythm of how traders interact with data.

It also removes the integration tax. You don't need an OpenAPI spec, an SDK, a sandbox environment. The agent reads the endpoint description on the Bazaar and figures out the call itself. What used to be a developer workflow becomes a conversation.

The Structural Shift

There's a difference between an API that an agent can call and a service designed for agentic commerce. Traditional APIs assume a long-lived developer relationship: signup, authentication, billing, support. The unit of cost is the account, not the question.

x402 makes the unit of cost the request itself. SwapHunt doesn't know who is calling: it sees a paying wallet address and a valid payment, nothing more. The agent doesn't know who is providing the answer - it knows that the Bazaar listed an endpoint matching its question and that payment cleared.

This is what composability looks like when payment is built in at the protocol layer. An agent assembling an answer to "what's the structural read on ETH right now?" can pay three different services, say one for prices, one for sentiment and one for on-chain flows, without negotiating three separate contracts, three sets of credentials, three billing cycles. The composition happens at the moment of the question.

For market data specifically, the implication is that reading the market becomes cheap and casual. The expensive part of trading was never the data - it was the interpretation. When the data is one sentence away, the interpretation work gets to happen more often, on more questions, at lower stakes.

What You Can Build Now

Three patterns worth thinking about:

Composable research. A single agent assembles answers across multiple endpoints and services, for example SwapHunt's sentiment and session context next to another service's prices, paying per call. No upfront contracts. The agent picks what to query based on the question you actually asked, not what you guessed in advance.

On-demand market reads. Instead of always-on dashboards, you ask for a read when you need one. "Is the market in fear right now?" is a single call. The cost matches the casualness of the question.

Automated signal pipelines. A scheduled agent runs every hour and pays up to $0.005 (at most $0.12 a day) to see whether something has shifted structurally. If nothing has changed, it doesn't notify you. If something has, you get a sentence-long summary. The economics work because the cost is bounded and predictable.

The common thread is that the unit of work, and the unit of cost, has dropped to the level of the individual question. That's a different design space than rate-limited APIs allow.

Want to Test Without an Agent at All?

Pure terminal test of the exact same payment flow, one line, no framework:

npx awal x402 pay "https://x402.swaphunt.dev/v1/market/fear-greed"
npx awal x402 pay "https://x402.swaphunt.dev/v1/market/halving?coin=BTC"

Same wallet, same payment, same response. The difference is just whether you or the agent decided what to ask for.

Want to call the API from your own code instead? swaphunt/x402-examples on GitHub has runnable Python and TypeScript examples, from a single paid call to a daily market brief. It also has an MCP server that gives Claude and other MCP agents a SwapHunt tool for each endpoint, paid per call with a spending cap per session.

Frequently Asked Questions

What is x402?

x402 is a payment protocol that attaches payment directly to an HTTP request. A service replies with HTTP 402 and the price of the call, the agent pays in USDC, and the request goes through. There is no signup, no API key, and no monthly plan. The provider sees only the paying wallet address and that valid payment arrived with the request, not who the caller is.

Do I need an API key to use SwapHunt with an AI agent?

No. That is the point of the x402 setup. Your agent finds the SwapHunt endpoints on the agentic.market Bazaar, reads what each one does, and pays per call from its own wallet. You never create a SwapHunt account or generate a key.

How much does an x402 market data call cost?

SwapHunt calls cost between $0.001 and $0.005 each, paid in USDC on Base, Polygon, Arbitrum or Solana. One dollar of USDC covers 200 to 1,000 queries. The current price of every endpoint is on the API page. You fund the wallet once and top it up when it runs low, rather than paying a subscription whether you use it or not.

What is an Agentic Wallet?

An Agentic Wallet is a wallet made by Coinbase that your agent spends from, instead of your own wallet. You fund it with a small amount of USDC, and the agent spends from it per request. Setup takes a few terminal commands for CLI agents (sign in, verify, fund), or one prompt plus one terminal command for chat agents like Claude Desktop.