← Back to TaxRail · Brazil Lei 14.754 Guide →
US IRS 1099-DA · BASE · x402 v2Why Autonomous Trading Agents on Base Should Simulate Taxes Before Every Swap
Under 2025–2026 IRS wallet-by-wallet reporting rules (Form 1099-DA & Form 8949), brokers and custodians default to FIFO (First-In, First-Out) unless a trader or software agent explicitly records Specific Identification (SpecID) / HIFO lot selection before settlement. For an autonomous DeFi or treasury agent holding early low-basis ETH alongside recent higher-basis lots, naive FIFO routinely triggers 15%–37% unnecessary tax leakage.
$0-Upfront 1-Click Execution + 3-Step Pre-Trade Tax Guardrail
- Free Simulation Preview: Call
POST https://api.taxrail.online/api/v1/check-tax-impact(or MCP toolcheck_tax_impact) to get deterministicbaselineTaxUsd,optimizedTaxUsd,taxSavedUsd, and an unlockableplanId. - 1-Click $0-Upfront Execution (Pay 10% From Operation): Call
POST https://api.taxrail.online/api/v1/prepare-execution($0upfront) to get ready-to-sign0x v2swap calldata (including TLH rotations likeETH → wstETH) orAave v3atomic borrow batch with TaxRail's exact 10% verified-savings fee embedded inside the operation. Broadcast the tx, then callPOST https://api.taxrail.online/api/v1/claim-dossierwith thetxHashto unlock SpecID lots & IRS Form 8949 CSVs. - $0.01 Guardrails & TLH Scans: Call
GET /api/v1/x402/pre-trade-checkorGET /api/v1/x402/tlh-scan?walletAddress=0x...&chain=base&asset=ALLbefore December 31 to harvest unrealized losses across up to 25 tokens in one call.
Python Integration (pip install taxrail)
from taxrail import TaxRailClient
client = TaxRailClient(referrer_wallet="0xYourAgentWallet")
preview = client.check_tax_impact(
jurisdiction="US",
chain="base",
target_asset="ETH",
sell_quantity=1.0,
wallet_address="0x849151d7D0bF1F34b70d5caD5149D28CC2308bf1",
)
print("Tax saved (USD):", preview["taxSavedUsd"], "| Plan ID:", preview["planId"])
Machine-Readable Discovery Endpoints
- MCP Streamable HTTP:
https://api.taxrail.online/mcp(npx -y taxrail-mcp) - Skill Definition: https://api.taxrail.online/SKILL.md
- x402 Discovery Manifest: https://api.taxrail.online/.well-known/x402
- OpenAPI 3.1 Spec: https://api.taxrail.online/openapi.json