Crypto options are one of the most powerful financial instruments available to AI agents. Unlike perpetual futures — where the payout is linear and losses are unlimited on the short side — options offer asymmetric risk/reward profiles. A bought option has capped downside (the premium paid) with theoretically unlimited upside. A sold option generates consistent income with defined risk boundaries. Agents can be the "house" or the "bettor" depending on market conditions.
This guide covers options mechanics for technical builders, three concrete strategies with Python code, the Purple Flea options API endpoints, and risk management rules for autonomous agents operating without human supervision.
Options Basics for Developers
If you are coming from a trading background, skip this section. If you are building agents without a derivatives background, this is the mental model you need:
| Term | Definition | Practical Meaning |
|---|---|---|
| Call | Right to buy the underlying at the strike price before expiry | Buy a call when you expect the price to rise. Profit = (spot - strike) - premium paid |
| Put | Right to sell the underlying at the strike price before expiry | Buy a put when you expect the price to fall. Acts as insurance for held assets. |
| Premium | The price paid to buy an option | Your maximum loss when buying an option. Collected income when selling. |
| Expiry | The date on which the option contract expires | Options lose time value (theta) daily as expiry approaches. Weekly options decay fastest. |
| IV (Implied Volatility) | The market's forecast of future price volatility embedded in the option price | High IV = expensive options. Sell options when IV is high, buy when IV is low. |
| Delta (Δ) | How much the option price changes per $1 move in the underlying | At-the-money call ≅ 0.50 delta. Deep in-the-money ≅ 1.0. Far OTM ≅ 0.05. |
| Theta (Θ) | Daily time decay — how much premium erodes per day | Positive theta = collect decay as option seller. Negative = lose to decay as buyer. |
| Vega (Ν) | Sensitivity to changes in implied volatility | Long vega benefits from IV expansion. Short vega profits from IV contraction. |
Why Options for AI Agents
Options offer three structural properties that make them uniquely well-suited to AI agents operating autonomously:
- Defined risk on bought options: When an agent buys a call or put, the maximum loss is the premium paid — regardless of market movement. There is no risk of a catastrophic position blowing up the agent's entire wallet. This is the key advantage over naked perpetual futures short positions.
- Leverage without liquidation: A 1-week 10% OTM call on ETH costs roughly 1% of the notional value. If ETH rallies 15%, that call might be worth 5–10% of notional — providing 5–10x leverage on the move. If ETH falls, the maximum loss is 1% of notional. No liquidation engine, no margin call.
- Consistent income via premium selling: Agents that hold underlying assets (e.g., ETH in the treasury) can sell covered calls every week against that holding, collecting 0.5–2% of notional weekly during high-IV regimes. This generates predictable income with no additional downside risk beyond the opportunity cost of the held asset.
Strategy 1 — Covered Call Writing
If the agent holds ETH (or any underlying), it can sell a call option at a strike price above the current market price, collecting premium. If ETH does not reach the strike by expiry, the option expires worthless and the agent keeps the full premium. The agent then "rolls" by selling a new call for the following week.
Example: ETH is at $3,400. The agent holds 1 ETH and sells a $3,600 call expiring in 7 days for a premium of $68 (2% of spot). If ETH closes below $3,600 on Friday, the agent keeps $68 in income. If ETH rallies past $3,600, the agent's ETH is called away at $3,600 — still a profitable outcome from the initial entry, plus the $68 premium collected.
import requests, os from datetime import datetime, timedelta PF_BASE = "https://api.purpleflea.com" HEADERS = {"Authorization": f"Bearer {os.environ['PF_API_KEY']}"} UNDERLYING = "ETH" ETH_HELD = 1.0 # ETH in treasury available for covered calls OTM_PCT = 0.06 # sell calls 6% above current price def roll_covered_call(): # Get current ETH spot price and options chain chain = requests.get( f"{PF_BASE}/v1/options/chain", params={"underlying": UNDERLYING, "expiry_days": 7}, headers=HEADERS ).json() spot = chain["spot_price"] target_strike = round(spot * (1 + OTM_PCT), -2) # round to nearest $100 # Find the call closest to target strike calls = [c for c in chain["contracts"] if c["type"] == "call"] best = min(calls, key=lambda c: abs(c["strike"] - target_strike)) print(f"Spot: ${spot:,.0f} | Selling {best['strike']} call | Premium: ${best['premium']:.2f} | IV: {best['iv']:.1f}%") # Check minimum premium threshold (skip if IV too low) if best["premium"] < spot * 0.005: # skip if < 0.5% of spot print("Premium too low — skipping this week") return # Sell the covered call (quantity = ETH held) order = requests.post( f"{PF_BASE}/v1/options/order", json={ "underlying": UNDERLYING, "type": "call", "side": "sell", "strike": best["strike"], "expiry": best["expiry"], "quantity": ETH_HELD, "order_type": "market" }, headers=HEADERS ).json() print(f"Sold ${best['strike']} call | Order ID: {order['order_id']} | Income: ${order['premium_received']:.2f}") if __name__ == "__main__": roll_covered_call()
Strategy 2 — Buying Calls on Momentum
When technical indicators signal a strong breakout — RSI above 70 with price confirming above a key resistance — the agent buys a 1-week OTM call for 3–5% of portfolio. If the breakout extends, the call delivers 5–15x leverage on the move. Maximum loss is the premium: no liquidation risk.
The key to this strategy is strike selection. Buying a deep OTM call (delta 0.10) is cheap but has a low probability of being in-the-money at expiry. Buying an at-the-money call (delta 0.50) costs 5x more but has far higher probability of profit. For breakout trades, the sweet spot is usually the 25–35 delta strike: meaningful leverage at a premium that the portfolio can absorb if the trade fails.
def buy_momentum_call(underlying: str, spot: float, portfolio_usd: float): # Get options chain for 7-day expiry chain = requests.get( f"{PF_BASE}/v1/options/chain", params={"underlying": underlying, "expiry_days": 7}, headers=HEADERS ).json() # Find call with delta closest to 0.30 (OTM but with meaningful probability) calls = [c for c in chain["contracts"] if c["type"] == "call"] target_delta = 0.30 best = min(calls, key=lambda c: abs(c["greeks"]["delta"] - target_delta)) # Allocate 3% of portfolio to this trade max_spend_usd = portfolio_usd * 0.03 quantity = min(1.0, max_spend_usd / (best["premium"] * spot)) # options are sized per underlying unit print(f"Buying {quantity:.3f}x {best['strike']} call | Delta: {best['greeks']['delta']:.2f}") print(f"Cost: ${best['premium'] * spot * quantity:.2f} | Max loss: ${best['premium'] * spot * quantity:.2f}") print(f"Breakeven at expiry: ${best['strike'] + best['premium']:.0f}") order = requests.post( f"{PF_BASE}/v1/options/order", json={ "underlying": underlying, "type": "call", "side": "buy", "strike": best["strike"], "expiry": best["expiry"], "quantity": round(quantity, 3), "order_type": "limit", "limit_price": best["premium"] * 1.02 # 2% slippage tolerance }, headers=HEADERS ).json() return order
Strategy 3 — Delta-Neutral Strangle
Sell an OTM call and an OTM put simultaneously. Collect premium from both legs. Profit if the underlying price stays between the two strikes until expiry. This is the "be the house" strategy: most options expire worthless, and the seller collects the premium. Works best when IV Rank > 80 (options are expensive relative to historical volatility).
The strangle is delta-neutral at entry: the short call has roughly +0.20 delta and the short put has roughly -0.20 delta, netting near zero. As the underlying moves, the position develops directional exposure. Agents running strangles need to monitor delta drift and roll untested sides to maintain delta balance.
def enter_strangle_if_iv_high(underlying: str, iv_rank_threshold: float = 80.0): # Get current IV rank (0-100 scale, where 100 = highest IV in 52 weeks) iv_data = requests.get( f"{PF_BASE}/v1/options/iv-rank", params={"underlying": underlying}, headers=HEADERS ).json() if iv_data["iv_rank"] < iv_rank_threshold: print(f"IV Rank {iv_data['iv_rank']:.0f} below threshold {iv_rank_threshold} — no strangle") return None print(f"IV Rank: {iv_data['iv_rank']:.0f} — entering strangle") # Get chain for 21-day expiry (optimal theta/gamma ratio for short strangles) chain = requests.get( f"{PF_BASE}/v1/options/chain", params={"underlying": underlying, "expiry_days": 21}, headers=HEADERS ).json() # Find ~0.20 delta OTM call and ~-0.20 delta OTM put calls = [c for c in chain["contracts"] if c["type"] == "call"] puts = [p for p in chain["contracts"] if p["type"] == "put"] short_call = min(calls, key=lambda c: abs(c["greeks"]["delta"] - 0.20)) short_put = min(puts, key=lambda p: abs(p["greeks"]["delta"] + 0.20)) total_premium = short_call["premium"] + short_put["premium"] spot = chain["spot_price"] print(f"Strangle: sell {short_call['strike']} call + {short_put['strike']} put") print(f"Total premium: ${total_premium * spot:.2f} | Profitable range: ${short_put['strike']:.0f}–${short_call['strike']:.0f}") # Enter both legs for leg, leg_type in [(short_call, "call"), (short_put, "put")]: requests.post( f"{PF_BASE}/v1/options/order", json={ "underlying": underlying, "type": leg_type, "side": "sell", "strike": leg["strike"], "expiry": leg["expiry"], "quantity": 1.0, "order_type": "market" }, headers=HEADERS ) if __name__ == "__main__": enter_strangle_if_iv_high("ETH")
Purple Flea Options API
Purple Flea's options API provides a unified interface across Deribit (the dominant institutional venue) and Lyra Finance (on-chain, Arbitrum-native). Your agent uses the same endpoints regardless of which venue fills the order — the routing is handled automatically based on available liquidity and spread.
| Endpoint | Description |
|---|---|
| GET/v1/options/chain | Full options chain for a given underlying and expiry. Returns all strikes with IV, premium, greeks (delta, gamma, theta, vega) and open interest. |
| GET/v1/options/iv-rank | Current IV and IV Rank (0–100) for an underlying asset. IV Rank measures where current IV sits relative to its 52-week range. Essential for premium selling decisions. |
| POST/v1/options/order | Open an options position. Supports market and limit orders, all expiries, all strikes. Returns order ID, fill price, and position greeks. |
| POST/v1/options/close | Close or roll an existing options position. Roll by specifying a new strike or expiry; the API closes the existing leg and opens the new one as a single atomic transaction. |
| GET/v1/options/portfolio | Portfolio-level greeks: total delta, gamma, theta, vega across all open positions. Use to monitor aggregate exposure and trigger delta-hedging when portfolio delta exceeds configured limits. |
Risk Management for Options Agents
Options agents operating without human supervision need hard risk limits encoded into the agent logic — not guidelines, but enforced guards that prevent catastrophic mistakes:
- Maximum portfolio delta: Set a delta limit (e.g., ±0.20 portfolio delta). If the aggregate delta drifts beyond this, the agent must delta-hedge by adjusting perpetual futures positions or rolling options.
- Maximum vega exposure: Short vega positions (sold strangles) lose money when IV spikes. Set a maximum short vega limit relative to portfolio size. Reduce short volatility exposure before major macro events (FOMC, CPI prints) that typically cause IV expansion.
- Position size limits: No single options position should represent more than 5% of the portfolio. This prevents a single bad trade from materially impacting the portfolio regardless of how confident the model is.
- Never sell naked calls on uncovered positions: Short calls without the underlying create unlimited upside risk. The agent should only sell calls against a held underlying (covered calls) or as part of a defined-risk spread.
Earnings-adjacent trades: Major crypto events (network upgrades, exchange hacks, regulatory rulings) cause IV to spike dramatically, often doubling overnight. Short volatility positions entered just before such events can lose 3–5x the maximum expected profit from premium collection. The API flags known high-risk dates in the option chain metadata. Agents should widen strikes or reduce size around these dates automatically.
Strategy summary: Use covered calls for consistent income on held crypto positions. Use momentum calls for directional bets with defined downside. Use strangles when IV Rank exceeds 80 to collect elevated premium in mean-reverting volatility environments. Monitor portfolio greeks daily and enforce the hard limits above.