Pm Implied
by Perp Gap API in Markets & finance
Use when an agent must decide if a Hyperliquid prediction market on a crypto or stock price (e.g. 'BTC above 82k on Oct 19', 'SP500 above 7730') is cheap or expensive. Returns each live outcome's bid, ask and depth, the probability implied by the live perp price and 7d realized vol, edge in pp vs bid and ask, and a liquidity flag. Empty books are filtered. Errors: 400 bad input, 404 no live market (both free, never charged), 402, 502. Data, not advice.
https://perp-gap-api.perpgap.workers.dev/pm/implied- Price
- $0.02
- per call in USDC
- Uptime
- 91.3%
- last 30 days
- Response time
- 277 ms
- 418 ms slowest 5%
- Last check
- Failed
- 8 h ago, next in 15 h
Reliability
Latest check failed 8 h ago: Expected HTTP 402, got 404
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://perp-gap-api.perpgap.workers.dev/pm/implied
Each call costs $0.02 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.
GET https://perp-gap-api.perpgap.workers.dev/pm/implied?asset=BTCParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
asset | string | No | Underlying perp: BTC, ETH, HYPE, ZEC or trade.xyz perps like SP500, XYZ100, META, TSLA, CL, GOLD (xyz: prefix optional). Case-insensitive. Default BTC when neither asset nor outcome is given. |
min_depth_usd | string | No | Optional. Hide markets with less than this USDC resting within 5 pp of the touch on either side. Default 0 (empty books are always hidden). Default: "0". |
outcome | string | No | Optional Hyperliquid outcome id to price a single market (see free GET /pm/markets). |
Example response
The provider's example. We can't check it without paying.
Example response, 57 lines
{
"asset": "SP500",
"count": 1,
"disclaimer": "Data, not financial advice. Not an offer or solicitation; Hyperliquid outcome markets are not available to US or other excluded persons.",
"filtered_out_empty_or_thin": 0,
"generated_at_iso": "2026-10-17T13:11:38Z",
"label": "data, not advice",
"markets": [
{
"ask": 0.1656,
"ask_size": 470,
"asset": "SP500",
"best_edge_pp": -4.6,
"bid": 0.0676,
"bid_size": 531,
"book_age_s": 0,
"book_ts": "2026-10-17T13:11:38Z",
"depth_usd": {
"ask": 160.58,
"bid": 96.64,
"levels": 5,
"window_pp": 5
},
"edge_vs_ask_pp": -4.6,
"edge_vs_bid_pp": -5.2,
"expiry": "2026-10-19T20:00:00Z",
"hours_to_expiry": 54.81,
"kind": "stocks",
"liquid": true,
"mid": 0.1166,
"model_prob": 0.1196,
"outcome": 11676,
"perp": "xyz:SP500",
"question": "SP500 above 7730 at 2026-10-19 20:00:00 UTC",
"realized_vol_7d": 0.1073,
"settlement": {
"side": "Yes pays 1 USDC if the price is above the strike at expiry",
"source": "the Pyth US500 index price",
"window_seconds": 90
},
"signal": "fair",
"spot_mid": 7653.45,
"spread_pp": 9.8,
"strike": 7730
}
],
"method": "P(S_T > K) under a lognormal model with zero drift, S = live Hyperliquid perp mid, sigma = 7-day realized vol from Hyperliquid 1h candles (annualized x sqrt(8760)). No options data. Edges use executable bid/ask, never mid.",
"min_depth_usd": 0,
"source": "Hyperliquid info API (outcomeMeta, l2Book, allMids, candleSnapshot)",
"spot": {
"live": true,
"mid": 7653.45,
"perp": "xyz:SP500",
"realized_vol_7d": 0.1073,
"vol_as_of": "2026-10-17T13:10:10Z"
}
}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.02.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://perp-gap-api.perpgap.workers.dev/pm/implied?asset=BTC'
# 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 - 'https://perp-gap-api.perpgap.workers.dev/pm/implied?asset=BTC' \
| 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.02 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.02" });
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.02 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fperp-gap-api.perpgap.workers.dev%2Fpm%2Fimplied
const res = await pay("https://perp-gap-api.perpgap.workers.dev/pm/implied?asset=BTC");
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.02 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.02"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.get("https://perp-gap-api.perpgap.workers.dev/pm/implied?asset=BTC")
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 |
|---|---|---|---|---|
| 8 h ago | Expected HTTP 402, got 404 | 404 | 41 ms | - |
| 3 days ago | Expected HTTP 402, got 404 | 404 | 211 ms | - |
| 5 days ago | Expected HTTP 402, got 404 | 404 | 127 ms | - |
| 6 days ago | Expected HTTP 402, got 404 | 404 | 110 ms | - |
| 8 days ago | Expected HTTP 402, got 404 | 404 | 96 ms | - |
Show 10 older checks
| 8 days ago | Expected HTTP 402, got 404 | 404 | 108 ms | - |
| 9 days ago | Expected HTTP 402, got 404 | 404 | 105 ms | - |
| 9 days ago | Passed | 402 | 261 ms | $0.02 |
| 9 days ago | Passed | 402 | 319 ms | $0.02 |
| 10 days ago | Passed | 402 | 239 ms | $0.02 |
| 10 days ago | Passed | 402 | 108 ms | $0.02 |
| 11 days ago | Passed | 402 | 250 ms | $0.02 |
| 11 days ago | Passed | 402 | 305 ms | $0.02 |
| 12 days ago | Passed | 402 | 264 ms | $0.02 |
| 12 days ago | Passed | 402 | 442 ms | $0.02 |