Vapi is the leading voice AI platform for developers. Combined with Purple Flea's financial API, your Vapi agents can execute trades, check portfolio balance, and manage crypto wallets — all through voice commands. "Hey agent, check my BTC balance" executes instantly.
The complete flow from voice command to financial execution — in under two seconds.
Register Purple Flea API endpoints as Vapi function tools in your assistant configuration. Each tool has a name, description, and parameter schema — Vapi uses these to decide when and how to call the API during conversation.
User speaks a command. Vapi transcribes the audio in real-time, routes it through the configured LLM (GPT-4, Claude, etc.) with your tool definitions, and the model decides which tool to call with what parameters.
Vapi calls your Purple Flea server-side function with the extracted parameters. Purple Flea executes the trade/balance check/wallet operation and returns a result. Vapi converts the result to speech and responds to the user.
Vapi assistant configuration with Purple Flea tools defined as callable functions.
{
"name": "Purple Flea Financial Assistant",
"voice": { "provider": "11labs", "voiceId": "paula" },
"model": {
"provider": "openai",
"model": "gpt-4o",
"systemPrompt": "You are a financial AI assistant with access to Purple Flea's crypto infrastructure. You can trade perpetual futures, check wallet balances, place casino bets, and manage escrow payments. Always confirm trade sizes above $500 before executing.",
"tools": [
{
"type": "function",
"function": {
"name": "get_portfolio",
"description": "Get the agent's current portfolio: open positions, total PnL, and unrealized gains",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
},
"server": {
"url": "https://purpleflea.com/api/portfolio",
"secret": "YOUR_WEBHOOK_SECRET"
}
},
{
"type": "function",
"function": {
"name": "open_trade",
"description": "Open a leveraged perpetual futures position on a crypto asset",
"parameters": {
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "Trading pair, e.g. ETH-USD-PERP or BTC-USD-PERP"
},
"side": {
"type": "string",
"enum": ["buy", "sell"],
"description": "Direction: buy for long, sell for short"
},
"size_usd": {
"type": "number",
"description": "Position size in USD notional value"
},
"leverage": {
"type": "integer",
"description": "Leverage multiplier between 1 and 50",
"default": 1
}
},
"required": ["symbol", "side", "size_usd"]
}
},
"server": {
"url": "https://purpleflea.com/api/trade",
"secret": "YOUR_WEBHOOK_SECRET"
}
},
{
"type": "function",
"function": {
"name": "wallet_balance",
"description": "Check the current balance of the crypto wallet for a specific blockchain",
"parameters": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"enum": ["eth", "sol", "btc", "trx", "xmr", "ton"],
"description": "Blockchain network to query"
}
},
"required": ["chain"]
}
},
"server": {
"url": "https://purpleflea.com/api/wallet/balance",
"secret": "YOUR_WEBHOOK_SECRET"
}
},
{
"type": "function",
"function": {
"name": "create_escrow",
"description": "Create a new escrow payment locked until conditions are met",
"parameters": {
"type": "object",
"properties": {
"amount_usdc": {
"type": "number",
"description": "Amount of USDC to lock in escrow"
},
"recipient": {
"type": "string",
"description": "Wallet address or agent ID of the payment recipient"
},
"description": {
"type": "string",
"description": "Human-readable description of escrow conditions"
}
},
"required": ["amount_usdc", "recipient"]
}
},
"server": {
"url": "https://purpleflea.com/api/escrow/create",
"secret": "YOUR_WEBHOOK_SECRET"
}
}
]
},
"firstMessage": "Hello! I'm your Purple Flea financial assistant. I can check your portfolio, open trades, query wallet balances, and create escrow payments. What would you like to do?",
"serverUrl": "https://your-server.com/vapi-webhook"
}
Natural language commands your users can speak, mapped to the Purple Flea API calls they trigger.
Six Purple Flea APIs ready to be wired as Vapi function tools for voice-activated finance.
Real-world applications of Vapi + Purple Flea across trading, monitoring, and payments.
A hands-free trading desk: call out positions, hear market updates, and execute trades in perpetual futures — all while your hands are occupied. Ideal for mobile traders and accessibility use cases.
Ask "How am I doing today?" and hear a spoken summary of your PnL, open positions, and largest movers — while driving, exercising, or away from a screen. Schedule daily voice briefings.
Coordinate agent-to-agent payments by voice: "Lock 500 USDC for the data labeling task." When the task completes, say "Release the escrow" — trustless execution without touching a keyboard.
Turn any phone call into a crypto wallet interface. Check balances, initiate sends, and confirm transactions by voice — with Vapi handling the speech layer and Purple Flea handling the execution.
Design principles for voice-controlled financial agents — where clarity and safety are critical.
open_trade, have the agent read back the parameters: "I'll open a $100 long on BTC with 5x leverage. Shall I proceed?" This prevents costly misinterpretations.
Get a Purple Flea API key, paste the tool definition into your Vapi assistant config, and make your first voice-activated trade in under 20 minutes.