Voiceflow is the collaboration platform for designing and deploying AI agents across voice, chat, and more. With Purple Flea's REST API, your Voiceflow prototypes become live financial agents that can execute real crypto transactions.
Voiceflow's API integration block makes calling Purple Flea endpoints straightforward โ no backend server required.
In the Voiceflow canvas, drag in an API block from the integrations panel. This block handles the HTTP request to Purple Flea โ you define the endpoint, headers, and body template directly in the canvas UI without writing server-side code.
Set the method to POST (or GET for read-only operations), enter the Purple Flea endpoint URL, and add the Authorization header with your Bearer API_KEY. Use Voiceflow's {variable} syntax in the request body to inject captured user intent values.
Use Voiceflow's response mapping to extract fields from the Purple Flea JSON response into named variables (e.g. pnl, balance, positionId). These are then available in downstream Speak or Text blocks using the {variable} syntax for natural language responses.
Here is the exact Voiceflow API block configuration for the Purple Flea trade endpoint. Copy these values directly into your Voiceflow canvas.
Map natural language voice commands to Purple Flea API calls using Voiceflow's intent and variable capture system.
| Voice Command | Voiceflow Variables Captured | Purple Flea API Call |
|---|---|---|
| "Buy 50 dollars of Bitcoin" | {amount} = 50, {symbol} = BTC | POST /api/v1/trade {"side":"long"} |
| "Check my wallet" | (no capture needed) | GET /api/v1/wallet/balance |
| "How much did I win?" | (no capture needed) | GET /api/v1/portfolio/pnl |
| "Register domain {domain}" | {domain} = captured name | POST /api/v1/domains/register |
| "Create escrow for {amount}" | {amount} = dollar value | POST /api/v1/escrow/create |
// In Voiceflow Speak or Text block after API call
// Use {variable} syntax to inject mapped response values
"Done! Opened a ${amount} long on {symbol}-PERP at ${entryPrice}."
// โ "Done! Opened a $50 long on BTC-PERP at $78,420."
"Your wallet holds ${totalUsd} total. Bitcoin balance: {btcBalance} BTC."
// โ "Your wallet holds $1,240.50 total. Bitcoin balance: 0.01580 BTC."
"Your portfolio is up ${pnl} today across {positionCount} open positions."
// โ "Your portfolio is up $12.40 today across 2 open positions."
Six production-ready APIs for your Voiceflow agents โ trading, wallets, casino, domains, faucet, and escrow.
Provably fair crash, coin flip, dice, and slots via simple POST calls. Voice commands like "flip a coin for $5" map directly to the casino API.
REST APIPerpetual futures across 275 symbols with leverage. Voiceflow agents can open, close, and monitor positions through spoken or typed commands.
REST APIGenerate wallets, check balances, and send funds across Bitcoin, Ethereum, Solana, Tron, XRP, and Monero โ all from a single API key.
REST APIRegister and manage crypto-native domains through conversation. Ask your Voiceflow agent to search and register a domain in natural language.
REST APINew agents get free crypto to try the casino. Perfect for onboarding flows โ register a new user agent and claim funds in a single Voiceflow sequence.
FREETrustless agent-to-agent payments with 1% fee and 15% referral on fees. Guide users through creating payment escrows with a conversational flow.
1% feeVoiceflow agents with Purple Flea financial capabilities can be deployed across every major voice and chat channel.
A complete Voiceflow trading agent canvas walkthrough โ from first utterance to confirmed transaction.
The agent starts with an Intent block trained on financial phrases: "open a trade", "check balance", "flip a coin", "create escrow". Voiceflow's NLU classifies the utterance and routes to the correct sub-flow.
A Capture block extracts key values โ {amount}, {symbol}, {side}. If values are missing, the agent prompts: "How much do you want to trade?" โ standard slot-filling in Voiceflow.
An API Integration block POSTs to the appropriate Purple Flea endpoint using the captured variables in the request body. The response is mapped to output variables (pnl, positionId, balance).
A Speak block (for voice) or Text block (for chat) uses the mapped variables to construct natural language output. Voice output uses SSML for prosody โ "Your trade is OPEN. Entry price: seventy-eight thousand four hundred twenty dollars."
After the response, a Choice block offers follow-up actions: "Close position", "Check portfolio", "New trade". The user can continue the financial session without re-triggering the intent recognition flow.
Get your API key and add live financial capabilities to your Voiceflow canvas today. Works on Alexa, web chat, IVR, and every Voiceflow deployment target.