HOW IT WORKS
Trading Bot → AgentTax → Tax Report
Your bot trades. We track cost basis, calculate gains, and generate tax reports. One API call per trade.
🤖
1. Agent Executes Trade
On exchange or marketplace
Your trading bot buys or sells an asset on any exchange — Coinbase, Binance, a decentralized exchange, or an AI compute marketplace. The trade executes normally.
BUY 5 ETH @ $3,245.00
Exchange: Coinbase Asset: ETH Type: BUY Quantity: 5.0 Price: $3,245.00 Total: $16,225.00
📡
2. Log Trade to AgentTax
POST /api/v1/trades
After execution, your bot sends the trade details to AgentTax via API. One simple POST request. AgentTax records the trade and creates cost basis lots for buys.
API REQUEST
POST /api/v1/trades
{
"asset_symbol": "ETH",
"trade_type": "buy",
"quantity": 5.0,
"price_per_unit": 3245.00,
"trade_date": "2026-02-27T14:30:00Z",
"exchange": "coinbase",
"counterparty": "market"
}🧮
3. Cost Basis Tracking
FIFO / LIFO / Specific ID
AgentTax creates a cost basis lot for every buy. When you sell, it matches against existing lots using your chosen accounting method (FIFO by default). Each lot tracks: quantity remaining, cost per unit, and acquisition date.
COST BASIS LOTS
LOT #1: 8.0 ETH @ $3,105 (Feb 18) LOT #2: 5.0 ETH @ $3,245 (Feb 27) ──────────────────────── Total: 13.0 ETH Avg Cost: $3,159.23 Method: FIFO
💰
4. Sell → Realize Gain/Loss
Automatic P&L calculation
When your bot sells, AgentTax automatically matches the sale against cost basis lots and calculates the realized gain or loss. It determines short-term vs long-term based on holding period (< or ≥ 366 days).
SELL 3 ETH @ $3,380.00
Proceeds: $10,140.00 Cost Basis: $9,315.00 (3 ETH from LOT #1) ───────────────────── Gain: +$825.00 Holding: 9 days Term: SHORT-TERM Tax Rate: Ordinary income
📊
5. Live Price Updates
Unrealized P&L via CoinGecko
AgentTax fetches current market prices from CoinGecko's free API to calculate unrealized gains on your open positions. Non-crypto assets (compute credits, data tokens) use the last trade price.
OPEN POSITIONS
ETH: 10.0 @ avg $3,155
Now: $3,245 → +$900 unrealized
BTC: 0.25 @ avg $82,100
Now: $84,200 → +$525 unrealized
─────────────────────
Prices via CoinGecko API🧾
6. Tax Report Generation
Form 8949 / Schedule D ready
At any time, export a complete tax report. AgentTax separates short-term and long-term gains, calculates estimated tax liability, tracks the $3,000 capital loss deduction, and generates Form 8949-compatible CSV.
2026 TAX SUMMARY
Short-Term Gains: +$2,917.50 (8 trades, taxed as income) Long-Term Gains: +$925.00 (3 trades, 15% rate) ───────────────────── Net Realized: +$3,842.50 Est. Tax: ~$1,072.35 Export: CSV (Form 8949)
Ready to track your trades?
Free tier: 500 trades/month · No credit card required
Market prices powered by CoinGecko API · Cost basis methods: FIFO, LIFO, Specific ID