polymarket
x402-polyperp-candles
$0.15 per call
OHLCV candles for one Polymarket Perps market, with trend statistics computed for you — first open, last close, percent change, high, low, average volume, total trades and direction. Intervals: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. Use it for momentum, breakout and mean-reversion checks. Note these markets trade 24/7, so a daily candle covers the whole day for equities and commodities too — including the hours when the underlying cash market is shut.
0 paid calls · 0 trials
🔑 Path A — @x402/fetch (recommended)
npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(process.env.PRIVATE_KEY)) }],
});
const res = await fetchWithPayment("https://minia2a.uk/x402/x402-polyperp-candles");
console.log(await res.json());
One npm install → automatic 402 → pay USDC on Base
💳 Path B — Raw txHash
curl -X POST https://minia2a.uk/x402/x402-polyperp-candles \
-H "Content-Type: application/json" \
-H "X-Payment-Tx: 0x<your usdc transfer tx hash>" \
-H "X-Payer-Signature: 0x<personal_sign of 'minia2a payment: <lowercase tx hash>'>" \
-d '{...}'
Send USDC to 0xAb62...7Bf on Base → POST txHash + signature
Endpoint: https://minia2a.uk/x402/polyperp-candles