82trust / 100
Perp Basis
by Perp premium and predicted in Onchain & crypto
x402 APIPassing, checked 56 min ago
Basis for one perpetual: mark versus oracle premium in percent and basis points, impact premium, current funding and the predicted next funding per venue. Use it when an agent is evaluating a cash-and-carry, comparing funding across venues or deciding whether a perp is trading rich or cheap to spot.
POST https://agent402.tools/api/perp-basis
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 192 ms typical, 329 ms slowest 5%
- Last check
- 56 min 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-basis" \
-H "content-type: application/json" \
-d '{"coin":"BTC"}'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-basis
const res = await pay("https://agent402.tools/api/perp-basis", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"coin":"BTC"}),
});
console.log(await res.json());Example input
{
"coin": "BTC"
}Example output
{
"coin": "BTC",
"fetchedAt": "2026-08-22T12:00:00.000Z",
"funding": {
"aprPct": 10.95,
"hourly": 0.0000125,
"per8h": 0.0001
},
"impactPremiumPct": 0.0388,
"markOraclePremiumBps": 4.01,
"markOraclePremiumPct": 0.0401,
"markPx": 77267,
"midPx": 77266.5,
"oraclePx": 77236,
"predictedFunding": [
{
"aprPct": 10.95,
"fundingIntervalHours": 1,
"fundingRate": 0.0000125,
"nextFundingTime": "2026-08-22T13:00:00.000Z",
"per8h": 0.0001,
"venue": "HlPerp"
}
],
"source": "hyperliquid"
}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 |
|---|---|---|---|---|
| 56 min ago | Passed | 402 | 184 ms | $0.002 |
| 4 h ago | Passed | 402 | 188 ms | $0.002 |
| 8 h ago | Passed | 402 | 185 ms | $0.002 |
| 11 h ago | Passed | 402 | 198 ms | $0.002 |
| 15 h ago | Passed | 402 | 206 ms | $0.002 |
| 19 h ago | Passed | 402 | 197 ms | $0.002 |
| 23 h ago | Passed | 402 | 194 ms | $0.002 |
| 26 h ago | Passed | 402 | 329 ms | $0.002 |
| 30 h ago | Passed | 402 | 187 ms | $0.002 |
| 33 h ago | Passed | 402 | 178 ms | $0.002 |
| 37 h ago | Passed | 402 | 192 ms | $0.002 |
| 42 h ago | Passed | 402 | 474 ms | $0.002 |