81trust / 100
Analytics Percentile
by Market Intelligence API in Markets & finance
x402 APIPassing, checked 41 min ago
Use to rank a value against a dataset ($0.01), e.g. today's volume versus the last 90 days: send value and values; get its 0-100 percentile rank with counts below, equal and above. Methods LINEAR (default, interpolated), MIDRANK and AT_OR_BELOW. Deterministic, no data fetched.
POST https://api.marketintelligenceapi.com/api/v1/analytics/percentile
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 55 ms typical, 55 ms slowest 5%
- Last check
- 41 min ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.marketintelligenceapi.com/api/v1/analytics/percentile" \
-H "content-type: application/json" \
-d '{"method":"LINEAR","value":95,"values":[10,20,30,40,50,60,70,80,90,100]}'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%2Fapi.marketintelligenceapi.com%2Fapi%2Fv1%2Fanalytics%2Fpercentile
const res = await pay("https://api.marketintelligenceapi.com/api/v1/analytics/percentile", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"method":"LINEAR","value":95,"values":[10,20,30,40,50,60,70,80,90,100]}),
});
console.log(await res.json());Example input
{
"method": "LINEAR",
"value": 95,
"values": [
10,
20,
30,
40,
50,
60,
70,
80,
90,
100
]
}Example output
{
"countAbove": 1,
"countBelow": 9,
"countEqual": 0,
"max": 100,
"method": "LINEAR",
"min": 10,
"observations": 10,
"operation": "percentile",
"percentile": 94.444444,
"result": 94.444444,
"value": 95
}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 |
|---|---|---|---|---|
| 41 min ago | Passed | 402 | 55 ms | $0.01 |
| 6 h ago | Passed | 402 | 60 ms | $0.01 |