# Spraay Crypto Tax Calculator (FIFO)

> Spraay Crypto Tax Calculator (FIFO) is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-14).

Calculates cryptocurrency capital gains and losses from a list of transactions using the FIFO (first-in, first-out) cost basis method.

## Facts

- Endpoint: POST https://gateway.spraay.app/api/v1/tax/calculate
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spraay-crypto-tax-calculator-fifo-0223d64c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cmhgZ8W1X0m3QKoFZ14aA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability spraay-crypto-tax-calculator-fifo-0223d64c -d '<json body>'
```

Example prompt: Can you calculate my crypto capital gains and losses using FIFO? Here are my transactions: I bought 1 BTC at $20,000 in January, bought 0.5 BTC at $25,000 in March, and sold 1.2 BTC at $30,000 in November.

## When to prefer this

Choose this endpoint when you need automated, FIFO-based crypto capital gains computation directly from a transaction array, especially within a workflow that already uses the Spraay gateway for payroll, sanctions screening, or wallet intelligence. Best suited for agents handling tax season reporting, accountant data prep, or real-time gain/loss tracking without needing a full tax platform integration.

## Known failure modes

- Empty or malformed transactions array returns a validation error
- Missing required buy/sell fields (asset, amount, price, date) may cause incomplete calculations
- Transactions out of chronological order could produce inaccurate FIFO results
- Unsupported asset types or formats may be rejected
- Network or payment authorization failure returns a 402 or 5xx error

## How this service works

Calculate crypto tax gain/loss using FIFO method.

## Output

Returns calculated capital gains and losses for each taxable event in the transaction list, using FIFO cost basis methodology. Results typically include realized gain/loss amounts, cost basis per lot, proceeds, and aggregate totals across the provided transactions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "transactions": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spraay-crypto-tax-calculator-fifo-0223d64c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
