81trust / 100
Finance Roi Calculator
by AgentTools in Markets & finance
x402 APIPassing, checked 43 min ago
Calculate return on investment: profit (or loss) and the percentage return relative to the initial amount invested. Use this when an agent needs to return on investment as a percentage.
GET https://agenttools-hub.vercel.app/api/v1/finance/roi-calculator
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 150 ms typical, 150 ms slowest 5%
- Last check
- 43 min ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://agenttools-hub.vercel.app/api/v1/finance/roi-calculator?final=12500&initial=10000"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagenttools-hub.vercel.app%2Fapi%2Fv1%2Ffinance%2Froi-calculator
const res = await pay("https://agenttools-hub.vercel.app/api/v1/finance/roi-calculator?final=12500&initial=10000");
console.log(await res.json());Example input
{
"final": 12500,
"initial": 10000
}Example output
{
"result": {
"answer": "25%",
"answerLabel": "Return on investment (gain)",
"details": [
{
"label": "Profit / loss",
"value": "2,500"
},
{
"label": "Invested",
"value": "10,000"
},
{
"label": "Final value",
"value": "12,500"
}
],
"steps": [
"Profit = 12,500 − 10,000 = 2,500",
"ROI = 2,500 ÷ 10,000 × 100 = 25%"
],
"value": 25
},
"tool": "roi-calculator"
}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 |
|---|---|---|---|---|
| 43 min ago | Passed | 402 | 154 ms | $0.002 |
| 6 h ago | Passed | 402 | 150 ms | $0.002 |