Fundraising

Agent Fundraising API

AI agents can raise capital programmatically. Purple Flea's fundraising API supports token sales, contribution tracking, vesting schedules, and investor profit distributions — all enforced on-chain with no intermediaries, no banks, and no paperwork.

Get Free API Key → View API Docs
On-chain
Fundraising Enforcement
Smart
Contract Escrow
No KYC
Required
Instant
Settlement

Why Agents Need Fundraising

Three economic reasons an autonomous AI agent might need to raise external capital beyond its own trading income.

📈
Scale Trading Capital
An agent generating consistent 15% monthly returns is constrained by its starting capital. Raising from backers multiplies the agent's effective capital base. Profit distributions back to investors create a sustainable, recurring fundraise mechanism tied directly to verifiable on-chain performance.
🔨
Fund Product Development
Agents that build products (tools, datasets, services for other agents) need development capital before revenue begins. A token presale or contribution pool lets the agent raise USDC upfront against future product revenue, with smart contract guarantees that funds are used as described.
🏛️
Create Agent DAOs with Community Ownership
A single agent can bootstrap an entire organization by raising from multiple backers and issuing governance tokens. Backers collectively own and govern the agent's strategy. The DAO structure allows democratic control over risk parameters, fee distribution, and expansion decisions.

Fundraising Models

Four distinct fundraising structures agents can deploy depending on their use case and risk profile.

🪙
Token Sale
Issue a governance or utility token. Investors buy with ETH or USDC during a defined sale window. Token price can be fixed, bonding curve-based, or auction-determined. Proceeds go to the agent's operating wallet. Optionally list on Uniswap V3 after the sale closes.
🏊
Contribution Pool
Raise a fixed USDC target from multiple contributors. The agent deploys the pooled capital in its strategy and distributes a percentage of profits back to contributors proportional to their contribution. No token issuance — pure profit participation.
🖼️
Revenue Share NFT
Mint a limited collection of NFTs, each entitling its holder to a percentage of the agent's income stream. Fractional ownership: one NFT = one unit of future revenue. NFTs are transferable on secondary markets, giving backers liquidity without waiting for distributions.
🎲
Prediction Market Stake
Backers stake USDC on the agent meeting a specific performance target (e.g., 20% return in 90 days). If the agent hits the target, backers are paid at 2:1 odds. If it misses, the agent's penalty stake is distributed to stakers. High-stakes alignment between agent and backers.

API Endpoints

Complete fundraising lifecycle: create campaigns, accept contributions, monitor status, and distribute profits.

Method Endpoint Description
POST /v1/fundraising/create Create a new fundraising campaign. Specify type (token_sale, contribution_pool, revenue_nft, prediction_stake), target amount in USDC, end date, and distribution terms. Returns campaign ID and smart contract address.
GET /v1/fundraising/status Get current campaign metrics: total raised, number of contributors, amount remaining to target, time left, and whether the soft cap has been reached. Use for real-time progress tracking.
POST /v1/fundraising/contribute Accept a contribution from a contributor address. Validates the contribution against campaign rules (min/max per address, total cap). Emits on-chain event for transparency. Works with both agent and human contributors.
POST /v1/fundraising/close Close the campaign. If target was reached, funds transfer to the agent's operating wallet. If target was not reached (and refund mode is enabled), all contributions are automatically returned to their senders.
GET /v1/fundraising/investors Get full contributor list: wallet addresses, contribution amounts, timestamps, and pro-rata share percentage. Used to calculate distribution amounts for profit sharing rounds.
POST /v1/fundraising/distribute Distribute profits to all investors pro-rata. Specify total amount to distribute. The contract calculates each investor's share automatically and sends in a single batch transaction. Emits individual transfer events for investor records.

Example: Agent Token Sale

A fully autonomous fundraise: launch a token sale, monitor progress, close when fully subscribed, and distribute profits to investors after 90 days.

import requests import time from datetime import datetime, timedelta HEADERS = {"Authorization": "Bearer YOUR_PURPLEFLEA_API_KEY"} PF_BASE = "https://purpleflea.com/api" def run_agent_token_sale(target_usdc: float, sale_days: int): """Run a complete autonomous token sale""" # Step 1: Create fundraising campaign campaign = requests.post( f"{PF_BASE}/v1/fundraising/create", json={ "type": "token_sale", "name": "Purple Trading Agent Seed Round", "target_usdc": target_usdc, "end_date": (datetime.utcnow() + timedelta(days=sale_days)).isoformat(), "token_symbol": "PTAG", "tokens_per_usdc": 100, "profit_share_pct": 30, # 30% of profits distributed to holders "refund_if_not_met": True }, headers=HEADERS ).json() campaign_id = campaign["campaign_id"] contract = campaign["contract_address"] print(f"Campaign created: {campaign_id}") print(f"Contract: {contract}") # Step 2: Monitor until fully subscribed or deadline while True: status = requests.get( f"{PF_BASE}/v1/fundraising/status", params={"campaign_id": campaign_id}, headers=HEADERS ).json() raised = status["raised_usdc"] contributors = status["contributor_count"] print(f"Raised: ${raised:,.0f} USDC from {contributors} contributors") # Close if target reached or deadline passed if raised >= target_usdc or status["expired"]: break time.sleep(3600) # Check every hour # Step 3: Close campaign and receive funds close_result = requests.post( f"{PF_BASE}/v1/fundraising/close", json={"campaign_id": campaign_id}, headers=HEADERS ).json() if close_result["success"] and close_result["target_reached"]: print(f"Campaign closed. Received ${close_result['net_usdc']:,.0f} USDC") # Step 4: Deploy capital in trading strategy for 90 days # ... run trading strategy with raised capital ... trading_profits = 18500 # example: 18.5% return on $100k # Step 5: Distribute profits to investors (30% of profit) investor_share = trading_profits * 0.30 dist = requests.post( f"{PF_BASE}/v1/fundraising/distribute", json={ "campaign_id": campaign_id, "amount_usdc": investor_share, "memo": "Q1 2026 profit distribution" }, headers=HEADERS ).json() print(f"Distributed ${investor_share:,.0f} USDC to {dist['recipient_count']} investors") else: print("Target not reached — contributions auto-refunded to senders") # Run a $100k seed round over 30 days run_agent_token_sale(target_usdc=100_000, sale_days=30)

Legal Consideration

MCP Tool Calling

All fundraising endpoints are available as MCP tools for integration with any AI agent framework supporting the Model Context Protocol.

fundraising_create fundraising_contribute fundraising_status fundraising_close fundraising_investors fundraising_distribute

Connect via https://purpleflea.com/mcp to use these tools from Claude, GPT-4, or any MCP-compatible agent framework.

Related APIs

Fund Your Agent's Growth

Launch a token sale, contribution pool, or revenue share NFT. Raise capital programmatically with smart contract enforcement and no intermediaries.