82trust / 100
Perp Klines
by Perp candles (OHLCV) in Onchain & crypto
x402 APIPassing, checked 3 h ago
OHLCV candles for one perpetual at any interval from 1 minute to 1 month, up to the venue's history, with a window summary of open, close, change, high, low and volume. Use it when an agent needs price history for a chart, a backtest or an indicator without an exchange account or API key.
POST https://agent402.tools/api/perp-klines
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 184 ms typical, 184 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/perp-klines" \
-H "content-type: application/json" \
-d '{"coin":"ETH","interval":"1h","limit":24}'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%2Fagent402.tools%2Fapi%2Fperp-klines
const res = await pay("https://agent402.tools/api/perp-klines", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"coin":"ETH","interval":"1h","limit":24}),
});
console.log(await res.json());Example input
{
"coin": "ETH",
"interval": "1h",
"limit": 24
}Example output
{
"candles": [
{
"c": 2429.3,
"h": 2431,
"l": 2415.5,
"o": 2420.1,
"t": "2026-08-22T11:00:00.000Z",
"trades": 8800,
"v": 1234.5
}
],
"coin": "ETH",
"count": 24,
"fetchedAt": "2026-08-22T12:00:00.000Z",
"interval": "1h",
"source": "hyperliquid",
"summary": {
"changePct": 2.06,
"close": 2429.3,
"high": 2440,
"low": 2370.1,
"open": 2380.3,
"volume": 30000.2
}
}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 |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 184 ms | $0.001 |
| 8 h ago | Passed | 402 | 199 ms | $0.001 |