BOTPRESS INTEGRATION

Purple Flea for Botpress

Botpress is the open-source conversational AI platform powering 750,000+ bots. Combined with Purple Flea's financial API, your Botpress agents can trade crypto, check wallet balances, and execute escrow payments โ€” all through natural conversation.

Get API Key โ€” Free Read the Docs

Quick Integration

Connect Purple Flea to any Botpress flow in three steps โ€” no custom server required.

1

Add HTTP Execute Node

In your Botpress flow editor, drag in an Execute Code node or an HTTP Request card. This is where your bot will call the Purple Flea API. Position it after the intent capture node that collects the user's financial request.

2

Configure the Endpoint

Set the method to POST, the URL to the relevant Purple Flea endpoint (e.g. https://purpleflea.com/api/v1/trade), add an Authorization: Bearer YOUR_API_KEY header, and build your JSON body using Botpress workflow variables.

3

Map Response Variables

Capture the response data into Botpress workflow variables (e.g. workflow.tradeResult) and pass them to the next node โ€” a Text card or Choice node โ€” to format and speak the result back to the user.

Execute Code Node

Paste this into a Botpress Execute Code node to call the Purple Flea trading API and store the result for your next flow step.

Botpress Execute Code Node โ€” trade.js
// In Botpress Execute Code node
// workflow.symbol and workflow.tradeSize are captured from user input

const response = await axios.post('https://purpleflea.com/api/v1/trade', {
  symbol: workflow.symbol,
  side: 'long',
  size_usd: workflow.tradeSize
}, {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
})

workflow.tradeResult = response.data

// workflow.tradeResult is now available in the next node
// e.g. {{workflow.tradeResult.position_id}} or {{workflow.tradeResult.entry_price}}
Botpress Execute Code Node โ€” wallet.js
// Check wallet balance from Botpress code node
const walletRes = await axios.get('https://purpleflea.com/api/v1/wallet/balance', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
})

workflow.walletBalances = walletRes.data.balances
workflow.totalUsd = walletRes.data.total_usd

// Use in text card: "Your total balance is ${{workflow.totalUsd}}"

Available Financial Tools

Six production-ready APIs your Botpress agent can call today โ€” no wallet setup required for users.

๐ŸŽฐ

Casino

Provably fair crash, coin flip, dice, and slots. Perfect for entertainment bots, reward mechanics, or letting agents earn through gameplay.

REST API
๐Ÿ“ˆ

Trading โ€” 275 Perps

Perpetual futures across 275 symbols. Open longs and shorts, set stop-loss and take-profit, read live PnL โ€” all from a Botpress code node.

REST API
๐Ÿ‘›

Wallet โ€” 6 Chains

Generate wallets, check balances, and send funds across Bitcoin, Ethereum, Solana, Tron, XRP, and Monero.

REST API
๐ŸŒ

Domains

Register and manage crypto-native domains. Let agents autonomously acquire digital real estate through conversational flows.

REST API
๐Ÿšฐ

Faucet

Free crypto for new agents to try the casino. Register via API, claim once, and start playing immediately โ€” zero upfront cost.

FREE
๐Ÿค

Escrow

Trustless agent-to-agent payments with 1% fee. Create escrow, define conditions, release or dispute โ€” full lifecycle via API.

1% fee

Example Conversation Flow

See how a Botpress trading assistant handles a complete user session โ€” from intent to API call to natural language response.

Botpress Trading Bot โ€” Live Session
User
Open a $50 BTC long
API Call โ†’ POST /api/v1/trade
{"symbol":"BTC-PERP","side":"long","size_usd":50,"leverage":2}
Botpress Bot
Done! Opened a $50 2x long on BTC-PERP at $78,420. Position ID: #pf-38291. Your estimated liquidation is at $39,210.
User
What's my portfolio?
API Call โ†’ GET /api/v1/portfolio
{"positions":[{"symbol":"BTC-PERP","side":"long","pnl":3.20}],"total_pnl":3.20}
Botpress Bot
You have 1 open position: BTC long, currently +$3.20 PnL. Total unrealized profit: +$3.20.
User
Close everything
API Call โ†’ POST /api/v1/trade/close-all
{"closed":1,"realized_pnl":3.18,"fees":0.05}
Botpress Bot
All positions closed. You realized +$3.18 after fees. Funds are back in your wallet.

Use Cases

Botpress + Purple Flea enables a new class of financially capable chatbot agents.

๐Ÿ’ฌ

Customer-Facing Trading Assistant

Deploy a public-facing Botpress bot that lets retail users open and manage positions through natural conversation โ€” embedded in your site or app.

๐Ÿ“Š

Internal Portfolio Monitor

Build an internal Slack or Teams bot (via Botpress integrations) that your team can ask about open positions, wallet balances, and P&L in real time.

๐Ÿค–

DeFi FAQ + Execution Bot

Combine a Botpress knowledge base with Purple Flea actions โ€” answer DeFi questions and execute trades or wallet transfers in the same conversation.

๐Ÿ”

Escrow Payment Coordinator

Guide users through creating and releasing trustless escrow payments. Ideal for marketplaces, freelance platforms, or agent-to-agent service contracts.

Ready to add finance to your Botpress agents?

Get a free API key and start making Purple Flea calls from your Botpress flows in minutes. No credit card required.