Tokenized asset
GET /api/rwa-assetOne 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...
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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Asset id from rwa-list (gold, nvidia, tesla, ...). Up to 100 characters. The example sends gold. |
currency | string | no | vs 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¤cy=usd"
Watch a call get paid
GET /api/rwa-asset$0.006 USDCPAYMENT-SIGNATUREon 14 chains200 OKAgent402-ReceiptEd25519Example 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)."
}| Field | Type | Always present | In the example |
|---|---|---|---|
source | string | yes | coingecko |
fetchedAt | string | yes | 2026-09-02T18:50:00.000Z |
cached | boolean | yes | false |
id | string | yes | gold |
symbol | string | yes | XAU |
name | string | yes | Gold |
type | string | yes | commodity |
image | string | yes | https://coin-images.coingecko.com/coins/images/10481/large/logo.png |
webSlug | string | yes | gold |
lastUpdated | string | yes | 2026-09-02T18:49:00Z |
market | object | yes | 17 fields: id, symbol, name, type, image, currency and 11 more |
credit | string | yes | Powered 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
- Pay $0.006 per call over x402 or MPP. Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key (
Authorization: Bearer a402_...) also pays it. - Required:
id; a rejected input answers 4xx witherror,tool,expected,requiredandexample. - On this route, a call ending in any status of 400 or above is not charged over x402, MPP or a credits key. A Tempo push credential pays before the call; a failure is a refund owed.
- A
POSTwith a JSON body is served as this GET. - An
Idempotency-Keyreplays the first 200 uncharged (an answer larger than 1 MB is not replayed).
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¤cy=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¤cy=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