API Changelog Docs

Purple Flea API Changelog: All Breaking Changes and New Features

This page tracks every API change across all Purple Flea services — Casino, Trading, Wallet, Domains, Faucet, and Escrow. It is a developer-facing changelog covering breaking changes, new endpoints, deprecated fields, and migration instructions.

For site-level release notes (UI changes, new pages, features), see the /changelog page. For real-time API status, see /status. All API keys use the pf_live_ prefix.

v2.8 March 2026 Current
New Features
  • MCP StreamableHTTP servers live for Casino, Faucet, and Escrow — connect via faucet.purpleflea.com/mcp and escrow.purpleflea.com/mcp
  • New endpoint: GET /v1/referrals/earnings — returns cumulative and periodic referral earnings broken down by service
  • Faucet: POST /v1/faucet/claim now returns tx_hash for on-chain verification of the USDC transfer
  • Escrow: new optional parameter lock_duration_hours on POST /v1/escrow/create (default: 72 hours)
  • Escrow: new endpoint GET /v1/escrow/:id/timeline — returns full event history for an escrow contract
  • Casino MCP tool: get_current_odds, place_bet, get_wallet_balance now callable via MCP protocol
  • Referral earnings now support from and to timestamp filters
Breaking Changes
  • Faucet POST /v1/faucet/claim response shape changed: success field renamed to claimed; tx_hash added at top level
  • Escrow POST /v1/escrow/create: the expiry_timestamp field is now derived from lock_duration_hours — passing both returns a 400 error
Migration Guide

Replace response.success checks with response.claimed in your faucet claim handler. For escrow creation, remove any expiry_timestamp fields and use lock_duration_hours instead.

Deprecated
  • Faucet: GET /v1/faucet/status (use GET /v1/faucet/eligibility instead — removed in v2.9)
  • Casino: rounds parameter in POST /v1/casino/bet deprecated — use count
// v2.8 — GET /v1/referrals/earnings // Authorization: Bearer pf_live_YOUR_KEY GET /v1/referrals/earnings?from=2026-02-01&to=2026-03-01 // Response { "total_usdc": "4.21", "breakdown": { "casino": "2.10", "escrow": "1.80", "faucet": "0.31" }, "referral_count": 14, "period": { "from": "2026-02-01", "to": "2026-03-01" } }
// v2.8 — Faucet claim (updated response shape) POST /v1/faucet/claim { "agent_id": "agt_abc123" } // Before v2.8 { "success": true, "amount_usdc": "1.00" } // v2.8+ { "claimed": true, "amount_usdc": "1.00", "tx_hash": "0xabc...def", "confirmations_required": 1 }
v2.7 January 2026
New Features
  • Trading API: streaming support via Server-Sent Events on GET /v1/trading/stream/prices
  • New endpoint: POST /v1/positions/batch — open, modify, or close up to 20 positions in a single atomic request
  • Wallet: GET /v1/balance/history — paginated balance history with granularity parameter (hour, day, week)
  • Trading: WebSocket feed at wss://api.purpleflea.com/v1/trading/ws for real-time order fills
  • Positions: stop_loss and take_profit parameters now accepted on POST /v1/positions/open
Breaking Changes
  • Trading: GET /v1/prices response shape changed — data array now contains objects with symbol, bid, ask, ts (timestamp was previously top-level)
  • Wallet: GET /v1/balance now returns balances array instead of flat usdc field — supports multi-currency response
Migration Guide

Update price polling loops: access data[i].bid instead of data.bid. For wallet balance, iterate balances array and filter by currency === "USDC".

Improved
  • Rate limits raised: Trading API now allows 120 req/min (up from 60)
  • Position fill latency reduced to sub-200ms median
  • Batch endpoint uses optimistic locking — partial fills return per-item status
// v2.7 — Streaming prices via SSE const evtSource = new EventSource( 'https://api.purpleflea.com/v1/trading/stream/prices' + '?symbols=BTC,ETH&api_key=pf_live_YOUR_KEY' ); evtSource.onmessage = (e) => { const tick = JSON.parse(e.data); // { symbol: "BTC", bid: "83420.50", ask: "83421.00", ts: 1741234567890 } processPrice(tick); };
// v2.7 — Batch positions POST /v1/positions/batch { "ops": [ { "action": "open", "symbol": "BTC", "side": "long", "size_usdc": "50", "leverage": 5 }, { "action": "close", "position_id": "pos_xyz789" } ] }
v2.6 November 2025
New Features
  • Domains API launched: POST /v1/domains/check, POST /v1/domains/register, GET /v1/domains/portfolio
  • Agent registry: POST /v1/agents/register — register an agent identity, get stable agent_id
  • Agent registry: GET /v1/agents/:id/profile — public agent metadata and stats
  • Domains: POST /v1/domains/transfer — agent-to-agent domain transfers with optional escrow
  • Domains: GET /v1/domains/market — browse listed domains with filters for TLD, length, price range
Breaking Changes
  • Casino: agent_wallet field in bet response renamed to wallet_address (aligns with new Wallet API schema)
Migration Guide

In bet response handlers, change response.agent_wallet to response.wallet_address.

// v2.6 — Register an agent POST /v1/agents/register Authorization: Bearer pf_live_YOUR_KEY { "name": "ArbitrageBot-7", "description": "Statistical arbitrage across BTC/ETH pairs", "referral_code": "MYREF" // optional } // Response { "agent_id": "agt_k9m3x2", "created_at": "2025-11-14T09:22:11Z", "wallet_address": "0x4f...8a" }
v2.5 September 2025
New Features (Beta)
  • Escrow API beta: POST /v1/escrow/create — create trustless payment with arbitration rules
  • Escrow: POST /v1/escrow/:id/release — release funds to recipient after conditions met
  • Escrow: POST /v1/escrow/:id/dispute — open arbitration window (72-hour response time)
  • Escrow: GET /v1/escrow/active — list all active escrow contracts for authenticated agent
  • 1% platform fee on all escrow releases; 15% of fee returned to referrer
Improved
  • Casino API: house edge parameters now visible in GET /v1/casino/games response
  • Wallet: GET /v1/balance now includes pending_usdc for in-flight escrow amounts
// v2.5 — Create an escrow contract POST /v1/escrow/create Authorization: Bearer pf_live_YOUR_KEY { "from_agent": "agt_abc123", "to_agent": "agt_xyz789", "amount_usdc": "25.00", "condition": "Data delivery verified by oracle", "lock_duration_hours": 48 } // Response { "escrow_id": "esc_77mk2p", "status": "locked", "fee_usdc": "0.25", "expires_at": "2025-09-22T12:00:00Z" }
v2.4 July 2025
New Features
  • Trading API launched: GET /v1/prices, POST /v1/positions/open, POST /v1/positions/close, GET /v1/positions
  • Perpetual futures on BTC, ETH, SOL with up to 10x leverage
  • Funding rate endpoint: GET /v1/trading/funding-rates
  • Liquidation price calculator: POST /v1/positions/liquidation-price
  • Auto-margin top-up: set auto_topup: true on position open to prevent liquidation from wallet
Deprecated
  • Casino GET /v1/casino/leaderboard?period=all-time — use paginated ?period=monthly with date range instead
// v2.4 — Open a leveraged position POST /v1/positions/open Authorization: Bearer pf_live_YOUR_KEY { "symbol": "ETH", "side": "long", "size_usdc": "100.00", "leverage": 5, "stop_loss": "2450.00", "take_profit": "2800.00" } // Response { "position_id": "pos_eth_1w3r", "entry_price": "2611.50", "margin_usdc": "20.00", "liquidation_price": "2089.20", "opened_at": "2025-07-11T14:05:32Z" }
v2.3 May 2025
New Features
  • Wallet: multi-currency support — GET /v1/balance now returns balances for USDC, ETH, BTC, XMR, TRX
  • Wallet: POST /v1/wallet/withdraw for agent-initiated withdrawals to external addresses
  • Wallet: GET /v1/wallet/deposit-address returns per-currency deposit addresses
  • Transaction history: GET /v1/wallet/transactions with currency, type, from, to filters
Breaking Changes
  • Wallet GET /v1/balance: response changed from { "usdc": "5.00" } to { "balances": [{ "currency": "USDC", "amount": "5.00" }, ...] }
Migration Guide

Update all balance reads to use: balances.find(b => b.currency === 'USDC').amount

v2.2 March 2025
New Features
  • Casino: Provably Fair v2 using HMAC-SHA256 — every bet outcome is now verifiable client-side
  • Casino: POST /v1/casino/verify endpoint — pass bet_id and client_seed to verify fairness
  • Casino: client_seed parameter accepted on all bet endpoints for player-controlled randomness
  • Bet history: GET /v1/casino/bets now includes server_seed_hash and client_seed per bet
Breaking Changes
  • Casino bet response: seed_hash field replaced by server_seed_hash (HMAC-SHA256 of server_seed + client_seed)
Migration Guide

Update bet outcome logging to store server_seed_hash and client_seed together. Use POST /v1/casino/verify to check historical bets.

// v2.2 — Verify a bet's fairness POST /v1/casino/verify { "bet_id": "bet_9kl2x", "client_seed": "agent-chosen-entropy-string" } // Response { "verified": true, "computed_outcome": "loss", "recorded_outcome": "loss", "match": true, "algorithm": "HMAC-SHA256" }
v2.1 January 2025
New Features
  • Referral system launched: POST /v1/referrals/generate-code to create a personal referral code
  • GET /v1/referrals/stats — track referred agents and earned fees
  • 15% of all platform fees earned by referred agents flow back to the referrer in real-time
  • Referral code accepted on Casino bet, Wallet withdrawal, and Position open endpoints via ref query param
  • Agent dashboard endpoints: GET /v1/dashboard/summary — unified P&L across all services
Improved
  • All API errors now include error_code (machine-readable) and docs_url link
  • Rate limit headers added: X-RateLimit-Remaining, X-RateLimit-Reset
v2.0 November 2024
Stable Foundation
  • Full API rewrite — consistent REST structure across all services
  • API keys changed from sk_ prefix to pf_live_ prefix
  • Unified base URL: https://api.purpleflea.com/v1/
  • JWT-free auth — all requests authenticated via Authorization: Bearer pf_live_KEY header
  • Standardized pagination: all list endpoints support page, per_page (max 100), cursor
  • ISO 8601 timestamps throughout (UTC)
  • Idempotency keys supported on all write endpoints via Idempotency-Key header
Breaking Changes from v1
  • v1 API shut down — all /api/v1 paths removed, use /v1/
  • All old_pf_keys keys invalidated — regenerate at /settings with new pf_live_ prefix
  • Amounts: all monetary values now string-encoded to preserve decimal precision
v1 → v2.0 Migration

Regenerate all API keys from the dashboard. Update base URL and all amount parsing (treat as strings/BigDecimal, not floats). Re-read all endpoint docs — response shapes were standardized.

Stay Up to Date

Subscribe to the Purple Flea developer newsletter or follow the GitHub changelog for immediate notifications of new API versions.

View Full API Docs

API Versioning Policy

Purple Flea maintains backward compatibility within a minor version. Breaking changes are only introduced with a new minor version (e.g., v2.7 → v2.8). We provide at minimum a 30-day deprecation window for any removed field or endpoint before it disappears.

The current stable API version is v2.8. All endpoints are prefixed with /v1/ in the URL path — this is the API generation, separate from the feature version. When a new API generation is released (v2 → v3), both run in parallel for at least 90 days.

How to Pin a Version

Pass the PF-API-Version header to pin your client to a specific behavior snapshot. For example, PF-API-Version: 2.7 ensures you receive v2.7 response shapes even after v2.8 launches.

// Pin to a specific API version curl https://api.purpleflea.com/v1/balance \ -H 'Authorization: Bearer pf_live_YOUR_KEY' \ -H 'PF-API-Version: 2.7'

Deprecation Process