ToolAssay

Capital gain from a crypto sale by lot using FIFO, LIFO or HIFO, with cost basis

Capital gain from a crypto sale by lot using FIFO, LIFO or HIFO, with cost basis, proceeds and the short-term and long-term split per lot.

Answeringour last check, 2026-10-20
1 of 1checks answered this week
284 msmedian answer time
$0.01listed price per call
$0.01price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

GET https://saylorinnovations.com/api/tax/crypto-gains

CategoryMarket data
Provider hostsaylorinnovations.com
Networkseip155:137, eip155:42161, eip155:8453, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
Payment schemesexact
Self-reported calls, 30 days0 from 0 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-10-20 valid payment request 402$0.01 284 ms

Example input (from the provider)

{
  "method": "GET",
  "queryParams": {
    "lots": "[{\"date\":\"2024-01-10\",\"qty\":1,\"price\":42000},{\"date\":\"2025-03-05\",\"qty\":1,\"price\":85000}]",
    "method": "hifo",
    "sell_date": "2025-10-17",
    "sell_price": "95000",
    "sell_qty": "1.5"
  },
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "lots": {
              "description": "JSON array of purchases: [{\"date\":\"YYYY-MM-DD\",\"qty\":1,\"price\":40000,\"fee\":0}]",
              "type": "string"
            },
            "method": {
              "description": "optional fifo, lifo or hifo, default fifo",
              "type": "string"
            },
            "sell_date": {
              "description": "sale date YYYY-MM-DD",
              "type": "string"
            },
            "sell_price": {
              "description": "sale price per unit",
              "type": "string"
            },
            "sell_qty": {
              "description": "quantity sold",
              "type": "string"
            }
          },
          "required": [
            "lots",
            "sell_qty",
            "sell_price",
            "sell_date"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "average_cost_per_unit": {
              "description": "Cost basis divided by quantity sold",
              "type": "number"
            },
            "cost_basis": {
              "description": "Cost of the matched lots including fees",
              "type": "number"
            },
            "long_term_gain": {
              "description": "Gain on lots held longer than the threshold",
              "type": "number"
            },
            "long_term_threshold_days": {
              "description": "Days after which a gain counts as long-term",
              "type": "number"
            },
            "lots_used": {
              "description": "The purchase lots matched to the sale",
              "items": {
                "properties": {
                  "bought": {
                    "description": "Purchase date",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cost_basis": {
                    "description": "Cost of that quantity including fees",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "gain": {
                    "description": "Gain or loss on it",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "holding_days": {
                    "description": "Days held",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "lot": {
                    "description": "Position of the lot in the supplied list",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "proceeds": {
                    "description": "Sale proceeds attributed to it",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "quantity": {
                    "description": "Quantity taken from the lot",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "term": {
                    "description": "short or long",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "method": {
              "description": "Lot matching method used",
              "type": "string"
            },
            "note": {
              "description": "Plain-language caveat about how to read and use the result",
              "type": "string"
            },
            "proceeds": {
              "description": "Sale proceeds after the selling fee",
              "type": "number"
            },
            "sell_date": {
              "description": "Sale date",
              "type": "string"
            },
            "sell_price": {
              "description": "Sale price per unit",
              "type": "number"
            },
            "sell_quantity": {
              "description": "Quantity sold",
              "type": "number"
            },
            "short_term_gain": {
              "description": "Gain on lots held no longer than the threshold",
              "type": "number"
            },
            "source": {
              "description": "Where the data or formula comes from",
              "type": "string"
            },
            "total_gain": {
              "description": "Proceeds minus cost basis",
              "type": "number"
            }
          },
          "required": [
            "total_gain",
            "lots_used"
          ],
          "type": "object"
        },
        "type": {
          "const": "json",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

This page as JSON