RWA API

Real World Asset API for AI Agents

Give your agent access to tokenized US Treasury bills, institutional money market funds, and on-chain corporate bonds. Earn 4–5% APY on stable assets without leaving the on-chain agent economy. BUIDL, USYC, OUSG and more — all via REST API or MCP tools.

View Docs Get API Key
6+
Supported RWA Products
~5%
T-Bill APY
5
API Endpoints
4
MCP Tools
Overview

What Are Real World Assets (RWAs)?

Real World Assets are traditional financial instruments that have been tokenized and placed on a blockchain. The underlying asset is held by a regulated custodian, while an on-chain token represents ownership and accrues yield.

🏛️
Traditional Finance, On-Chain
RWAs bring US Treasury bills, money market funds, corporate bonds, and other real-world instruments on-chain. The underlying assets are held by regulated custodians (BlackRock, Fidelity, Hashnote), while ERC-20 tokens represent ownership and yield claims.
On-Chain Composability
Unlike traditional T-bills that require brokerage accounts and T+1 settlement, tokenized RWAs settle instantly on-chain. They can be used as DeFi collateral, transferred to other agents, or swapped for stablecoins — all while continuing to accrue yield.
📈
Institutional Yield for Agents
With US T-bill yields at ~5%, tokenized treasury products offer AI agents a risk-free rate equivalent for idle stablecoin balances. This is often higher than DeFi lending rates and far more stable, making RWAs the optimal treasury management solution for conservative agents.

Agent use case: An AI trading agent generates USDC profits. Rather than holding idle USDC earning 0%, the agent automatically allocates to BUIDL or USYC via the RWA API, earning ~5% APY on capital between trades. When an opportunity arises, the agent sells the RWA position and redeploys capital in seconds — capturing institutional yield with DeFi-speed liquidity.


Supported Products

Supported RWA Products

Purple Flea integrates with the leading tokenized real-world asset protocols, covering US Treasuries, money market funds, corporate bonds, and yield-bearing stablecoins.

BlackRock
BUIDL Fund
BUIDL
~5.1%
APY (7-day trailing)
BlackRock USD Institutional Digital Liquidity Fund. The largest tokenized money market fund by AUM. Holds US Treasury bills and government repo agreements. Distributes yield daily as additional BUIDL tokens. Deployed on Ethereum by the world's largest asset manager.
Largest by AUM Daily Yield T-Bills + Repo
Hashnote
US Yield Coin
USYC
~5.2%
APY (7-day trailing)
Hashnote's tokenized short-term US Treasury bill product. USYC is backed directly by US government T-bills with daily yield accrual via exchange rate appreciation. Often the highest-yielding tokenized T-bill product available on-chain.
Highest APY Pure T-Bills Exchange Rate
Ondo Finance
US Gov Bond Fund
OUSG
~4.9%
APY (7-day trailing)
Ondo Finance's tokenized short-term US government bond fund. OUSG holds a mix of Treasury bills and short-duration government bonds. One of the most widely integrated RWA products in DeFi, with Flux Finance lending support.
DeFi Integrated Gov Bonds Flux Lending
Superstate
US Cash Corp Bonds
USCC
~5.4%
APY (7-day trailing)
Superstate's tokenized US cash and investment-grade corporate bond fund. USCC holds a blend of Treasuries and short-duration corporate bonds, offering slightly higher yield than pure T-bill products in exchange for minimal additional credit risk.
High APY Corp Bonds Blend Strategy
Mountain Protocol
USDM
USDM
~5.0%
APY (7-day trailing)
Mountain Protocol's yield-bearing stablecoin backed entirely by US Treasury bills. USDM pegs to $1.00 and rebases daily — your USDM balance increases automatically as yield accrues. Designed for maximum DeFi composability as a yield-bearing stablecoin.
Yield Stablecoin Daily Rebase DeFi Ready
Centrifuge
Trade Finance
CFG-TF
~7.2%
APY (7-day trailing)
Centrifuge tokenizes real-world trade finance receivables, invoice financing, and structured credit. Higher yield than government bonds in exchange for credit risk tied to business lending. Multiple pools available at different risk/return profiles.
Highest Yield Trade Finance Structured Credit

REST API

API Endpoints

All RWA operations are available via REST. Use your Purple Flea API key in the Authorization header. All purchase amounts are denominated in USDC.

Method Endpoint Description
GET /v1/rwa/list List all available RWA products with current yield, minimum investment, supported chains, AUM, issuer, and access tier. Includes 7-day APY history for trending analysis.
POST /v1/rwa/buy Purchase a tokenized RWA product. Specify product_id (buidl, usyc, ousg, uscc, usdm, centrifuge), amount_usdc, and optional slippage_bps. Returns RWA tokens received and transaction hash.
POST /v1/rwa/sell Sell an RWA position back to USDC. Specify product_id and amount (or "all"). Returns USDC received and settlement time (some products have T+0 instant redemption, others T+1).
GET /v1/rwa/position Get current RWA holdings across all products. Returns per-product balances, USDC equivalent, total yield earned since purchase, and accrued unrealized yield.
GET /v1/rwa/yield Get accrued yield across all RWA positions, broken down by product. Returns daily yield amount, total yield since inception, and projected annual yield at current rates.
cURL — GET /v1/rwa/list
curl https://api.purpleflea.com/v1/rwa/list \
  -H 'Authorization: Bearer pf_live_your_key'

# Response (truncated)
{
  "products": [
    {
      "id": "uscc",
      "name": "Superstate US Cash Corp Bonds",
      "token": "USCC",
      "issuer": "Superstate",
      "apy_7d": 5.41,
      "underlying": "US Treasuries + Corp Bonds",
      "min_investment_usdc": 100,
      "redemption_type": "T+0",
      "kyc_required": true,
      "chain": "ethereum"
    },
    {
      "id": "usdm",
      "name": "Mountain Protocol USDM",
      "token": "USDM",
      "apy_7d": 5.03,
      "redemption_type": "instant",
      "kyc_required": false
    }
  ]
}

Integration

Autonomous RWA Treasury Agent — Python

This agent monitors idle USDC in the wallet, automatically allocates to the highest-yielding RWA product above a reserve, and rebalances when a better-yielding product becomes available. It represents a complete autonomous treasury management strategy.

Python — Autonomous RWA Treasury Agent
import requests
import time
from datetime import datetime

API_KEY = "pf_live_your_api_key"
BASE_URL = "https://api.purpleflea.com"
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}

USDC_RESERVE = 100       # Keep $100 USDC liquid for operations
INVEST_THRESHOLD = 50   # Invest when idle USDC > $50 above reserve
REBALANCE_BPS = 25      # Rebalance if better product has 25bps higher APY

def get_best_rwa(products):
    """Return the highest-APY product accessible without extra KYC."""
    accessible = [p for p in products if p.get("access_granted", False)]
    if not accessible:
        accessible = [p for p in products if not p["kyc_required"]]
    return max(accessible, key=lambda p: p["apy_7d"]) if accessible else None

def allocate_idle_usdc(usdc_balance, products):
    """Buy RWA with idle USDC above reserve."""
    idle = usdc_balance - USDC_RESERVE
    if idle < INVEST_THRESHOLD:
        return None

    best = get_best_rwa(products)
    if not best:
        print("No accessible RWA products — check KYC status")
        return None

    print(f"Allocating ${idle:.2f} USDC to {best['token']} ({best['apy_7d']}% APY)")
    r = requests.post(f"{BASE_URL}/v1/rwa/buy", headers=HEADERS, json={
        "product_id": best["id"],
        "amount_usdc": str(idle)
    })
    result = r.json()
    print(f"Purchased {result['tokens_received']} {best['token']} | tx: {result['tx_hash'][:12]}...")
    return result

def check_rebalance(positions, products):
    """Rebalance to higher-yield RWA if spread exceeds threshold."""
    best = get_best_rwa(products)
    if not best:
        return

    for pos in positions:
        current_product = next((p for p in products if p["id"] == pos["product_id"]), None)
        if not current_product or current_product["id"] == best["id"]:
            continue

        spread_bps = (best["apy_7d"] - current_product["apy_7d"]) * 100
        if spread_bps > REBALANCE_BPS:
            print(f"Rebalancing {current_product['token']} → {best['token']} (+{spread_bps:.0f}bps)")
            # Sell current position
            sell = requests.post(f"{BASE_URL}/v1/rwa/sell", headers=HEADERS, json={
                "product_id": pos["product_id"], "amount": "all"
            }).json()
            usdc_received = float(sell["usdc_received"])
            # Buy better product
            requests.post(f"{BASE_URL}/v1/rwa/buy", headers=HEADERS, json={
                "product_id": best["id"], "amount_usdc": str(usdc_received)
            })

def log_yield_report():
    """Print daily yield summary."""
    yield_data = requests.get(f"{BASE_URL}/v1/rwa/yield", headers=HEADERS).json()
    print(f"Daily yield earned: ${yield_data['daily_yield_usd']:.4f}")
    print(f"Total yield to date: ${yield_data['total_yield_usd']:.4f}")
    print(f"Projected annual yield: ${yield_data['projected_annual_usd']:.2f}")

# Main agent loop
while True:
    print(f"[{datetime.now().isoformat()}] RWA treasury check")
    products = requests.get(f"{BASE_URL}/v1/rwa/list", headers=HEADERS).json()["products"]
    wallet = requests.get(f"{BASE_URL}/v1/wallet/balance", headers=HEADERS).json()
    positions = requests.get(f"{BASE_URL}/v1/rwa/position", headers=HEADERS).json()["positions"]

    allocate_idle_usdc(wallet["balances"]["USDC"], products)
    check_rebalance(positions, products)
    log_yield_report()
    time.sleep(3600)  # Run every hour

Value Proposition

Why RWAs for AI Agents?

Tokenized real-world assets solve the "idle capital" problem that plagues most AI agents — capital sitting in stablecoins between operations, earning nothing. RWAs provide stable, institutional-grade yield with on-chain composability.

Institutional-Grade Credit Quality

US Treasury bills are backed by the full faith and credit of the US government — the lowest credit risk available in global finance. Unlike DeFi protocol risks, T-bill credit risk is essentially zero. This makes RWAs the safest yield option for agents managing significant capital.

Stable, Predictable Yield

RWA yields track the federal funds rate rather than fluctuating DeFi supply/demand dynamics. An agent can model expected revenue from its RWA allocation with high confidence — making treasury planning deterministic. No yield farming volatility, no liquidity crises.

On-Chain Composability

RWA tokens are standard ERC-20s. They can be used as collateral in Aave or Compound, transferred via Purple Flea escrow to other agents, or swapped for USDC via DEX at any time. The underlying T-bill yield keeps accruing even while the token is in a DeFi protocol.

No Counterparty Risk vs. CeFi

Unlike depositing USDC in centralized yield products (which carry exchange solvency risk), tokenized RWAs maintain on-chain custody of the underlying instruments. Ownership is verifiable on-chain at all times, and yield accrues via smart contract logic rather than relying on a custodian's ledger entries.


Compliance & Access

Compliance and Agent Access

Some RWA products require KYC or accredited investor verification due to securities regulations. Purple Flea handles this at the agent-operator level so individual agents don't need per-transaction checks.

KYC-Lite Agent Registration

RWA products like BUIDL and OUSG require whitelisted addresses due to securities law. Purple Flea provides a one-time KYC flow where the human operator of an agent completes verification. Once approved, all agents under that operator's key are whitelisted and can trade RWAs autonomously without interruption.


Products like USDM (Mountain Protocol) have no KYC requirement and are accessible immediately after getting an API key. Check the kyc_required field in the GET /v1/rwa/list response to see access requirements per product.


Supported jurisdictions: US (accredited investors), EU, UK, Singapore, UAE, and most non-OFAC jurisdictions. See /security for full compliance details.


Portfolio Strategy

Portfolio Construction with RWAs

Agents can combine RWA allocations with DeFi yield strategies to optimize the risk/return profile of their on-chain treasury. The table below shows indicative portfolio constructions for different agent risk profiles.

Agent Profile RWA Allocation DeFi Allocation Blended APY Risk
Conservative Treasury 80% — BUIDL + USYC 20% — Aave USDC ~5.0% Low
Balanced Yield Agent 50% — OUSG + USCC 50% — stETH + Aave ~5.8% Medium
Yield Maximizer 30% — USDM 70% — restaked stETH + Centrifuge ~7.2% Medium-High
Trading Agent Reserve 100% — USDM (instant redemption) 0% — stays liquid ~5.0% Low
Centrifuge Credit Focus 60% — T-Bills (BUIDL) 40% — Centrifuge Trade Finance ~6.1% Medium

APY figures are indicative only. Actual returns vary with market conditions and are not guaranteed. Not financial advice.


MCP Integration

MCP Tools for RWA

AI agents using the Purple Flea MCP server can call RWA operations directly as tools in their reasoning loop. Set up via the MCP config generator.

rwa_list_assets
rwa_buy
rwa_sell
rwa_get_yield
rwa_get_position
MCP Tool Call — rwa_buy
{
  "tool": "rwa_buy",
  "parameters": {
    "product_id": "usyc",
    "amount_usdc": "500"
  }
}
// Returns:
{
  "tokens_received": "498.43",
  "token": "USYC",
  "current_apy": 5.21,
  "tx_hash": "0xdef456...",
  "daily_yield_usd": "0.071"
}

System prompt snippet for MCP agents: "Whenever your USDC balance exceeds $150, call rwa_list_assets to find the best-yielding accessible product, then use rwa_buy to allocate idle capital. Before any large outgoing payment, call rwa_sell to liquidate the required amount. Always maintain a $100 USDC operational reserve."


Related APIs

Complete Your Agent's Financial Stack

RWAs cover stable yield. Combine with liquid staking for ETH yield, lending for capital efficiency, and wallet APIs for full autonomous treasury management.

GET STARTED

Earn Institutional-Grade Yield with Your Agent

Get an API key and start allocating idle USDC to tokenized T-bills in minutes. USDM access requires no KYC — start earning today.