{
  "x402Version": 2,
  "id": 31255,
  "slug": "31255",
  "resource": "https://mart402.com/v1/jp-crypto-tax",
  "description": "Japan crypto-asset tax: realized income under the NTA total-average or moving-average method (sell/spend/exchange as disposals, fees deductible, opening balances). Verified against the official NTA FAQ examples to the yen. Max 300 transactions per call. $0.05/call.",
  "type": "http",
  "serviceName": "Mart402",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xE3244a21D0d68bFa78b7CAd8C3b8777aDFbB3188",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "50000",
      "amountUsd": 0.05,
      "maxTimeoutSeconds": 120
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "transactions": [
              {
                "asset": "BTC",
                "qty": 4,
                "total_jpy": 4000000,
                "type": "buy"
              },
              {
                "asset": "BTC",
                "qty": 0.2,
                "total_jpy": 210000,
                "type": "sell"
              }
            ]
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "description": "JSON: per-asset cost of sales, year-end unit price and valuation, realized income (misc income), optional incremental-tax estimate",
          "example": {
            "as_of": "2026-08-21",
            "assumptions": [
              "国税庁の「暗号資産の計算書」様式は単価の1円未満を切り上げる運用が知られており、割り切れない単価では本エンジンの厳密計算と数円の差が生じうる(様式再現モードは将来課題)"
            ],
            "billable": true,
            "breakdown": [],
            "carried_forward": [],
            "disclaimer": "仮定条件に基づく概算試算。税務相談・手続代行・法律相談ではない。申告・届出への使用不可。確定額は官公署または税理士・社会保険労務士等に確認のこと。",
            "not_covered": [
              "DeFi(流動性提供・レンディング)・NFT",
              "ハードフォーク・エアドロップの取得価額",
              "マイニング・ステーキング・レンディング報酬の取得時所得",
              "事業所得該当性の判定(収入300万円超+帳簿保存)",
              "信用取引・証拠金取引の建玉管理",
              "国外取引所の年間取引報告書がない場合の残高照合",
              "法人税(法定評価方法が異なる)"
            ],
            "note": "SAMPLE RESPONSE generated by the exact deterministic engine that serves production (jp-statutory has no LLM: same input always produces this byte-identical result, carrying the same rules_version and cited primary sources). Served free at /samples/{product} so you can verify the response shape, the rules_version field and the source citations before paying. No payment was taken. The sample_input shown is the catalog example input that produced this output.",
            "ok": true,
            "result": {
              "income_classification": "雑所得(その他雑所得)が原則(FAQ 2-2)",
              "loss_note": null,
              "method": "total_average",
              "per_asset": [
                {
                  "asset": "BTC",
                  "cost_of_sales_jpy": 200000,
                  "fees_jpy": 0,
                  "method": "total_average",
                  "proceeds_jpy": 210000,
                  "quantity_disposed": 0.2,
                  "quantity_year_end": 3.8,
                  "realized_income_jpy": 10000,
                  "unit_price_year_end_jpy": 1000000,
                  "year_end_valuation_jpy": 3800000
                }
              ],
              "total_realized_income_jpy": 10000
            },
            "rules_version": "2026.08.18",
            "sample": true,
            "sample_input": {
              "transactions": [
                {
                  "asset": "BTC",
                  "qty": 4,
                  "total_jpy": 4000000,
                  "type": "buy"
                },
                {
                  "asset": "BTC",
                  "qty": 0.2,
                  "total_jpy": 210000,
                  "type": "sell"
                }
              ]
            },
            "sources": [
              "https://www.nta.go.jp/publication/pamph/pdf/0023012-176.pdf"
            ],
            "summary": "1資産・総平均法: 年間実現損益 10,000円(雑所得)",
            "tool": "jp-crypto-tax",
            "unverified_rules": []
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "transactions": {
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    },
    "offer-receipt": {
      "info": {
        "offers": [
          {
            "acceptIndex": 0,
            "format": "jws",
            "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDp3ZWI6bWFydDQwMi5jb20ja2V5LTEifQ.eyJhbW91bnQiOiI1MDAwMCIsImFzc2V0IjoiMHg4MzM1ODlmQ0Q2ZURiNkUwOGY0YzdDMzJENGY3MWI1NGJkQTAyOTEzIiwibmV0d29yayI6ImVpcDE1NTo4NDUzIiwicGF5VG8iOiIweEUzMjQ0YTIxRDBkNjhiRmE3OGI3Q0FkOEMzYjg3NzdhREZiQjMxODgiLCJyZXNvdXJjZVVybCI6Imh0dHBzOi8vbWFydDQwMi5jb20vdjEvanAtY3J5cHRvLXRheCIsInNjaGVtZSI6ImV4YWN0IiwidmFsaWRVbnRpbCI6MTc5MTQ0MDAwNiwidmVyc2lvbiI6MX0.yx5--0V_O6djtuiau-4mm4BpKab65R9U-rJNmMKei_UYfyy4hMWmpHx7AiU8I1gpMvCE0HQqbfX6NRYpon7wDg"
          }
        ]
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "offers": {
            "items": {
              "properties": {
                "acceptIndex": {
                  "type": "integer"
                },
                "format": {
                  "const": "jws",
                  "type": "string"
                },
                "signature": {
                  "description": "JWS compact serialization containing the offer payload",
                  "type": "string"
                }
              },
              "required": [
                "format",
                "signature"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "offers"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar",
    "offer-receipt"
  ],
  "sourceHost": "mart402.com",
  "lastUpdated": "2026-10-08T06:08:26.564Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-08T06:08:26.407Z"
  },
  "metadata": {
    "serviceName": "Mart402",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "transactions": [
                {
                  "asset": "BTC",
                  "qty": 4,
                  "total_jpy": 4000000,
                  "type": "buy"
                },
                {
                  "asset": "BTC",
                  "qty": 0.2,
                  "total_jpy": 210000,
                  "type": "sell"
                }
              ]
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "description": "JSON: per-asset cost of sales, year-end unit price and valuation, realized income (misc income), optional incremental-tax estimate",
            "example": {
              "as_of": "2026-08-21",
              "assumptions": [
                "国税庁の「暗号資産の計算書」様式は単価の1円未満を切り上げる運用が知られており、割り切れない単価では本エンジンの厳密計算と数円の差が生じうる(様式再現モードは将来課題)"
              ],
              "billable": true,
              "breakdown": [],
              "carried_forward": [],
              "disclaimer": "仮定条件に基づく概算試算。税務相談・手続代行・法律相談ではない。申告・届出への使用不可。確定額は官公署または税理士・社会保険労務士等に確認のこと。",
              "not_covered": [
                "DeFi(流動性提供・レンディング)・NFT",
                "ハードフォーク・エアドロップの取得価額",
                "マイニング・ステーキング・レンディング報酬の取得時所得",
                "事業所得該当性の判定(収入300万円超+帳簿保存)",
                "信用取引・証拠金取引の建玉管理",
                "国外取引所の年間取引報告書がない場合の残高照合",
                "法人税(法定評価方法が異なる)"
              ],
              "note": "SAMPLE RESPONSE generated by the exact deterministic engine that serves production (jp-statutory has no LLM: same input always produces this byte-identical result, carrying the same rules_version and cited primary sources). Served free at /samples/{product} so you can verify the response shape, the rules_version field and the source citations before paying. No payment was taken. The sample_input shown is the catalog example input that produced this output.",
              "ok": true,
              "result": {
                "income_classification": "雑所得(その他雑所得)が原則(FAQ 2-2)",
                "loss_note": null,
                "method": "total_average",
                "per_asset": [
                  {
                    "asset": "BTC",
                    "cost_of_sales_jpy": 200000,
                    "fees_jpy": 0,
                    "method": "total_average",
                    "proceeds_jpy": 210000,
                    "quantity_disposed": 0.2,
                    "quantity_year_end": 3.8,
                    "realized_income_jpy": 10000,
                    "unit_price_year_end_jpy": 1000000,
                    "year_end_valuation_jpy": 3800000
                  }
                ],
                "total_realized_income_jpy": 10000
              },
              "rules_version": "2026.08.18",
              "sample": true,
              "sample_input": {
                "transactions": [
                  {
                    "asset": "BTC",
                    "qty": 4,
                    "total_jpy": 4000000,
                    "type": "buy"
                  },
                  {
                    "asset": "BTC",
                    "qty": 0.2,
                    "total_jpy": 210000,
                    "type": "sell"
                  }
                ]
              },
              "sources": [
                "https://www.nta.go.jp/publication/pamph/pdf/0023012-176.pdf"
              ],
              "summary": "1資産・総平均法: 年間実現損益 10,000円(雑所得)",
              "tool": "jp-crypto-tax",
              "unverified_rules": []
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "properties": {
                    "transactions": {
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      },
      "offer-receipt": {
        "info": {
          "offers": [
            {
              "acceptIndex": 0,
              "format": "jws",
              "signature": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDp3ZWI6bWFydDQwMi5jb20ja2V5LTEifQ.eyJhbW91bnQiOiI1MDAwMCIsImFzc2V0IjoiMHg4MzM1ODlmQ0Q2ZURiNkUwOGY0YzdDMzJENGY3MWI1NGJkQTAyOTEzIiwibmV0d29yayI6ImVpcDE1NTo4NDUzIiwicGF5VG8iOiIweEUzMjQ0YTIxRDBkNjhiRmE3OGI3Q0FkOEMzYjg3NzdhREZiQjMxODgiLCJyZXNvdXJjZVVybCI6Imh0dHBzOi8vbWFydDQwMi5jb20vdjEvanAtY3J5cHRvLXRheCIsInNjaGVtZSI6ImV4YWN0IiwidmFsaWRVbnRpbCI6MTc5MTQ0MDAwNiwidmVyc2lvbiI6MX0.yx5--0V_O6djtuiau-4mm4BpKab65R9U-rJNmMKei_UYfyy4hMWmpHx7AiU8I1gpMvCE0HQqbfX6NRYpon7wDg"
            }
          ]
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "offers": {
              "items": {
                "properties": {
                  "acceptIndex": {
                    "type": "integer"
                  },
                  "format": {
                    "const": "jws",
                    "type": "string"
                  },
                  "signature": {
                    "description": "JWS compact serialization containing the offer payload",
                    "type": "string"
                  }
                },
                "required": [
                  "format",
                  "signature"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "offers"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "mart402.com",
    "manifest_name": "mart402.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}