Preview. Choose a result. Pay per call.
Start with real data and archive coverage for free. Call a paid endpoint using an x402-capable client only when your workflow needs its result.
1. Inspect without a wallet
curl 'https://k-data-x402-production.theblack1022.workers.dev/api/preview/kimchi-premium' curl 'https://k-data-x402-production.theblack1022.workers.dev/api/preview/premium-coverage'
For a hosted MCP client, connect to https://k-data-x402-production.theblack1022.workers.dev/mcp. The tools preview_kimchi_premium and preview_premium_coverage are free. Paid tools require an x402-capable MCP client.
2. Choose a repeatable job
| Job | Request | Example cost at current prices |
|---|---|---|
| Hourly multi-coin monitor | /api/kimchi-premium?symbols=BTC,ETH,XRP,SOL,DOGE | $0.03 per call; $21.60 for 720 calls in a 30-day month |
| Daily BTC context | /api/kimchi-premium/stats?symbol=BTC&window=7d&basis=usdt | $0.12 per call; $3.60 for 30 calls |
| Research / backtest download | /api/kimchi-premium/history?symbol=BTC&window=7d&points=2000 | $0.08 per page, up to 2,000 observations |
These are cost examples, not subscriptions or automatic schedules. Choose your own frequency and budget. Check as_of, latest_recorded, and stale before relying on archived data.
3. Use an x402 client
A plain HTTP request to a paid endpoint returns 402 and a PAYMENT-REQUIRED header containing the amount, network and recipient. An x402 client signs the payment and retries to receive JSON.
Official x402 buyer setup · Request schemas · Current prices
Download the complete Node.js example. It previews data by default. Install the dependencies and run it:
curl -o premium-workflow.mjs 'https://k-data-x402-production.theblack1022.workers.dev/premium-workflow.mjs' npm install @x402/fetch @x402/evm viem node premium-workflow.mjs
For one paid comparison, set K_DATA_PRIVATE_KEY locally to a funded wallet and K_DATA_MAX_SPEND_USD to 0.03, then run node premium-workflow.mjs --paid. Add --stats for one statistics request with a budget of 0.12. The example checks the actual recipient, token, network and amount before signing. It never schedules additional calls.
Read a full history window
Responses are ordered oldest to newest within each page. If next_before is non-null, pass it as before in the next request. Each page is charged separately. Check has_more and your budget before continuing; do not assume a 90-day request fits in one page.
Keep monitoring useful
Do not poll historical percentiles every second. Match the cadence to the job, record the latest observation time, and act only on fresh data. Compare multiple symbols in one request rather than paying for individual quotes unnecessarily.