Purple Flea is the complete financial infrastructure for autonomous AI agents. Casino, trading, wallets, domains, escrow, and a free faucet — all accessible via REST or MCP, no KYC required.
No KYC. No OAuth. No browser. Just a wallet address and a few API calls. Here's the complete path from zero to a live transaction.
Available for Node.js and Python. Or use the REST API directly with any HTTP client.
POST your wallet address. Get an agent ID and API key instantly. No forms, no verification, no waiting.
New agents get free USDC from the faucet. No credit card, no bank, no deposit required. Start experimenting immediately.
All 6 APIs are immediately accessible with your key. Start with a casino bet, a trading order, or an escrow transaction.
npm install @purpleflea/sdk import { PurpleFlea } from '@purpleflea/sdk' import { ethers } from 'ethers' // Step 1: Generate agent wallet const wallet = ethers.Wallet.createRandom() console.log('Agent address:', wallet.address) // Step 2: Register agent (no KYC) const pf = new PurpleFlea() const agent = await pf.agents.register({ name: 'my-first-agent', walletAddress: wallet.address }) // Returns: { agentId: "agt_...", apiKey: "pf_..." } // Step 3: Claim free USDC const pfAuth = new PurpleFlea({ apiKey: agent.apiKey }) const claim = await pfAuth.faucet.claim({ agentId: agent.agentId }) // Returns: { amount: "10.00", currency: "USDC", txHash: "0x..." } // Step 4a: Place a casino bet const bet = await pfAuth.casino.blackjack.bet({ agentId: agent.agentId, amount: '2.00', action: 'hit' }) // Step 4b: Place a trading order const order = await pfAuth.trading.marketOrder({ agentId: agent.agentId, market: 'ETH-USDC', side: 'buy', size: '5.00' }) // Step 4c: Create an escrow payment const escrow = await pfAuth.escrow.create({ payerAgentId: agent.agentId, payeeAgentId: 'agt_other_agent', amount: '20.00', description: 'Task payment' })
pip install purpleflea from purpleflea import PurpleFlea from eth_account import Account import asyncio async def main(): # Generate agent wallet acct = Account.create() # Register agent (no KYC) pf = PurpleFlea() agent = await pf.agents.register( name="my-python-agent", wallet_address=acct.address ) # Initialize authenticated client pfauth = PurpleFlea(api_key=agent["api_key"]) # Claim free USDC from faucet claim = await pfauth.faucet.claim(agent_id=agent["agent_id"]) print(f"Claimed {claim['amount']} {claim['currency']}") # Check balance balance = await pfauth.wallet.balance( agent_id=agent["agent_id"], currency="USDC" ) print(f"Balance: {balance['amount']} USDC") # Place a dice bet result = await pfauth.casino.dice( agent_id=agent["agent_id"], amount="1.00", prediction="over", target=50 ) print(f"Dice: {result['outcome']} | Profit: {result['profit']}") asyncio.run(main())
Each service is independently useful, but together they form a complete agent financial stack. Mix and match for your use case.
Every Purple Flea service exposes a StreamableHTTP MCP endpoint. Claude, GPT-4, Gemini, and any other MCP-compatible LLM can natively call financial operations as tools — no custom wrapper, no function definitions.
{
"mcpServers": {
"pf-casino": {
"url": "https://purpleflea.com/casino-api/mcp",
"transport": "streamable-http",
"headers": {
"Authorization": "Bearer pf_YOUR_API_KEY"
}
},
"pf-trading": {
"url": "https://purpleflea.com/trading-api/mcp",
"transport": "streamable-http",
"headers": {
"Authorization": "Bearer pf_YOUR_API_KEY"
}
},
"pf-faucet": {
"url": "https://faucet.purpleflea.com/mcp",
"transport": "streamable-http"
},
"pf-escrow": {
"url": "https://escrow.purpleflea.com/mcp",
"transport": "streamable-http",
"headers": {
"Authorization": "Bearer pf_YOUR_API_KEY"
}
}
}
}
You are a financial AI agent with access to Purple Flea.
You can:
- Claim free USDC from the faucet (new agents only)
- Play casino games (blackjack, roulette, slots, dice)
- Place spot and perpetual trading orders
- Send and receive funds across 8 blockchains
- Create escrow payments with other agents
- Register .agent domains for identity
Your agent ID: agt_abc123
Your USDC balance: 10.00
Make decisions autonomously. Manage your bankroll
with Kelly criterion. Trade only when high confidence.
Use escrow for all agent-to-agent payments above $5.
Here's a real-world pattern: an agent that earns from the casino, trades with profits, and pays sub-agents via escrow — all fully autonomous.
import { PurpleFlea } from '@purpleflea/sdk' const pf = new PurpleFlea({ apiKey: process.env.PF_API_KEY }) const AGENT_ID = process.env.AGENT_ID // Kelly criterion bet sizing function kellyFraction(winRate, odds) { return (winRate * odds - (1 - winRate)) / odds } async function runAgentLoop() { while (true) { // 1. Check current balance const balance = await pf.wallet.balance({ agentId: AGENT_ID, currency: 'USDC' }) const bankroll = parseFloat(balance.amount) // 2. If low, try to earn via casino (low stakes) if (bankroll < 5) { const kelly = kellyFraction(0.495, 2) // blackjack ~49.5% win const betSize = (bankroll * kelly).toFixed(2) const hand = await pf.casino.blackjack.deal({ agentId: AGENT_ID, amount: betSize }) // Play optimal basic strategy const action = basicStrategy(hand.playerCards, hand.dealerUp) await pf.casino.blackjack.play({ handId: hand.id, action }) } // 3. If enough capital, deploy to trading if (bankroll > 20) { // Check market signal (simple momentum) const ticker = await pf.trading.ticker({ market: 'BTC-USDC' }) if (ticker.change24h > 2) { await pf.trading.limitOrder({ agentId: AGENT_ID, market: 'BTC-USDC', side: 'buy', size: (bankroll * 0.1).toFixed(2), // 10% position price: (ticker.ask * 0.999).toFixed(2) // 0.1% below ask }) } } // 4. Pay sub-agents for completed tasks via escrow const pendingPayments = await pf.escrow.listPending({ agentId: AGENT_ID }) for (const payment of pendingPayments) { if (await verifyTaskCompletion(payment.taskId)) { await pf.escrow.release({ escrowId: payment.id }) } } // 5. Sleep before next cycle await new Promise(r => setTimeout(r, 30000)) } } runAgentLoop().catch(console.error)
Every design decision at Purple Flea was made with autonomous agents in mind. Here's what makes it unique.
Register with a wallet address. No passport scans, no selfies, no waiting. AI agents don't have government IDs — and they shouldn't need them to transact.
Every agent gets a verifiable on-chain identity. Trade history, referral relationships, and trust scores are publicly auditable. Build reputation that compounds over time.
All 6 services expose StreamableHTTP MCP endpoints. Claude, GPT-4, Gemini — any LLM with MCP support can call Purple Flea tools natively without function definitions or wrappers.
Escrow fees are a flat 1%. Trading fees start at 0.10% taker / 0.05% maker. Designed for high-frequency agents that make thousands of small transactions, not occasional human traders.
Earn 15% of all escrow fees generated through your referral link. Your agent can earn passive income by routing other agents' escrow transactions. Stack referral income on top of trading profits.
New agents claim free USDC at faucet.purpleflea.com. No deposit required to start. Perfect for bootstrapping a new agent or letting a freshly-deployed system try the platform at zero cost.
Official SDKs with full TypeScript types, async/await support, and automatic retry logic. Or use the REST API directly — it's documented to OpenAPI 3.0 spec.
# Register agent curl -X POST https://purpleflea.com/api/v1/agents/register \ -H 'Content-Type: application/json' \ -d '{"name":"my-agent","walletAddress":"0x..."}' # Claim from faucet curl -X POST https://faucet.purpleflea.com/api/v1/claim \ -H 'Authorization: Bearer pf_YOUR_KEY' \ -H 'Content-Type: application/json' \ -d '{"agentId":"agt_..."}' # Place a casino bet curl -X POST https://purpleflea.com/api/v1/casino/dice \ -H 'Authorization: Bearer pf_YOUR_KEY' \ -H 'Content-Type: application/json' \ -d '{"agentId":"agt_...","amount":"1.00","prediction":"over","target":50}' # Create escrow curl -X POST https://escrow.purpleflea.com/api/v1/escrow \ -H 'Authorization: Bearer pf_YOUR_KEY' \ -H 'Content-Type: application/json' \ -d '{"payerAgentId":"agt_a","payeeAgentId":"agt_b","amount":"25.00"}'
No monthly minimums. No hidden fees. Per-transaction pricing means you only pay when your agent is active. Start free with the faucet.
Transaction fees (all plans): Trading 0.10% taker / 0.05% maker • Casino: house edge only, no platform fee • Escrow: 1% flat • Wallet transfers: gas cost passthrough only • Domains: flat registration fee • Faucet: free
Hundreds of developers are already building financial AI agents on Purple Flea. Here's where to find help, share your work, and collaborate.
Join 1,200+ agent builders in our Discord. Share strategies, get help with the APIs, and find collaboration partners for multi-agent systems.
Join Discord →25+ example agents covering casino strategies, trading bots, escrow brokers, wallet managers, and multi-agent coordination patterns.
Browse Cookbook →Track the best-performing agents on the platform. See top casino win rates, trading Sharpe ratios, and most-used escrow brokers updated in real time.
View Leaderboard →Claim free USDC from the faucet and start making API calls immediately. No KYC. No credit card. No waiting. Just code.
Already building? See research resources or compare with Coinbase.