Robinhood Chain KOL Signals in Your AI Agent: Pay Per Call with x402 and USDG
A working walkthrough: have an AI agent buy live Robinhood Chain KOL trade signals per call, paying in USDG via x402 — no API key, no signup. About 30 lines with viem and fetch.

This is the Robinhood Chain sibling of our Solana walkthrough, Build an AI Agent That Buys Solana KOL Signals in 20 Lines. Same idea — an agent pays per call for KOL signals with no API key — but here it pays in USDG on Robinhood Chain via the EIP-3009 leg, instead of USDC on Solana. If you've done the Solana one, this is the EVM version.
We'll fetch the live Robinhood Chain KOL trade feed and pay for it with a wallet, keyless.
What you need
- A wallet with a little USDG on Robinhood Chain (no ETH needed — the payer only signs; the facilitator pays gas).
- Node and
viem(npm i viem).
That's it. No account, no API key, no subscription. The wallet is the key.
The flow
Each eligible listed MadeOnSol Robinhood Chain x402 endpoint answers an unpaid request with 402 Payment Required and a challenge listing its payment options. To pay the USDG leg, you sign an EIP-3009 transferWithAuthorization — an off-chain signature — and retry the request with it attached. The facilitator settles it on-chain and returns the data.
The code
import { randomBytes } from "node:crypto";
import { privateKeyToAccount } from "viem/accounts";
import { getAddress } from "viem";
const url = "https://madeonsol.com/api/x402/rhc/kol/feed?limit=5";
const expectedAsset = "0x5fc5360d0400a0fd4f2af552add042d716f1d168";
const trustedPayTo = process.env.TRUSTED_PAY_TO; // Verify independently first.
const key = process.env.PRIVATE_KEY; // Isolated test wallet only.
const maximum = 40000n; // This example refuses offers above 0.04 USDG.
if (!trustedPayTo || !key) throw new Error("Configure wallet and trusted recipient");
const unpaid = await fetch(url);
if (unpaid.status !== 402) throw new Error("Expected a payment challenge");
const challenge = await unpaid.json();
if (challenge.x402Version !== 2) throw new Error("Unsupported payment version");
const leg = challenge.accepts?.find(a =>
a.network === "eip155:4663" && a.scheme === "exact" &&
a.asset?.toLowerCase() === expectedAsset &&
a.payTo?.toLowerCase() === trustedPayTo.toLowerCase()
);
if (!leg || !/^\d+$/.test(leg.amount)) throw new Error("No trusted offer");
if (BigInt(leg.amount) <= 0n || BigInt(leg.amount) > maximum)
throw new Error("Offer exceeds budget");
if (leg.extra?.name !== "Global Dollar" || leg.extra?.version !== "1")
throw new Error("Unexpected signing domain");
const account = privateKeyToAccount(key);
const now = Math.floor(Date.now() / 1000);
const authorization = {
from: account.address,
to: getAddress(leg.payTo),
value: leg.amount,
validAfter: "0",
validBefore: String(now + 60),
nonce: "0x" + randomBytes(32).toString("hex"),
};
const types = { TransferWithAuthorization: [
{ name: "from", type: "address" }, { name: "to", type: "address" },
{ name: "value", type: "uint256" }, { name: "validAfter", type: "uint256" },
{ name: "validBefore", type: "uint256" }, { name: "nonce", type: "bytes32" },
] };
const signature = await account.signTypedData({
domain: { name: "Global Dollar", version: "1", chainId: 4663,
verifyingContract: expectedAsset },
types, primaryType: "TransferWithAuthorization",
message: { ...authorization, value: BigInt(authorization.value),
validAfter: 0n, validBefore: BigInt(authorization.validBefore) },
});
const envelope = {
x402Version: 2, accepted: leg,
...(challenge.resource ? { resource: challenge.resource } : {}),
payload: { signature, authorization },
};
// One signed retry. Do not automatically pay again after an uncertain response.
const response = await fetch(url, { headers: {
"PAYMENT-SIGNATURE": Buffer.from(JSON.stringify(envelope)).toString("base64"),
} });
console.log("HTTP status:", response.status);
console.log("Settlement header:", response.headers.get("PAYMENT-RESPONSE"));
console.log(await response.text());
The example shows the intended v2 envelope and one signed retry. Review the current dependencies and run unfunded validation first. This guide did not execute a paid request or assert live settlement or byte-for-byte parity with the keyed endpoint. The PAYMENT-RESPONSE header carries the on-chain settlement transaction.
Building a product on Solana or Robinhood Chain data?
Skip the Geyser pipeline — embed KOL flow, deployer reputation, and the all-DEX firehose over REST, WebSocket, or webhooks. The Business tier (€400/mo) is the self-serve embed license at 500k calls/day — Enterprise adds white-label & redistribution.
What just happened
- You never registered or held an API key. The signed authorization was the auth.
- You paid in USDG on Robinhood Chain — the stablecoin an RHC-native agent already holds — with no bridging.
- You paid no gas.
transferWithAuthorizationlets you authorize the exact amount to the exact recipient with a signature; the facilitator broadcasts it and covers gas. - The current ordinary-route USDG offer has a $0.04 floor; always read and cap the actual amount. (If your agent lives on Solana instead, the same endpoint also accepts USDC on Solana — see Dual-Accept x402.)
Swap in any endpoint
For a different endpoint, first validate its declared parameters, payment offer, budget and response contract:
/api/x402/rhc/kol/hot-tokens— tokens multiple KOLs are buying/api/x402/rhc/tokens/{address}/buyer-quality— early-buyer quality score/api/x402/rhc/tokens/{address}/kol-consensus— how the KOL cohort is positioned
The free discovery endpoint lists them all so your agent can self-configure:
curl https://madeonsol.com/api/x402/rhc
Want a repo you can clone and run instead of copy-paste? See the Robinhood Chain x402 starter repo. For the concepts behind the flow, How AI Agents Pay for Robinhood Chain Data in USDG. Full endpoint reference: the Robinhood Chain x402 page.
Calling steadily? A flat monthly plan bundles both chains at no extra cost (both chains bundled — personal Free key: 200 calls/day, account required, 30-day validity with free regeneration, no card) — madeonsol.com/pricing.
MadeOnSol provides data only across Solana and Robinhood Chain — no execution, no custody. The x402 payment settles wallet-to-wallet through a non-custodial facilitator.
Tools mentioned
Compare features and read reviews.
Live health scores, average ratings, and direct links on MadeOnSol.
Build with MadeOnSol API
KOL tracking, deployer intelligence, DEX streaming, and webhooks. Free API key — 200 requests/day.
import { MadeOnSol } from "madeonsol";
// Get a free API key at madeonsol.com/pricing
const client = new MadeOnSol({ apiKey: "msk_your_key" });
const { trades } = await client.kol.feed({ limit: 10 });
const { alerts } = await client.deployer.alerts({ limit: 5 });
const { tools } = await client.tools.search({ q: "trading" });Building a product on Solana or Robinhood Chain data?
MadeOnSol isn't an RPC or another generic token API — it's Solana & Robinhood Chain memecoin intelligence that's painful to build in-house, pulled from dual-region gRPC shred streams and our own Robinhood Chain node, pushed to your app as events land.
Signals you'd otherwise build
KOL & smart-money flow from 2,000+ labeled wallets, deployer reputation, coordination clusters, linked-wallet entity resolution, and an all-DEX firehose.
Embed it in your product
The Business tier (€400/mo, self-serve) licenses you to display MadeOnSol data inside your own product — 500k calls/day, 15 WS + 6 firehose connections. Enterprise above adds white-label & redistribution rights and custom endpoints.
Evaluate first, commit later
Test everything on a free ULTRA key — no commitment. If it fits, we scope volume or white-label pricing.
Keep reading
More from the blog.

Guides
Does x402 Only Work with USDC? USDG, EIP-3009 and Robinhood Chain Explained
A common myth says x402 payments only work with USDC. They don't. USDG (Global Dollar) implements EIP-3009, so it works with x402 today — and it settles natively on Robinhood Chain. Here's why, with the on-chain details.

Guides
How AI Agents Pay for Robinhood Chain Data in USDG (x402, No API Key)
AI agents can now buy Robinhood Chain KOL and deployer intelligence per call — no signup, no API key, the wallet is the key. Here's how the x402 payment flow works, and why you can pay in USDG on Robinhood Chain or USDC on Solana.

Guides
Dual-Accept x402: Pay in USDG on Robinhood Chain or USDC on Solana, One Endpoint
One x402 endpoint, two ways to pay: USDG on Robinhood Chain (EVM) or USDC on Solana (SVM). Here's how the x402 accepts[] array lets a single resource take payment on two chains — and why the agent picks.

Guides
Robinhood Chain x402 Starter: Clone, Run, and Pay for RHC Data in USDG
A minimal starter repo that pays a MadeOnSol Robinhood Chain endpoint per call in USDG via x402 — clone it, drop in a wallet key, and you're querying live KOL data in a minute. No API key.

API Guides
MCP vs x402 vs API Subscriptions for AI Agents: Architecture, Costs and Limits
MCP connects your agent to tools; x402 pays for eligible API calls; subscriptions authorize sustained data access. Compare the real trade-offs, payment rails, costs, tier limits and failure modes for Solana and Robinhood Chain agents.

API Guides
Build a Solana & Robinhood Chain Memecoin Research Agent: Six Intelligence Checks
Design an evidence-backed memecoin research agent with six MadeOnSol intelligence actions: KOL discovery, token risk, deployer history, wallet analysis, signal reliability and cursor-based changes.
Enjoyed this article?
Explore the live data.
Real-time KOL trades, Pump.fun deployer intel, and 1,200+ ranked Solana & Robinhood Chain tools — free to explore.
Open the KOL Tracker

