Skip to content
Fourohtwo

TaxRail 1-Step Tax Optimization

api.taxrail.online/api/v1/x402/optimize

TaxRail 1-Step Tax Optimization: Autonomous US (IRS 1099-DA, Form 8949, HIFO/SpecID, tax-loss harvesting) & Brazil (Lei 14.754, R$35k rule, Lucro Real) crypto tax calculation, wallet auto-scan, 0x/CoW/Jupiter swap calldata, and 20% affiliate revshare.

BaseAnswering
POSThttps://api.taxrail.online/api/v1/x402/optimize

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.taxrail.online/api/v1/x402/optimize", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"lots":[{"asset":"ETH","lotId":"example-lot-1","quantity":1,"acquiredAt":"2024-06-01T00:00:00Z","costBasisUsd":1800,"custodyLocation":"SELF_CUSTODY"}],"chain":"base","regime":"INDIVIDUAL","targetAsset":"ETH","jurisdiction":"US","sellQuantity":1,"currentPriceUsd":3000}),
});
console.log(await res.json());

Example input

{
  "lots": [
    {
      "asset": "ETH",
      "lotId": "example-lot-1",
      "quantity": 1,
      "acquiredAt": "2024-06-01T00:00:00Z",
      "costBasisUsd": 1800,
      "custodyLocation": "SELF_CUSTODY"
    }
  ],
  "chain": "base",
  "regime": "INDIVIDUAL",
  "targetAsset": "ETH",
  "jurisdiction": "US",
  "sellQuantity": 1,
  "currentPriceUsd": 3000
}