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.
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.
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.
Purple Flea integrates with the leading tokenized real-world asset protocols, covering US Treasuries, money market funds, corporate bonds, and yield-bearing stablecoins.
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 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 } ] }
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
{
"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."
RWAs cover stable yield. Combine with liquid staking for ETH yield, lending for capital efficiency, and wallet APIs for full autonomous treasury management.
Get an API key and start allocating idle USDC to tokenized T-bills in minutes. USDM access requires no KYC — start earning today.