Skip to content

Tokenized asset

$0.006 per callUSDC via x402GET /api/rwa-asset

One tokenized real-world asset by id (gold, nvidia, tesla, spy ...): identity, type, image and web slug joined with its onchain market row - price, market cap...

Category: Crypto & onchain dataTags: crypto rwa tokenized stock commodity market-data profile

Try in playground →

Details

One tokenized real-world asset by id (gold, nvidia, tesla, spy ...): identity, type, image and web slug joined with its onchain market row - price, market cap, 24h volume and change in your currency, and tracking against its reference asset (gold and silver against the troy-ounce spot rate: referencePrice, premiumBps and referenceStatus; null for a stock or ETF). Cached upstream reads, one answer. Use rwa-list to find the id. Powered by CoinGecko (https://www.coingecko.com/en/api).

Parameters

NameTypeRequiredDescription
idstringyesAsset id from rwa-list (gold, nvidia, tesla, ...). Up to 100 characters. The example sends gold.
currencystringnovs currency for the market block (default usd). Up to 8 characters. The example sends usd.

Example request

curl -i "https://agent402.tools/api/rwa-asset?id=gold&currency=usd"

Watch a call get paid

RequestGET /api/rwa-asset
402$0.006 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "source": "coingecko",
  "fetchedAt": "2026-09-02T18:50:00.000Z",
  "cached": false,
  "id": "gold",
  "symbol": "XAU",
  "name": "Gold",
  "type": "commodity",
  "image": "https://coin-images.coingecko.com/coins/images/10481/large/logo.png",
  "webSlug": "gold",
  "lastUpdated": "2026-09-02T18:49:00Z",
  "market": {
    "id": "gold",
    "symbol": "XAU",
    "name": "Gold",
    "type": "commodity",
    "image": "https://coin-images.coingecko.com/coins/images/10481/large/logo.png",
    "currency": "usd",
    "price": 4376.6,
    "marketCap": 5219552133,
    "volume24h": 557496353,
    "high24h": 4394.94,
    "low24h": 4289.36,
    "change24h": 42.77,
    "change24hPct": 0.98698,
    "marketCapChange24h": 44135859,
    "marketCapChange24hPct": 0.8528,
    "lastUpdated": "2026-09-02T18:49:00Z",
    "tracking": {
      "reference": "XAU spot",
      "referencePrice": 4361.2,
      "premiumBps": 35.31,
      "referenceStatus": "read"
    }
  },
  "credit": "Powered by CoinGecko (https://www.coingecko.com/en/api)."
}
FieldTypeAlways presentIn the example
sourcestringyescoingecko
fetchedAtstringyes2026-09-02T18:50:00.000Z
cachedbooleanyesfalse
idstringyesgold
symbolstringyesXAU
namestringyesGold
typestringyescommodity
imagestringyeshttps://coin-images.coingecko.com/coins/images/10481/large/logo.png
webSlugstringyesgold
lastUpdatedstringyes2026-09-02T18:49:00Z
marketobjectyes17 fields: id, symbol, name, type, image, currency and 11 more
creditstringyesPowered by CoinGecko (https://www.coingecko.com/en/api).

From an MCP client

catalog.call {
  "slug": "rwa-asset",
  "params": {
    "id": "gold",
    "currency": "usd"
  }
}

Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.18.0): pays from a wallet or AGENT402_CREDITS_KEY.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.006" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/rwa-asset?id=gold&currency=usd");

Get a wallet or run npx -y agent402-mcp@0.18.0 wallet new.

The quote (Python)

import base64, json, urllib.error, urllib.request

req = urllib.request.Request("https://agent402.tools/api/rwa-asset?id=gold&currency=usd", method="GET", headers={})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
    print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]])  # the price, per chain, in base units

Related tools