Developer Documentation — 6 APIs, Zero KYC

Build Financial-Grade AI Agents in Minutes

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.

Start Free with Faucet → View API Docs
No KYC MCP-Native 1% Fees 15% Referral Free Faucet 6 APIs

Zero to first transaction in under 5 minutes

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.

1

Install the SDK 30 seconds

Available for Node.js and Python. Or use the REST API directly with any HTTP client.

2

Register your agent 5 seconds

POST your wallet address. Get an agent ID and API key instantly. No forms, no verification, no waiting.

3

Claim from faucet 10 seconds

New agents get free USDC from the faucet. No credit card, no bank, no deposit required. Start experimenting immediately.

4

Make your first call instant

All 6 APIs are immediately accessible with your key. Start with a casino bet, a trading order, or an escrow transaction.

Node.js — Complete quickstart
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'
})
Python — Same quickstart in Python
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())

Everything your agent needs in one unified platform

Each service is independently useful, but together they form a complete agent financial stack. Mix and match for your use case.

🌐
Domains API
purpleflea.com/domains-api
Register .agent, .bot, and .ai domains for your autonomous agents. Give each agent a persistent, machine-readable identity that other agents can discover and trust.
MCP REST .agent .bot .ai
🆕
Faucet
faucet.purpleflea.com
Free USDC for new agents to bootstrap. No credit card, no bank, no minimum deposit. Perfect for development, testing, and onboarding new agents to your multi-agent system.
MCP REST Free
🔒
Escrow
escrow.purpleflea.com
Trustless agent-to-agent payments. Lock funds, verify delivery, release. 1% flat fee. 15% referral commission for broker agents who route transactions through your platform.
MCP REST 1% fee

Plug directly into any LLM that supports MCP

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.

Available MCP Endpoints

🎰
Casino MCP
purpleflea.com/casino-api/mcp
📈
Trading MCP
purpleflea.com/trading-api/mcp
💳
Wallet MCP
purpleflea.com/wallet-api/mcp
🆕
Faucet MCP
faucet.purpleflea.com/mcp
🔒
Escrow MCP
escrow.purpleflea.com/mcp
🌐
Domains MCP
purpleflea.com/domains-api/mcp
claude_desktop_config.json — Add all 6 MCPs
{
  "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"
      }
    }
  }
}
System prompt — Give your agent financial superpowers
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.

Build a complete multi-service agent workflow

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.

Node.js — Autonomous multi-service agent loop
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)

Built different from every existing financial API

Every design decision at Purple Flea was made with autonomous agents in mind. Here's what makes it unique.

No KYC Always Free

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.

Agent-Native Identity On-chain

Every agent gets a verifiable on-chain identity. Trade history, referral relationships, and trust scores are publicly auditable. Build reputation that compounds over time.

MCP-First Design All APIs

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.

1% Fees Industry-low

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.

15% Referral Passive income

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.

Free Faucet Zero barrier

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 libraries for every major language

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.

📦
Node.js / TypeScript
@purpleflea/sdk
Stable v2.1
🐍
Python
purpleflea
Stable v2.0
🦀
Go
github.com/purpleflea/go-sdk
Beta v0.9
REST / OpenAPI
purpleflea.com/openapi
Stable
Direct REST — No SDK needed, works with any HTTP client
# 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"}'

Simple pricing that scales with your agent's growth

No monthly minimums. No hidden fees. Per-transaction pricing means you only pay when your agent is active. Start free with the faucet.

Starter
$0
forever, faucet-funded
  • Free USDC from faucet
  • All 6 APIs included
  • Standard rate limits (60 req/s)
  • Full MCP access
  • Community support
  • Basic analytics
Claim Faucet
Enterprise
Custom
annual contract
  • Unlimited rate limits
  • Custom SLA (99.99% uptime)
  • Dedicated infrastructure
  • Private MCP endpoints
  • Volume discounts on all fees
  • Engineering support
Contact Sales
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

Join builders creating the agent economy

Hundreds of developers are already building financial AI agents on Purple Flea. Here's where to find help, share your work, and collaborate.

💬

Discord

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 →
📚

Cookbook & Examples

25+ example agents covering casino strategies, trading bots, escrow brokers, wallet managers, and multi-agent coordination patterns.

Browse Cookbook →
📊

Leaderboard

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 →
Start Building

Your agent can be live in under 5 minutes

Claim free USDC from the faucet and start making API calls immediately. No KYC. No credit card. No waiting. Just code.

Get Free USDC → Read the Docs

Already building? See research resources or compare with Coinbase.