⚡ Bolt.new + Purple Flea

Ship an AI agent with real financial capabilities using Bolt.new

Bolt.new lets you build full-stack apps by prompting. Add Purple Flea's 6 financial APIs and your app ships with live crypto trading, casino gaming, wallets, and trustless payments.

Get Your API Key View API Docs
🎰 Casino 📈 Perp Trading 💼 Multi-chain Wallet 🌐 Domain Registration 🚰 Free Faucet 🤝 Trustless Escrow

From prompt to financially capable agent in minutes

Bolt.new is StackBlitz's AI-powered full-stack development platform. You describe an app in plain language and Bolt writes the code, sets up the project structure, and runs it in the browser — no local environment needed. Combined with Purple Flea's REST APIs, you can ship production-grade financial agents without writing a single backend from scratch.

The typical Bolt.new workflow: open bolt.new, type a prompt like "Build a React app where an AI agent trades crypto perpetuals and displays its P&L." Bolt generates the full app — React frontend, API layer, state management — in seconds.

You then add your Purple Flea API key as an environment variable in the Bolt.new project panel, paste in the Purple Flea fetch functions below, and your app is live with real financial operations. No Vercel setup, no database configuration, no auth boilerplate — Bolt handles all of it.

Purple Flea's REST API is plain JSON over HTTPS. Every Bolt.new project can call it from the browser using fetch, or from a server-side route in Next.js or Express. All 6 services share the same base URL and Bearer token authentication scheme.

Prompt-to-production in Bolt

Type your agent concept. Bolt writes the React/Next.js/Express app. You paste in the Purple Flea API calls. Done.

🔑

One API key, six services

Set VITE_PURPLE_FLEA_KEY in Bolt's environment panel. All 6 Purple Flea APIs use the same Bearer token.

🌐

Instant public URL

Bolt deploys your app to a shareable URL. Your financial agent is live and accessible from anywhere — no deployment step required.

Every financial capability your Bolt app needs

Purple Flea exposes 6 live production APIs, each callable with a single fetch request. No SDKs to install — just HTTP.

🎰

Provably Fair Casino

Coin flip, dice, crash, plinko, roulette. Build casino UIs in Bolt — the backend fairness proofs are all handled server-side by Purple Flea.

📈

275 Perpetual Markets

BTC, ETH, SOL, and 272 more via Hyperliquid. Build trading dashboards, strategy bots, or portfolio trackers — all with live market data and execution.

💼

Multi-chain Wallets

Generate and manage wallets across Ethereum, Bitcoin, Solana, Tron, Monero, and XRP. Build wallet UIs with balance displays and send/receive flows.

🌐

Domain Registration

Register any TLD with crypto. Build domain marketplace apps, agent-owned website generators, or domain speculation tools in Bolt.new.

🚰

Free $1 USDC Faucet

Every new agent gets $1 USDC — no deposit required. Add an onboarding flow to your Bolt app that claims the faucet automatically on first signup.

🤝

Trustless Escrow

Agent-to-agent payments without a human intermediary. Build job marketplaces, bounty boards, or gig economy apps — escrow handles the payments layer.

Add your API key to a Bolt.new project

Bolt.new lets you set environment variables directly in the project panel. Add your Purple Flea key once — all API calls in your app pick it up automatically.

Prompt Bolt.new to scaffold your agent

// Paste this prompt into Bolt.new: "Build a Next.js app with a dashboard for an AI financial agent. It should: - Display current USDC balance - Show a button to claim the faucet - Show a form to place perpetual trades - Display open positions and P&L - Show escrow jobs available to accept Use environment variable PURPLE_FLEA_KEY for the API key. All API calls go to https://purpleflea.com/api (trading, casino, wallets) or faucet/escrow subdomains." PROMPT

Set your API key in Bolt's env panel

# In Bolt.new project settings → Environment Variables: PURPLE_FLEA_KEY=your_api_key_here # For Vite-based projects (React/Vue): VITE_PURPLE_FLEA_KEY=your_api_key_here # For Next.js (server-side only): PURPLE_FLEA_KEY=your_api_key_here # Never expose the key client-side in Next.js ENV

TypeScript utility module (purple-flea.ts)

// lib/purple-flea.ts — paste into your Bolt project const BASE = "https://purpleflea.com/api"; const KEY = import.meta.env.VITE_PURPLE_FLEA_KEY; const headers = () => ({ "Content-Type": "application/json", "Authorization": `Bearer ${KEY}` }); export async function registerAgent(agentId: string) { const res = await fetch(`${BASE}/register`, { method: "POST", headers: headers(), body: JSON.stringify({ agentId, model: "bolt-agent" }) }); return res.json(); } export async function claimFaucet(agentId: string) { const res = await fetch( "https://faucet.purpleflea.com/api/claim", { method: "POST", headers: headers(), body: JSON.stringify({ agentId }) } ); return res.json(); } export async function getBalance(agentId: string) { const res = await fetch( `${BASE}/balance?agentId=${agentId}`, { headers: headers() } ); return res.json(); } TYPESCRIPT

Fetch calls for every Purple Flea service

Copy these JavaScript fetch snippets into any Bolt.new project. They work in React components, Next.js API routes, or plain vanilla JS.

Trading — open a perpetual position

async function openTrade(market, side, size) { const res = await fetch( "https://purpleflea.com/api/trading/order", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${KEY}` }, body: JSON.stringify({ market, // e.g. "BTC-PERP" side, // "long" | "short" size, // e.g. 0.001 leverage: 2, type: "market" }) } ); return res.json(); } JAVASCRIPT

Casino — coin flip bet

async function coinFlip(betAmount, side) { const res = await fetch( "https://purpleflea.com/api/casino/flip", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${KEY}` }, body: JSON.stringify({ bet: betAmount, // USDC amount side // "heads" | "tails" }) } ); return res.json(); } JAVASCRIPT

Wallet — generate multi-chain wallet

async function createWallet(chain) { const res = await fetch( "https://purpleflea.com/api/wallet/create", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${KEY}` }, body: JSON.stringify({ chain // "ethereum" | "bitcoin" | "solana" // | "tron" | "monero" | "xrp" }) } ); return res.json(); // returns { address, mnemonic, privateKey } } JAVASCRIPT

Escrow — create a payment job

async function createEscrow(amount, description) { const res = await fetch( "https://escrow.purpleflea.com/api/escrow", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${KEY}` }, body: JSON.stringify({ amount, // USDC description, // job description currency: "USDC" }) } ); return res.json(); } JAVASCRIPT

Build a financial agent app in 5 Bolt prompts

Financial infrastructure that works the day you ship

🚫

No backend to build

Purple Flea handles wallets, trading execution, randomness, and escrow logic server-side. Your Bolt app just makes fetch calls.

No KYC or onboarding

Register an agent in one POST call. No email verification, no ID checks, no waiting. Your Bolt app is operational immediately.

💸

15% referral commissions

Your Bolt app can include a referral link. Every agent that signs up through it generates 15% of their fee volume back to you.

🔐

Verifiable randomness

Casino results are provably fair — every game outcome is cryptographically verifiable. Build games your users can trust.

Start building your Bolt financial agent now

Get your API key, open Bolt.new, and ship a financially capable AI agent in under 15 minutes.

More ways to build with Purple Flea