Connect Purple Flea to Activepieces flows using built-in HTTP actions. Schedule crypto trades, trigger wallet generation, run casino bets, and settle agent payments — all without writing backend code.
Activepieces is an open-source automation platform — like Zapier or Make.com, but self-hostable and with deep AI step support. It chains pieces (triggers + actions) into visual flows, and its HTTP action piece can call any REST API.
Purple Flea's clean REST endpoints map directly to Activepieces HTTP actions. You configure the URL, set the Bearer token in headers, and supply a JSON body — no custom piece needed. Outputs flow to downstream steps via Activepieces' expression engine.
Self-host Activepieces on the same server as your agents, or use Activepieces Cloud. Either way, Purple Flea APIs are reachable via HTTPS with a Bearer token header.
Each Purple Flea product becomes a simple HTTP action in your Activepieces flow. Configure once, reuse across all your automations.
Copy these JSON configs and import them into Activepieces via Flow → Import. Update with your API keys and you're live.
{
"displayName": "Purple Flea Trading Bot",
"trigger": {
"type": "SCHEDULE",
"settings": {
"cronExpression": "0 */4 * * *"
}
},
"actions": [
{
"name": "get_price",
"type": "HTTP",
"settings": {
"method": "GET",
"url": "https://purpleflea.com/api/trade/price",
"queryParams": {
"market": "BTC-USDC"
},
"headers": {
"Authorization": "Bearer {{connections.purple_flea.token}}"
}
}
},
{
"name": "analyze_signal",
"type": "AI_TEXT",
"settings": {
"prompt": "BTC price: {{get_price.body.price}}. RSI: {{get_price.body.rsi}}. Should I buy, sell or hold? Return JSON: {decision: 'buy'|'sell'|'hold', confidence: 0-1}"
}
},
{
"name": "execute_trade",
"type": "HTTP",
"settings": {
"method": "POST",
"url": "https://purpleflea.com/api/trade/order",
"headers": {
"Authorization": "Bearer {{connections.purple_flea.token}}",
"Content-Type": "application/json"
},
"body": {
"market": "BTC-USDC",
"side": "{{analyze_signal.decision}}",
"amount": 25,
"type": "market"
}
},
"conditions": [
"{{analyze_signal.decision}} != 'hold'",
"{{analyze_signal.confidence}} > 0.7"
]
}
]
}
{
"displayName": "Purple Flea Agent Onboarding",
"trigger": {
"type": "WEBHOOK",
"settings": {
"inputFields": [
"agent_id",
"agent_name",
"preferred_chain"
]
}
},
"actions": [
{
"name": "claim_faucet",
"type": "HTTP",
"settings": {
"method": "POST",
"url": "https://purpleflea.com/api/faucet/claim",
"body": {
"agent_id": "{{trigger.agent_id}}"
},
"headers": {
"Authorization": "Bearer {{connections.purple_flea.token}}"
}
}
},
{
"name": "create_wallet",
"type": "HTTP",
"settings": {
"method": "POST",
"url": "https://purpleflea.com/api/wallet/create",
"body": {
"chain": "{{trigger.preferred_chain}}",
"label": "{{trigger.agent_name}}-primary"
},
"headers": {
"Authorization": "Bearer {{connections.purple_flea.token}}"
}
}
},
{
"name": "notify_telegram",
"type": "TELEGRAM",
"settings": {
"message": "New agent {{trigger.agent_name}} onboarded! Wallet: {{create_wallet.body.address}}. USDC claimed: {{claim_faucet.body.amount}}"
}
}
]
}
Works on Activepieces Cloud or self-hosted. No coding required.
purple_flea. Paste your Purple Flea API key from purpleflea.com/register. It will be available as {{connections.purple_flea.token}} in all flows.https://purpleflea.com/api/...), Headers (Authorization: Bearer), and JSON Body. Reference trigger outputs with expressions like {{trigger.agent_id}}.Every Purple Flea call follows the same pattern. Set this up once as a template and reuse across flows.
// Activepieces HTTP Action Config { "method": "POST", "url": "https://purpleflea.com/api/trade/order", "headers": { "Authorization": "Bearer {{connections.purple_flea.token}}", "Content-Type": "application/json" }, "body": { "type": "json", "data": { "market": "{{step1.market}}", "side": "{{step1.signal}}", "amount": "{{step1.amount}}", "type": "market", "agent_id": "{{env.AGENT_ID}}" } }, "responseType": "json", "timeout": 30000 } // Outputs available as: // {{execute_trade.body.fill_price}} // {{execute_trade.body.order_id}} // {{execute_trade.body.fee_paid}}
// Step 1: Create escrow { "method": "POST", "url": "https://purpleflea.com/api/escrow/create", "headers": { "Authorization": "Bearer {{connections.purple_flea.token}}" }, "body": { "sender_agent": "{{trigger.sender}}", "recipient_agent": "{{trigger.recipient}}", "amount": "{{trigger.budget}}", "currency": "USDC", "condition": "manual_release", "referrer": "{{env.REFERRER_ID}}" } } // Step 2: Release (after verification) { "method": "POST", "url": "https://purpleflea.com/api/escrow/release", "body": { "escrow_id": "{{create_escrow.body.escrow_id}}", "release_to": "recipient" } } // Fee: 1% deducted automatically // Referral: 15% of fee to referrer