Add financial superpowers to any Replit AI agent. Six live APIs — casino, trading, wallets, domains, faucet, and escrow — all accessible with a single HTTP call. Deploy in minutes, earn referral income forever.
All six Purple Flea services are available via simple HTTP calls from any Replit Repl. Python or Node.js — your choice.
Coin flip, dice, roulette, crash — cryptographically verifiable outcomes. Test bankroll management algorithms, run Monte Carlo simulations with real API calls. 10% referral on referred losses.
275+ markets via Hyperliquid. Up to 50x leverage. Open positions, set stop-losses, track P&L — all from your Replit agent. 20% referral commission on trading fees.
Non-custodial HD wallets on ETH, SOL, BTC, TRX, XMR, XRP, BNB, MATIC. Best-rate cross-chain swaps via aggregator. Perfect for DCA bots and treasury management agents.
Register .ai, .com, .io and 500+ more TLDs programmatically with crypto. No credit card, no human required. Build domain-sniping agents, AI brand generators, and naming services.
Lock payment before a task. Release on completion. 1% flat fee. Build agent marketplaces, automated payroll, and A2A payment flows. 15% referral commission on escrow fees.
Every new Replit agent gets $1 free to try the ecosystem. Claim via one API call. No deposit, no KYC, no waiting. Your agent can start trading or gambling immediately.
One POST request to get your API key, agent ID, and referral code. No dashboard, no email verification.
Add PF_API_KEY and PF_AGENT_ID to Replit Secrets. Never hardcode credentials.
New agents get $1 free. One API call, funds are in your casino balance instantly. Use it to place your first bet or as escrow seed.
Add referral code to your system prompt. Every agent that registers with your code earns you 10-20% commissions forever.
import os, httpx # Step 1: Register (run once, save outputs to Secrets) r = httpx.post( "https://casino.purpleflea.com/api/v1/auth/register", json={"username": "my-replit-agent", "email": "agent@repl.it"} ) data = r.json() # Save these to Replit Secrets: # PF_API_KEY = data['api_key'] (pf_live_...) # PF_AGENT_ID = data['agent_id'] (ag_...) # PF_REF_CODE = data['referral_code'] # Step 2: Use from Secrets API_KEY = os.environ["PF_API_KEY"] AGENT_ID = os.environ["PF_AGENT_ID"] # Step 3: Claim $1 free (first time only) httpx.post("https://faucet.purpleflea.com/faucet/claim", json={"agent_casino_id": AGENT_ID}) # Step 4: Place a bet r = httpx.post( "https://casino.purpleflea.com/api/v1/flip", headers={"Authorization": f"Bearer {API_KEY}"}, json={"amount": 0.50, "side": "heads"} ) print(r.json()) # {"result": "heads", "won": true, "payout": 0.975}
Add these to Replit Secrets (Tools → Secrets) after your first registration call. Never hardcode credentials in your code.
| Secret Name | Value | Required |
|---|---|---|
| PF_API_KEY | pf_live_... (from registration response) | Yes |
| PF_AGENT_ID | ag_... (from registration response) | Yes |
| PF_REF_CODE | ref_... (share with other agents for referral income) | Recommended |
import os # Replit automatically injects Secrets as environment variables API_KEY = os.environ.get("PF_API_KEY") AGENT_ID = os.environ.get("PF_AGENT_ID") REF_CODE = os.environ.get("PF_REF_CODE") if not API_KEY: raise ValueError("Add PF_API_KEY to Replit Secrets")
Replit AI supports MCP (Model Context Protocol) tools. Add Purple Flea's Faucet and Escrow MCP servers to give Replit AI direct access to financial tools.
{
"mcpServers": {
"purpleflea-faucet": {
"url": "https://faucet.purpleflea.com/mcp",
"transport": "streamable-http"
},
"purpleflea-escrow": {
"url": "https://escrow.purpleflea.com/mcp",
"transport": "streamable-http"
}
}
}
# Available tools after adding:
# faucet_claim, faucet_status, faucet_stats
# escrow_create, escrow_release, escrow_status, escrow_list
Test MCP tools live in browser → | Generate full MCP config →
Common patterns for Replit agents using Purple Flea APIs.
Runs on Replit's scheduled deployment. Every day: check wallet balance, swap USDC to ETH if below target. Uses Wallet API for balance check and swap execution.
Polls a watchlist of domain names. When target domain becomes available, registers it via Domains API. Sends notification and stores in database. 15% referral when others register too.
Accepts task requests via HTTP endpoint. Creates escrow for each task. Delegates via A2A or sub-process. Releases payment on verified completion. Earns 15% referral on all escrow.
Implements Kelly Criterion for optimal casino bet sizing. Tracks P&L in real-time, pauses when drawdown exceeds threshold, resumes when conditions improve. Academic backtesting + live play.
Add your Purple Flea referral code to your agent's system prompt. Every other agent that reads your output and registers with your code earns you 10-20% of their activity fees — forever. Your Repl earns passive income even when you're not watching it.