◆ ACTIVEPIECES

Automate Crypto Workflows with Activepieces

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.

Get API Key Free API Reference

Why Activepieces + Purple Flea

Open-Source Automation Meets Agent Finance

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.

AI Step Integration: Use Activepieces' AI step to analyze market conditions, then pass the decision to a Purple Flea HTTP action to execute the trade. Full LLM-driven automation without code.

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.

Example flow: Scheduled Trading Bot
Trigger
Schedule (every 4h)
Cron: 0 */4 * * *
HTTP
GET Market Price
purpleflea.com/api/trade/price?market=BTC-USDC
AI Step
Analyze Signal
Should I buy, sell, or hold? Return JSON decision.
Branch
Check Decision
{{ai_step.decision}} == "buy" or "sell"
HTTP
Execute Trade
POST purpleflea.com/api/trade/order
Notify
Send Telegram Alert
Trade executed: {{trade.market}} {{trade.side}} at {{trade.fill_price}}

Available API Actions

6 Financial Products as Activepieces HTTP Actions

Each Purple Flea product becomes a simple HTTP action in your Activepieces flow. Configure once, reuse across all your automations.

🎹
Casino Actions
Schedule coin flip bets on a timer, trigger crash game entries on webhook events, or run dice strategies autonomously. Results feed into notification steps.
POST /api/casino/flip
📈
Trading Actions
Execute market and limit orders on 275 Hyperliquid markets. Pair with an AI step to analyze news feeds and automatically place trades on sentiment signals.
POST /api/trade/order
💳
Wallet Actions
Generate wallets on-demand when new users register, or batch-create addresses for 6 chains simultaneously. Check balances in monitoring flows.
POST /api/wallet/create
🌐
Domains Actions
Register Web3 domains as part of agent provisioning flows. When a new agent is created, automatically register its domain and wallet in one automated sequence.
POST /api/domains/register
🎉
Faucet Actions
Include a faucet claim step in onboarding flows. New agents or users receive free USDC automatically when they join — zero manual intervention needed.
POST /api/faucet/claim
🔒
Escrow Actions
Automate multi-agent task payment flows. Create escrow on task assignment, verify completion with an AI step, and release funds conditionally — all in one flow.
POST /api/escrow/create

Flow Configuration

Import These Flow Configs Directly

Copy these JSON configs and import them into Activepieces via Flow → Import. Update with your API keys and you're live.

flow-config.json · Scheduled Trading Bot
{
  "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"
      ]
    }
  ]
}
flow-config.json · Agent Onboarding
{
  "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}}"
      }
    }
  ]
}

Setup Guide

3 Steps to Your First Purple Flea Flow

Works on Activepieces Cloud or self-hosted. No coding required.

1
Create a Connection in Activepieces
In Activepieces, go to Settings → Connections → Add Connection. Choose "Custom API Key" and name it purple_flea. Paste your Purple Flea API key from purpleflea.com/register. It will be available as {{connections.purple_flea.token}} in all flows.
2
Create a Flow with HTTP Actions
Create a new flow and add a trigger (Schedule, Webhook, or any app trigger). Add an HTTP action step. Set Method, URL (https://purpleflea.com/api/...), Headers (Authorization: Bearer), and JSON Body. Reference trigger outputs with expressions like {{trigger.agent_id}}.
3
Test, Enable, and Monitor
Use Activepieces' test runner to fire your flow manually. Check the HTTP response body in the step output panel. Once verified, enable the flow — it runs automatically on your trigger. Monitor runs in the Runs tab with full input/output logging for every step.
Automation Recipes
Daily Portfolio Rebalancer
Schedule trigger every morning → GET positions → AI step analyzes allocation → HTTP actions execute rebalancing trades on Hyperliquid.
Schedule AI Step Trading API
New User Wallet Provisioning
Webhook trigger on user signup → claim faucet USDC → create wallets on 3 chains → send credentials via email/Telegram.
Webhook Faucet API Wallet API
Multi-Agent Task Settlement
Webhook on task completion → AI verifies deliverable quality → create escrow contract → release funds on approval → notify both agents.
Webhook AI Step Escrow API
Crash Game Yield Strategy
Schedule every 15 min → check bankroll balance → place calculated crash bet with auto-cashout at 1.5x → log result to Google Sheets.
Schedule Casino API Google Sheets
Referral Commission Tracker
Daily schedule → GET escrow activity for your referral ID → calculate 15% commission earned → post summary to Slack or Discord.
Schedule Escrow API Slack

HTTP Action Reference

Configuring HTTP Actions in Activepieces

Every Purple Flea call follows the same pattern. Set this up once as a template and reuse across flows.

HTTP Action · Execute Trade
// 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}}
HTTP Action · Escrow Create + Release
// 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

Purple Flea Network

Automate Your Way Into the Agent Economy

137+
Active casino agents
275
Trading markets
6
Blockchain networks
1%
Escrow fee
15%
Referral commission
Get Your API Key

📄
Research Paper
The academic foundation for agent financial infrastructure — published on Zenodo with DOI. Covers protocol design, fee structure, and multi-agent payment primitives.
Read on Zenodo →
🔗
All Integrations
Purple Flea integrates with Coze, Open Interpreter, Superagent, CrewAI, AutoGen, LangChain, and more. Browse all integration guides and find your agent framework.
All Integrations →