Wagyu Aggregator — Best Rate Guaranteed

Swap any token, any chain.
Best rate guaranteed.

One API call to swap any token on any of 8 supported chains. Purple Flea's Wagyu aggregator simultaneously queries 1inch, Paraswap, Jupiter, Li.Fi, and 0x to find the best execution price, then routes your swap through whichever gives the most output. No manual bridge hunting. No split transactions. Just swap.


8
Supported chains
5
Aggregator sources
0.1%
Swap fee
10%
Referral share of fee

Five liquidity sources.
One best price.

The Wagyu aggregator runs behind every quote request. It fans out to all available liquidity sources in parallel, collects their output amounts, compares them accounting for gas costs and fees, and returns the single best route. Your agent gets the best price automatically — no source selection required.

1inch
Paraswap
Jupiter
Li.Fi
0x Protocol
📈

Best rate, always

The aggregator queries all sources simultaneously and picks the one returning the highest output amount after all fees. Your agent never leaves money on the table due to fragmented liquidity.

🔗

Cross-chain routing

For cross-chain swaps, Li.Fi's bridging intelligence finds the optimal route — whether that means bridging then swapping, or swapping then bridging, depending on which produces more output tokens at the destination.

🕐

Price impact transparency

Every quote response includes the expected price impact as a percentage. If impact exceeds 1%, a warning flag is set. Your agent can inspect this before executing and decide whether to proceed or split the swap.


Eight chains.
Thousands of tokens.

Every major chain your agent might hold assets on is supported — from EVM chains to Solana, Tron, and Bitcoin. Same-chain swaps complete in seconds. Cross-chain transfers estimate completion times based on bridge latency.

EVM
Ethereum
ETH, USDC, USDT, WBTC, all ERC-20 tokens
EVM
Base
ETH, USDC, cbBTC, all Base ERC-20 tokens
EVM
Polygon
POL, USDC, USDT, WETH, all Polygon ERC-20
EVM
Arbitrum
ETH, USDC, ARB, GMX, all Arbitrum ERC-20
EVM
BNB Chain
BNB, USDT, BUSD, CAKE, all BEP-20 tokens
Solana
Solana
SOL, USDC, JUP, RAY, all SPL tokens
Tron
Tron
TRX, USDT (TRC-20), USDD, all TRC-20 tokens
Bitcoin
Bitcoin
BTC (native), wrapped via bridging routes

Three endpoints.
Quote, execute, track.

All swap endpoints are served from wallet.purpleflea.com. Every request requires a bearer token in the Authorization header. All bodies are JSON.

GET /v1/wallet/swap/quote
Get the best rate quote for a swap. Returns the expected output amount, price impact, estimated gas cost, best aggregator source, and route details. Does not execute the swap — safe to call speculatively. Required params: from_chain, to_chain, from_token, to_token, amount.
POST /v1/wallet/swap
Execute a swap. Submits the swap for execution using the route returned by the quote endpoint. Pass the quote_id from the quote response to lock in the quoted rate. Quotes are valid for 30 seconds after issuance. Returns an order_id for status tracking.
GET /v1/wallet/swap/status/:orderId
Track cross-chain swap status. Returns the current state of a swap order: pending, bridging, swapping, completed, or failed. Includes source transaction hash, destination transaction hash (when available), estimated completion time, and actual received amount on completion.

Quote Parameters

Parameter Type Description Required
from_chain string Source chain identifier: ethereum, base, polygon, arbitrum, bnb, solana, tron, bitcoin Required
to_chain string Destination chain identifier. Can be the same as from_chain for same-chain swaps. Required
from_token string Token to swap from. Use token symbol (e.g. ETH, USDC) or contract address. Required
to_token string Token to receive. Use token symbol or contract address on the destination chain. Required
amount string Amount of from_token to swap, in token units (e.g. "1.5" for 1.5 ETH, "100" for 100 USDC). Required
slippage_bps integer Maximum acceptable slippage in basis points. Default: 50 (0.5%). Set lower for stable pairs, higher for volatile tokens or large sizes. Optional
recipient string Destination address for the output tokens. Defaults to the wallet address associated with the API key. Optional
⚠️

Slippage and price impact: slippage_bps sets the maximum deviation from the quoted price your agent will accept. If execution price moves beyond this, the transaction reverts and no funds are lost. Price impact (shown in quote response as price_impact_pct) is the market movement caused by your order size — distinct from slippage. Inspect both fields before executing large swaps.


Same-chain: seconds.
Cross-chain: minutes.

Completion time depends on whether the swap stays on one chain or crosses a bridge. Same-chain swaps are limited by block time. Cross-chain swaps depend on bridge finality requirements — the status endpoint keeps your agent informed throughout.

Same-chain (EVM)
5–30s
e.g. ETH → USDC on Ethereum, SOL → JUP on Solana, BNB → CAKE on BNB Chain
Cross-chain (EVM → EVM)
1–5 min
e.g. USDC on Ethereum → USDC on Base, ETH → ETH on Arbitrum
Cross-chain (EVM → Solana / Bitcoin)
5–20 min
e.g. ETH on Ethereum → SOL on Solana, USDC → BTC (wrapped)

Python and TypeScript
examples ready to run.

Both examples follow the same pattern: get a quote, confirm the price impact is acceptable, then execute and poll for completion.

swap_eth_for_sol.py — Swap ETH on Ethereum to SOL on Solana
import requests, time BASE = "https://wallet.purpleflea.com" HEADERS = {"Authorization": "Bearer pf_sk_..."} # 1. Get a quote — fanout to all aggregators, returns best rate quote = requests.get(f"{BASE}/v1/wallet/swap/quote", headers=HEADERS, params={ "from_chain": "ethereum", "to_chain": "solana", "from_token": "ETH", "to_token": "SOL", "amount": "0.5", # 0.5 ETH "slippage_bps": 100, # 1% max slippage for cross-chain }).json() print(f"Quote:") print(f" Input: 0.5 ETH") print(f" Output: {quote['to_amount']} SOL") print(f" Price impact: {quote['price_impact_pct']}%") print(f" Route via: {quote['best_source']}") print(f" Est. time: {quote['estimated_seconds']}s") print(f" Quote valid: {quote['expires_at']}") # 2. Abort if price impact is too high if float(quote["price_impact_pct"]) > 2.0: print("Price impact too high — aborting") exit(1) # 3. Execute the swap using the locked quote_id swap = requests.post(f"{BASE}/v1/wallet/swap", headers=HEADERS, json={ "quote_id": quote["quote_id"], }).json() order_id = swap["order_id"] print(f"\nSwap submitted — order_id: {order_id}") # 4. Poll status until complete while True: status = requests.get( f"{BASE}/v1/wallet/swap/status/{order_id}", headers=HEADERS ).json() state = status["state"] print(f" Status: {state}") if state == "completed": print(f" Received: {status['received_amount']} SOL") print(f" Dest tx: {status['destination_tx_hash']}") break elif state == "failed": print(f" Failed: {status['error']}") break time.sleep(5)
bridge_usdc.ts — Bridge USDC from Arbitrum to Base (TypeScript)
const BASE_URL = "https://wallet.purpleflea.com"; const HEADERS = { Authorization: "Bearer pf_sk_...", "Content-Type": "application/json" }; interface QuoteResponse { quote_id: string; to_amount: string; price_impact_pct: string; best_source: string; estimated_seconds: number; expires_at: number; } interface StatusResponse { state: string; received_amount?: string; destination_tx_hash?: string; error?: string; } async function bridgeUSDC(amount: string): Promise<void> { // 1. Get quote const qRes = await fetch( `${BASE_URL}/v1/wallet/swap/quote?from_chain=arbitrum&to_chain=base` + `&from_token=USDC&to_token=USDC&amount=${amount}&slippage_bps=30`, { headers: HEADERS } ); const quote: QuoteResponse = await qRes.json(); console.log(`Bridge ${amount} USDC Arbitrum → Base`); console.log(` Output: ${quote.to_amount} USDC`); console.log(` Price impact: ${quote.price_impact_pct}%`); console.log(` Route: ${quote.best_source}`); console.log(` Est. time: ${quote.estimated_seconds}s`); // 2. Execute const sRes = await fetch(`${BASE_URL}/v1/wallet/swap`, { method: "POST", headers: HEADERS, body: JSON.stringify({ quote_id: quote.quote_id }), }); const { order_id } = await sRes.json(); console.log(`\nOrder submitted: ${order_id}`); // 3. Poll until done while (true) { await new Promise(r => setTimeout(r, 4000)); const tRes = await fetch( `${BASE_URL}/v1/wallet/swap/status/${order_id}`, { headers: HEADERS } ); const status: StatusResponse = await tRes.json(); console.log(` ${status.state}`); if (status.state === "completed") { console.log(` Arrived: ${status.received_amount} USDC on Base`); console.log(` Tx: ${status.destination_tx_hash}`); break; } if (status.state === "failed") { throw new Error(status.error); } } } bridgeUSDC("500").catch(console.error);

What agents use the
swap API for.

The cross-chain swap API is a building block for any agent that manages assets across multiple chains or protocols. Here are the three most common patterns.

🔄

Portfolio rebalancing

An agent holding assets across chains runs rebalancing logic on a schedule: it checks allocations against targets, calculates the optimal swap path to restore balance, and executes via the swap API. No manual cross-chain treasury management required.

💰

Taking profits across chains

After a Hyperliquid position closes with profit in USDC, an agent bridges a portion to Solana to take advantage of higher yield rates on Solana DeFi. The swap API handles the USDC → SOL conversion and Arbitrum → Solana bridge in a single call.

Gas currency management

An agent operating on multiple chains occasionally runs low on native gas tokens. It monitors native balances via the wallet API and automatically tops up by swapping a small amount of USDC to the required gas token on the chain where it is running low.


Simple pricing.
10% goes to referrers.

One fee covers everything — Purple Flea's service, the aggregator routing, and a contribution to the referral program. No subscription, no per-call charge, no hidden markups on routes.

0.1%

Swap fee on output amount

0.1% is deducted from the output token amount on every swap. This covers Purple Flea's routing fee, bridge costs on cross-chain swaps, and aggregator fees where applicable. No additional subscription or per-call charge.

10%

Referral share of the swap fee

10% of Purple Flea's 0.1% fee goes to the developer who referred the agent. On a $10,000 swap, the fee is $10 and the referrer earns $1. Referral income accumulates in USDC and is withdrawable above $1.


The complete agent
financial stack.

Give your agent the ability to
swap anything, anywhere.

One API. Eight chains. Best rate on every swap. 0.1% fee, 10% referral share.