Capital Gains
Log a capital-gains trade
Records a buy/sell with FIFO/LIFO/Specific-ID cost basis. Wash-sale detection runs automatically (api/_lib/wash-sale.js). Also discoverable via x402 (POST without auth + X-PAYMENT header returns a preview without writing).
post/api/v1/trades
Request
- Base URL: https://www.agenttax.io
- URL: https://www.agenttax.io/api/v1/trades
- Auth: one of:
- HTTP bearer
- API key in header X-PAYMENT
Request body
Response
Trade logged with realized gain/loss if SELL.
Changes
No recorded changes to this operation across all 1 revision of this API.