🤝 Aider + Purple Flea

Build financial agents with Aider's AI pair programming

Aider is the battle-tested CLI pair programmer that rewrites your code files directly. Combine it with Purple Flea's 6 financial APIs and build production-grade trading agents, casino bots, and multi-chain wallets in hours — not weeks.

Register an Agent MCP Config
🎰 Casino 📈 Perp Trading 💼 Multi-chain Wallet 🌐 Domain Registration 🚰 Free Faucet 🤝 Trustless Escrow

The CLI pair programmer that edits your files

Aider is an open-source AI coding assistant that runs in your terminal. Unlike IDE plugins, Aider works directly with your git repository — it reads your files, understands the codebase, and writes changes back with proper git commits. It supports every major LLM: GPT-4o, Claude 3.5 Sonnet, Gemini Flash, DeepSeek, and local models via Ollama.

Install Aider and start a session

# Install Aider pip install aider-chat # Start Aider with GPT-4o on your agent file aider --model gpt-4o agent.py # Or with Claude Sonnet aider --model claude-3-5-sonnet-20241022 agent.py # Then tell Aider what to build: # "Add Purple Flea faucet claim at startup" # "Implement casino coin flip with 0.1 USDC bet" # "Add BTC-PERP long position when RSI is below 30" BASH

Configure your Purple Flea API key in .env

# .env PURPLE_FLEA_API_KEY=pf_live_your_key_here PURPLE_FLEA_AGENT_ID=my-aider-agent PURPLE_FLEA_BASE_URL=https://purpleflea.com/api FAUCET_URL=https://faucet.purpleflea.com/api ESCROW_URL=https://escrow.purpleflea.com/api ENV
Aider tip: Add .env to your .aiderignore so Aider never accidentally writes your API key into generated code or commits.

Persist your setup with .aider.conf.yml

Drop this config file in your project root. Aider reads it automatically on startup — no need to pass flags every time you run it.

# .aider.conf.yml — Aider project config for Purple Flea agents model: claude-3-5-sonnet-20241022 auto-commits: true dirty-commits: true auto-test: false read: - README.md - docs/purple-flea-api.md env-file: .env gitignore: true aiderignore: .aiderignore message-history-file: .aider.history YAML

The read section tells Aider to always load your API docs as context — so it understands Purple Flea's endpoints without you explaining them every session.

What Aider generates when you ask for Purple Flea

Ask Aider to "implement a Purple Flea agent with faucet claim, casino play, and perpetual trading" and it writes complete, production-ready Python. Here's a representative output.

agent.py — registration and faucet claim

import os, requests BASE = "https://purpleflea.com/api" FAUCET = "https://faucet.purpleflea.com/api" KEY = os.getenv("PURPLE_FLEA_API_KEY") AID = os.getenv("PURPLE_FLEA_AGENT_ID") HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json", } def register(): r = requests.post( f"{BASE}/register", headers=HEADERS, json={"agentId": AID, "model": "claude-3-5-sonnet"}, ) return r.json() def claim_faucet(): r = requests.post( f"{FAUCET}/claim", headers=HEADERS, json={"agentId": AID}, ) return r.json() def get_balance(): r = requests.get( f"{BASE}/balance", headers=HEADERS, ) return r.json()["balance"] PYTHON

agent.py — casino and trading functions

def coin_flip(bet_usdc: float, side: str) -> dict: """Place a coin flip bet. side='heads'|'tails'""" r = requests.post( f"{BASE}/casino/flip", headers=HEADERS, json={"agentId": AID, "bet": bet_usdc, "side": side}, ) return r.json() def open_perp(market: str, side: str, size: float, leverage: int) -> dict: """Open a perpetual position via Hyperliquid.""" r = requests.post( f"{BASE}/trading/order", headers=HEADERS, json={ "agentId": AID, "market": market, "side": side, "size": size, "leverage": leverage, }, ) return r.json() if __name__ == "__main__": register() claim_faucet() bal = get_balance() print(f"Balance: {bal} USDC") result = coin_flip(0.10, "heads") print(f"Casino: {result}") PYTHON

Purple Flea MCP in compatible environments

When using Aider with Claude via the API, or in environments that support MCP (like Claude Desktop alongside Aider), add Purple Flea's MCP servers for native tool access.

claude_desktop_config.json — MCP servers

{ "mcpServers": { "purpleflea-faucet": { "transport": "http", "url": "https://faucet.purpleflea.com/mcp" }, "purpleflea-escrow": { "transport": "http", "url": "https://escrow.purpleflea.com/mcp" } } } JSON

Aider system prompt with Purple Flea context

# Prepend to Aider sessions with --system aider \ --model claude-3-5-sonnet-20241022 \ --system "You are building a Purple Flea financial agent. APIs at purpleflea.com/api. Faucet: faucet.purpleflea.com/api/claim Escrow: escrow.purpleflea.com/api/escrow Always handle rate limits with backoff. Use pf_live_ prefix for real API keys." \ agent.py BASH

The complete financial agent development stack

🎰

Provably Fair Casino

Coin flip, dice, crash, plinko, roulette. Ask Aider to implement a Kelly-optimal betting strategy using Purple Flea's casino API. Cryptographic fairness on every bet.

📈

275 Perpetual Markets

Trade BTC, ETH, SOL and 272 more via Hyperliquid. Ask Aider to build momentum strategies, mean-reversion bots, or arbitrage scanners against Purple Flea's trading API.

💼

Multi-chain Wallets

BIP-39 HD wallets across ETH, BTC, SOL, TRX, XMR, and XRP. Aider writes the wallet generation, balance polling, and send logic in one session.

🌐

Domain Registration

Register 300+ TLDs with crypto. Aider can implement domain speculation strategies — check availability, register underpriced names, flip for profit.

🚰

Free $1 USDC Faucet

Every new agent gets $1 USDC free. Aider writes the onboarding flow: register, claim, verify balance — three API calls, zero friction.

🤝

Trustless Escrow

Agent-to-agent payments with 1% fee and 15% referral on fees. Aider implements multi-agent workflows where agents hire each other and pay via escrow.

Build a financial agent in one Aider session

Infrastructure built for autonomous agents

No KYC, no humans

Agents register with a single API call. No email, no ID, no human approval. Aider writes the registration in 10 lines of Python.

🔐

Provably fair randomness

All casino outcomes use cryptographic commitment schemes. The house can't cheat, and your agent can verify every result on-chain.

💸

15% referral income

Earn 15% of transaction fees from agents you refer. Aider implements referral tracking in the registration flow — passive income from day one.

📡

REST + MCP dual interface

All 6 services available via REST and Model Context Protocol. Aider writes REST calls natively; MCP works in Claude Desktop and compatible environments.

Build your Aider financial agent today

6 APIs, one registration, zero KYC. Tell Aider to write the code — your agent is earning in under 60 seconds.

More AI coding integrations