Jp Crypto Tax
by Mart402 in Onchain & crypto
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.
https://mart402.com/v1/jp-crypto-tax- Price
- $0.05
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 408 ms
- 562 ms slowest 5%
- Last check
- Passed
- 1 h ago, next any minute now
Reliability
How to call it
POST https://mart402.com/v1/jp-crypto-tax
Each call costs $0.05 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://mart402.com/v1/jp-crypto-tax
content-type: application/json
{
"transactions": [
{
"asset": "BTC",
"qty": 4,
"total_jpy": 4000000,
"type": "buy"
},
{
"asset": "BTC",
"qty": 0.2,
"total_jpy": 210000,
"type": "sell"
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transactions | array | No |
Example response
The provider's example. We can't check it without paying.
Example response, 65 lines
{
"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": []
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.05.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://mart402.com/v1/jp-crypto-tax' \
-H 'content-type: application/json' \
--data-raw '{"transactions":[{"asset":"BTC","qty":4,"total_jpy":4000000,"type":"buy"},{"asset":"BTC","qty":0.2,"total_jpy":210000,"type":"sell"}]}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://mart402.com/v1/jp-crypto-tax' \
-H 'content-type: application/json' \
--data-raw '{"transactions":[{"asset":"BTC","qty":4,"total_jpy":4000000,"type":"buy"},{"asset":"BTC","qty":0.2,"total_jpy":210000,"type":"sell"}]}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.05 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.05" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.05 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fmart402.com%2Fv1%2Fjp-crypto-tax&method=POST
const res = await pay("https://mart402.com/v1/jp-crypto-tax", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"transactions": [
{
"asset": "BTC",
"qty": 4,
"total_jpy": 4000000,
"type": "buy"
},
{
"asset": "BTC",
"qty": 0.2,
"total_jpy": 210000,
"type": "sell"
}
]
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.05 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.05"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://mart402.com/v1/jp-crypto-tax",
json={
"transactions": [
{
"asset": "BTC",
"qty": 4,
"total_jpy": 4000000,
"type": "buy",
},
{
"asset": "BTC",
"qty": 0.2,
"total_jpy": 210000,
"type": "sell",
},
],
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 431 ms | $0.05 |
| 6 h ago | Passed | 402 | 408 ms | $0.05 |
| 10 h ago | Passed | 402 | 413 ms | $0.05 |
| 14 h ago | Passed | 402 | 427 ms | $0.05 |
| 18 h ago | Passed | 402 | 487 ms | $0.05 |
Show 10 older checks
| 22 h ago | Passed | 402 | 282 ms | $0.05 |
| 26 h ago | Passed | 402 | 139 ms | $0.05 |
| 31 h ago | Passed | 402 | 306 ms | $0.05 |
| 34 h ago | Passed | 402 | 408 ms | $0.05 |
| 38 h ago | Passed | 402 | 386 ms | $0.05 |
| 42 h ago | Passed | 402 | 143 ms | $0.05 |
| 46 h ago | Passed | 402 | 484 ms | $0.05 |
| 2 days ago | Passed | 402 | 149 ms | $0.05 |
| 2 days ago | Passed | 402 | 413 ms | $0.05 |
| 2 days ago | Passed | 402 | 471 ms | $0.05 |