{"openapi":"3.1.0","info":{"title":"Crypto Tax Calculator (MPP + x402): capital gains, cost basis, Form 8949, Canada ACB/Schedule 3 - from $0.01","version":"1.0.0","description":"Pay-per-report crypto tax engine for agents and holders who would rather pay in stablecoins than buy a $49-$199 yearly plan: realized gains with FIFO, LIFO, HIFO, average or Canadian ACB (superficial-loss rule), short/long term, staking and airdrop income, IRS Form 8949 rows with the 2025+ digital-asset boxes G-L and Schedule D line totals, Canada Schedule 3 at 50% inclusion, tax-loss harvesting candidates, and Coinbase / Koinly-universal / generic CSV import. Up to 5,000 transactions per call; nothing stored. Pay with MPP on Tempo (USDC.e/pathUSD) or x402 on Base (USDC). Bad input returns 402 with the row errors and is not charged. Information, not tax advice. Docs: https://mpp-cryptotax.fmf-x402.workers.dev/docs — copy-paste examples for the mppx CLI, curl, the TypeScript SDK (mppx) and the Python SDK (pympp), plus an MCP config. Machine-readable: https://mpp-cryptotax.fmf-x402.workers.dev/llms.txt and https://mpp-cryptotax.fmf-x402.workers.dev/openapi.json. MCP (Streamable HTTP): https://mpp-cryptotax.fmf-x402.workers.dev/mcp. Fleet of sister services: https://mpp-docs.fmf-x402.workers.dev, https://mpp-agent-data.fmf-x402.workers.dev, https://mpp-tools.fmf-x402.workers.dev, https://mpp-ai.fmf-x402.workers.dev, https://mpp-browser.fmf-x402.workers.dev, https://mpp-research.fmf-x402.workers.dev, https://mpp-chain.fmf-x402.workers.dev, https://mpp-stt.fmf-x402.workers.dev, https://mpp-compat.fmf-x402.workers.dev, https://mpp-domain.fmf-x402.workers.dev, https://mpp-utils.fmf-x402.workers.dev, https://mtg-sim.fmf-x402.workers.dev, https://controlplane-x402.fmf-x402.workers.dev, https://mpp-cryptotax.fmf-x402.workers.dev, https://mpp-biz.fmf-x402.workers.dev, https://pokemon-tcg-sim.fmf-x402.workers.dev, https://yugioh-sim.fmf-x402.workers.dev, https://lorcana-sim.fmf-x402.workers.dev, https://onepiece-sim.fmf-x402.workers.dev, https://hearthstone-sim.fmf-x402.workers.dev, https://chess-sim.fmf-x402.workers.dev, https://dota2-sim.fmf-x402.workers.dev, https://cs2-sim.fmf-x402.workers.dev. No upstream data sources: every number is computed in the Worker from the transactions you send (papaparse, MIT). Rules: IRS Form 8949 (2025) instructions, boxes G-L for digital assets; CRA superficial-loss rule (ITA s.54) and 50% capital-gains inclusion rate.","x-guidance":"POST JSON (or GET with query params) to any /mpp/* route and pay the 402 challenge with MPP on Tempo (USDC.e or pathUSD, WWW-Authenticate: Payment) or x402 v2 on Base (USDC, PAYMENT-REQUIRED / PAYMENT-SIGNATURE headers). Bad input or an upstream failure returns 402 with an error and you are not charged.","contact":{"name":"FMF Tools","url":"https://mpp-cryptotax.fmf-x402.workers.dev/docs","email":"fmf-tools@agentmail.to"},"x-docs":"https://mpp-cryptotax.fmf-x402.workers.dev/docs","x-mcp":"https://mpp-cryptotax.fmf-x402.workers.dev/mcp","x-llms":"https://mpp-cryptotax.fmf-x402.workers.dev/llms.txt","x-fmf-id":"cryptotax"},"servers":[{"url":"https://mpp-cryptotax.fmf-x402.workers.dev"}],"paths":{"/tax/gains":{"post":{"operationId":"_tax_gains","summary":"Crypto capital gains & cost basis (FIFO/LIFO/HIFO/ACB)","description":"Full crypto tax calculation from your transaction history (up to 5,000 rows, JSON or Coinbase/Koinly/generic CSV): realized gains per disposal with lot matching (FIFO, LIFO, HIFO, average or Canadian ACB with the superficial-loss rule), short vs long term (US), per-year totals by asset, staking/airdrop/reward income, remaining holdings and cost basis, unrealized P&L, and warnings for missing purchase history. Crypto-to-crypto trades, crypto fees and spending are taxable disposals. Information, not tax advice. Price $0.05 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","description":"Rows: {date, type: buy|sell|trade|income|spend|gift_in|gift_out|lost|transfer_in|transfer_out|fee, asset, amount, price or total (reporting currency), fee?, fee_asset?/fee_amount? (crypto fee), cost_basis? (transfer_in from outside), form_1099da?: basis_reported|basis_not_reported}. Trades: {sell_asset, sell_amount, buy_asset, buy_amount, value}.","items":{"type":"object"}},"csv":{"type":"string","description":"Alternative to transactions: CSV text. Auto-detects Coinbase transaction report, Koinly universal format (Sent/Received/Net Worth) or generic headers (date,type,asset,amount,price,total,fee)."},"method":{"type":"string","enum":["fifo","lifo","hifo","average","acb"],"description":"Lot method (default fifo; acb forced for country=ca)"},"country":{"type":"string","enum":["us","ca","other"],"description":"us: short/long-term split (held > 1 year); ca: pooled ACB, superficial-loss rule, 50% inclusion"},"currency":{"type":"string","description":"Reporting currency label (prices/totals must already be in it), default USD (CAD for ca)"},"year":{"type":"integer","description":"Tax year filter for disposals/reports"},"prices":{"type":"object","description":"Optional current unit prices {BTC: 90000} for unrealized P&L on remaining holdings"}}},"example":{"method":"fifo","country":"us","year":2025,"transactions":[{"date":"2024-01-05","type":"buy","asset":"BTC","amount":1,"price":40000,"fee":10},{"date":"2024-06-01","type":"buy","asset":"BTC","amount":1,"price":60000},{"date":"2025-03-01","type":"sell","asset":"BTC","amount":1.5,"price":80000,"fee":20},{"date":"2025-04-01","type":"income","asset":"ETH","amount":2,"price":2000},{"date":"2025-05-01","type":"trade","sell_asset":"ETH","sell_amount":1,"buy_asset":"USDC","buy_amount":2500,"value":2500}]}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.05"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/tax/form-8949":{"post":{"operationId":"_tax_form_8949","summary":"IRS Form 8949 + Schedule D lines for crypto (boxes G-L)","description":"US crypto tax report: Form 8949 rows (description, date acquired, date sold, proceeds, cost basis, gain/loss) split into Part I short-term and Part II long-term with the 2025+ digital-asset boxes G/H/I and J/K/L (set form_1099da per row; default I/L = no 1099-DA), plus per-box totals mapped to Schedule D lines 1b/2/3/8b/9/10. JSON or CSV. Uses your chosen lot method (FIFO default, HIFO, LIFO). Information, not tax advice. Price $0.1 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","description":"Rows: {date, type: buy|sell|trade|income|spend|gift_in|gift_out|lost|transfer_in|transfer_out|fee, asset, amount, price or total (reporting currency), fee?, fee_asset?/fee_amount? (crypto fee), cost_basis? (transfer_in from outside), form_1099da?: basis_reported|basis_not_reported}. Trades: {sell_asset, sell_amount, buy_asset, buy_amount, value}.","items":{"type":"object"}},"csv":{"type":"string","description":"Alternative to transactions: CSV text. Auto-detects Coinbase transaction report, Koinly universal format (Sent/Received/Net Worth) or generic headers (date,type,asset,amount,price,total,fee)."},"method":{"type":"string","enum":["fifo","lifo","hifo","average","acb"],"description":"Lot method (default fifo; acb forced for country=ca)"},"country":{"type":"string","enum":["us","ca","other"],"description":"us: short/long-term split (held > 1 year); ca: pooled ACB, superficial-loss rule, 50% inclusion"},"currency":{"type":"string","description":"Reporting currency label (prices/totals must already be in it), default USD (CAD for ca)"},"year":{"type":"integer","description":"Tax year filter for disposals/reports"},"format":{"type":"string","enum":["json","csv"],"description":"csv returns text/csv of the 8949 rows"}}},"example":{"method":"fifo","country":"us","year":2025,"transactions":[{"date":"2024-01-05","type":"buy","asset":"BTC","amount":1,"price":40000,"fee":10},{"date":"2024-06-01","type":"buy","asset":"BTC","amount":1,"price":60000},{"date":"2025-03-01","type":"sell","asset":"BTC","amount":1.5,"price":80000,"fee":20},{"date":"2025-04-01","type":"income","asset":"ETH","amount":2,"price":2000},{"date":"2025-05-01","type":"trade","sell_asset":"ETH","sell_amount":1,"buy_asset":"USDC","buy_amount":2500,"value":2500}]}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.1"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/tax/schedule-3":{"post":{"operationId":"_tax_schedule_3","summary":"Canada crypto capital gains: ACB + Schedule 3 (superficial-loss aware)","description":"Canadian crypto report: adjusted cost base (ACB) pooled per coin, proceeds of disposition, gain/loss per disposition, superficial-loss denial (30-day rule) added back to ACB, Schedule 3 totals and taxable capital gain at the 50% inclusion rate, business-vs-capital not decided for you. Values must be in CAD. JSON or CSV. Information, not tax advice. Price $0.1 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","description":"Rows: {date, type: buy|sell|trade|income|spend|gift_in|gift_out|lost|transfer_in|transfer_out|fee, asset, amount, price or total (reporting currency), fee?, fee_asset?/fee_amount? (crypto fee), cost_basis? (transfer_in from outside), form_1099da?: basis_reported|basis_not_reported}. Trades: {sell_asset, sell_amount, buy_asset, buy_amount, value}.","items":{"type":"object"}},"csv":{"type":"string","description":"Alternative to transactions: CSV text. Auto-detects Coinbase transaction report, Koinly universal format (Sent/Received/Net Worth) or generic headers (date,type,asset,amount,price,total,fee)."},"method":{"type":"string","enum":["fifo","lifo","hifo","average","acb"],"description":"Lot method (default fifo; acb forced for country=ca)"},"country":{"type":"string","enum":["us","ca","other"],"description":"us: short/long-term split (held > 1 year); ca: pooled ACB, superficial-loss rule, 50% inclusion"},"currency":{"type":"string","description":"Reporting currency label (prices/totals must already be in it), default USD (CAD for ca)"},"year":{"type":"integer","description":"Tax year filter for disposals/reports"},"format":{"type":"string","enum":["json","csv"]}}},"example":{"method":"acb","country":"ca","year":2025,"transactions":[{"date":"2024-01-05","type":"buy","asset":"BTC","amount":1,"price":40000,"fee":10},{"date":"2024-06-01","type":"buy","asset":"BTC","amount":1,"price":60000},{"date":"2025-03-01","type":"sell","asset":"BTC","amount":1.5,"price":80000,"fee":20},{"date":"2025-04-01","type":"income","asset":"ETH","amount":2,"price":2000},{"date":"2025-05-01","type":"trade","sell_asset":"ETH","sell_amount":1,"buy_asset":"USDC","buy_amount":2500,"value":2500}],"currency":"CAD"}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.1"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/tax/harvest":{"post":{"operationId":"_tax_harvest","summary":"Crypto tax-loss harvesting candidates","description":"From your history and current prices, list the lots (or ACB pools) sitting at an unrealized loss, largest first, with short/long term if sold today, plus total harvestable loss and the rules to watch (Canada superficial loss; US wash-sale check). Information, not tax advice. Price $0.05 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","description":"Rows: {date, type: buy|sell|trade|income|spend|gift_in|gift_out|lost|transfer_in|transfer_out|fee, asset, amount, price or total (reporting currency), fee?, fee_asset?/fee_amount? (crypto fee), cost_basis? (transfer_in from outside), form_1099da?: basis_reported|basis_not_reported}. Trades: {sell_asset, sell_amount, buy_asset, buy_amount, value}.","items":{"type":"object"}},"csv":{"type":"string","description":"Alternative to transactions: CSV text. Auto-detects Coinbase transaction report, Koinly universal format (Sent/Received/Net Worth) or generic headers (date,type,asset,amount,price,total,fee)."},"method":{"type":"string","enum":["fifo","lifo","hifo","average","acb"],"description":"Lot method (default fifo; acb forced for country=ca)"},"country":{"type":"string","enum":["us","ca","other"],"description":"us: short/long-term split (held > 1 year); ca: pooled ACB, superficial-loss rule, 50% inclusion"},"currency":{"type":"string","description":"Reporting currency label (prices/totals must already be in it), default USD (CAD for ca)"},"year":{"type":"integer","description":"Tax year filter for disposals/reports"},"prices":{"type":"object","description":"Required: current unit prices {BTC: 60000, ETH: 1800}"}},"required":["prices"]},"example":{"method":"fifo","country":"us","year":2025,"transactions":[{"date":"2024-01-05","type":"buy","asset":"BTC","amount":1,"price":40000,"fee":10},{"date":"2024-06-01","type":"buy","asset":"BTC","amount":1,"price":60000},{"date":"2025-03-01","type":"sell","asset":"BTC","amount":1.5,"price":80000,"fee":20},{"date":"2025-04-01","type":"income","asset":"ETH","amount":2,"price":2000},{"date":"2025-05-01","type":"trade","sell_asset":"ETH","sell_amount":1,"buy_asset":"USDC","buy_amount":2500,"value":2500}],"prices":{"BTC":70000,"ETH":1500,"USDC":1}}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.05"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}},"/tax/import":{"post":{"operationId":"_tax_import","summary":"Normalize exchange CSV (Coinbase, Koinly universal, generic) to transactions JSON","description":"Parse a Coinbase transaction report, a Koinly universal-format CSV or a generic CSV into clean, dated, typed transaction JSON (buy/sell/trade/income/transfer, fees split out) that the other /tax routes accept. Catches bad dates, unknown types and missing valuations before you pay for a report. Price $0.01 per call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","description":"Alternative to transactions: CSV text. Auto-detects Coinbase transaction report, Koinly universal format (Sent/Received/Net Worth) or generic headers (date,type,asset,amount,price,total,fee)."}},"required":["csv"]},"example":{"csv":"date,type,asset,amount,price,fee\n2025-01-02,buy,BTC,0.1,90000,5\n2025-03-01,sell,BTC,0.05,95000,3\n"}}}},"x-payment-info":{"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20C000000000000000000000b9537d11c60E8b50"}},{"x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Payment required (MPP, Tempo USDC.e or pathUSD); also returned with an error message, not charged, for invalid input"}}}}},"externalDocs":{"description":"Copy-paste examples (CLI, curl, TypeScript, Python, MCP)","url":"https://mpp-cryptotax.fmf-x402.workers.dev/docs"},"components":{"securitySchemes":{"Payment":{"type":"http","scheme":"Payment","description":"MPP Payment credential on Tempo (USDC.e or pathUSD). Clients such as mppx handle the 402 challenge automatically. See https://mpp.dev/sdk"}}},"tags":[{"name":"paid","description":"Pay-per-call MPP routes. Unpaid requests receive 402. Invalid input is not charged."},{"name":"discovery","description":"Free discovery surfaces: /docs, /llms.txt, /openapi.json, /mcp, /health."}]}