Not just BTC and ETH. AI agents can trade any token — from blue chips to freshly launched memecoins — via Purple Flea's unified trading API covering both spot DEXes and perpetual markets across 8 chains.
Four token categories, two market types (spot + perps), eight chains. One API handles it all.
The most liquid, most established crypto assets. Deep order books, tight spreads, and available across both spot DEX and perpetuals with high leverage options.
Protocol governance and revenue-sharing tokens for the largest DeFi ecosystems. Subject to on-chain activity correlation — agent strategies can exploit on-chain signals.
The native tokens of leading Ethereum scaling solutions. Highly correlated with Ethereum activity but with independent tokenomics and governance. Fast-moving with high volume.
High-risk, high-reward community-driven tokens. Purple Flea's anti-rug screening filters out honeypots and low-liquidity traps so agents can participate in memecoin mania with reduced exposure to the worst risks.
Search tokens by name, buy via spot DEX, check for a perpetual market — all through the same Python library.
import purpleflea wallet = purpleflea.WalletClient(api_key="YOUR_KEY") trader = purpleflea.TradingClient(api_key="YOUR_KEY") # Search for a token by name or contract token = wallet.search_token("PEPE", chain="ethereum") print(f"PEPE contract: {token['contract_address']}") print(f"PEPE price: ${token['price_usd']:.8f}") print(f"Liquidity: ${token['liquidity_usd']:,.0f}") print(f"Rug risk score: {token['rug_risk_score']}/10") # Buy a memecoin via DEX (spot) swap = wallet.swap( agent_id="agent_001", from_token="USDC", to_token=token["symbol"], amount=100, # $100 USDC slippage_bps=100, # 1% slippage for illiquid tokens chain="ethereum" ) print(f"Bought: {swap['to_amount']:,.0f} PEPE @ ${swap['price_usd']:.8f}") # Also available as perpetuals on Hyperliquid perps = trader.search_markets("PEPE") for p in perps: print(f"{p['market']}: OI=${p['open_interest_usd']:,.0f}") # Open a leveraged long on the perp pos = trader.open_position( agent_id="agent_001", market=perps[0]["market"], side="long", size_usdc=200, leverage=3 ) print(f"Position opened: {pos['position_id']}")
Every chain uses the same API surface. Switch chains with a single parameter change. Cross-chain token searches return results from all chains simultaneously.
# Search across all chains results = wallet.search_token( query="PEPE", chains="all" # search every chain ) for r in results: print( f"{r['chain']}: {r['symbol']}" f" ${r['price_usd']:.8f}" f" liq=${r['liquidity_usd']:,.0f}" ) # ethereum: PEPE $0.00001234 liq=$4,200,000 # base: PEPE $0.00001231 liq=$890,000 # bsc: PEPE $0.00001236 liq=$210,000
# Get all token balances across chains portfolio = wallet.get_portfolio( agent_id="agent_001" ) print(f"Total: ${portfolio['total_usd']:,.2f}") for token in portfolio["holdings"]: print( f"{token['chain']}/{token['symbol']}: " f"${token['value_usd']:,.2f} " f"({token['pnl_pct']:+.1f}%)" )
Memecoins carry real risks. Purple Flea screens every token before allowing a trade, flagging common rug pull patterns so agents avoid the worst outcomes.
Minimum $50,000 USD in liquidity required. Tokens below this threshold are flagged and blocked by default. Agents can override the threshold with a parameter flag and explicit acknowledgment.
Simulates a buy and sell before executing the real trade. If the simulation shows the sell fails (honeypot contract), the trade is rejected and the agent receives an error with the reason code.
Checks if the top 10 wallets hold more than 80% of the supply. High concentration is a strong predictor of dump risk. Agents can set their own concentration threshold per strategy.
Returns audit status from major auditors (CertiK, Hacken, OpenZeppelin). Unaudited contracts receive a warning flag. Agents can require a minimum audit score before execution.
For tokens on Solana, checks if the mint authority is still active (can create unlimited supply). For EVM tokens, checks for owner backdoors and emergency withdrawal functions.
Detects if top holders have sold more than 20% of their position in the last 24 hours. Large insider sells often precede broader dumps. Includes volume spike anomaly detection.
Both market types are available for 200+ tokens. The right choice depends on your agent's time horizon, risk tolerance, and capital efficiency needs.
One API key gives your agent access to 200+ tokens across 8 chains with anti-rug protection on every trade. Get started in minutes.
Get API Key — Free →