Kronos integration
Build with Kronos
Use the free API to evaluate Kronos first, then let an agent pay per request with x402. Kronos never creates, funds, recovers or stores a buyer wallet โ bring your own.
Start free
Discover products and test delayed BTC output without an account, API key or wallet.
Try it now
Read the OpenAPI specification, agent registry and agent quickstart for the complete reference.
How x402 works
- Your agent requests a paid endpoint.
- Kronos returns HTTP 402 with a signed payment requirement: price, USDC asset, destination and network.
- The buyer-controlled wallet signs an authorization.
- The client retries with the payment payload and receives the result.
No Kronos account or prepaid Kronos balance is required. The buyer wallet still needs enough USDC for the requested data. Depending on the accepted payment scheme, the facilitator can cover network gas; this does not cover the data price.
Node / TypeScript SDK pattern
Use a buyer wallet that you control. The private key remains in your local runtime and must never be committed, logged or pasted into chat.
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.BUYER_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: 'eip155:84532', client: new ExactEvmScheme(account) }],
});
const response = await fetchWithPayment(
'https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt?timeframes=1h'
);
const forecast = await response.json();
Use the exact network and asset advertised in the live 402 challenge. Never hardcode chain IDs or contract addresses โ always read them from the payment requirement returned by Kronos.
Python
Use the official x402 Python SDK for automatic 402 handling, or handle the challenge manually with requests / httpx.
With x402 Python SDK (automatic)
# pip install x402-requests
from x402.requests import wrap_requests_with_payment
import os
# Buyer wallet private key โ keep secret, never commit
session = wrap_requests_with_payment(os.environ["BUYER_PRIVATE_KEY"])
response = session.get(
"https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt",
params={"timeframes": "1h"}
)
forecast = response.json()
print(forecast["consensus"]["direction"]) # "LONG" or "SHORT"
Manual 402 handling with requests
import requests
url = "https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt"
params = {"timeframes": "1h"}
# Step 1: request the endpoint โ get 402 challenge
resp = requests.get(url, params=params)
if resp.status_code == 402:
challenge = resp.json()
# challenge contains: price, accepts (asset, network, scheme),
# payTo (destination address), x402-version, etc.
print(f"Payment required: {challenge['price']}")
# Step 2: sign payment with your wallet (EVM or Solana)
# Use web3.py (EVM) or solana.py (Solana) to sign
payment_header = sign_payment(challenge) # your signing logic
# Step 3: retry with X-PAYMENT header
resp = requests.get(url, params=params, headers={
"X-PAYMENT": payment_header,
"X-REQUEST-ID": resp.headers.get("X-REQUEST-ID", "")
})
if resp.status_code == 200:
forecast = resp.json()
print(forecast["consensus"]["direction"])
curl โ paid endpoint end-to-end
Full flow: initial request โ 402 challenge โ sign payment โ retry with payment header.
# 1. Request the endpoint โ receive 402 challenge
curl -s https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt?timeframes=1h \
-D headers.txt -o challenge.json
# headers.txt contains X-REQUEST-ID, challenge.json has payment requirements
# 2. Sign payment (use x402 CLI, your wallet, or SDK)
# This produces a base64-encoded payment header
PAYMENT=$(x402 sign --challenge challenge.json --key $BUYER_PRIVATE_KEY)
REQUEST_ID=$(grep -i X-REQUEST-ID headers.txt | awk '{print $2}' | tr -d '\r')
# 3. Retry with payment header
curl -s https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt?timeframes=1h \
-H "X-PAYMENT: $PAYMENT" \
-H "X-REQUEST-ID: $REQUEST_ID" \
-H "Content-Type: application/json" | jq .consensus.direction
Free endpoints (catalog, sample, risk, accuracy-preview, regime preview) require no payment โ just curl directly.
Use with MCP
No persistent local installation and no user-hosted server are required. Add the configuration below and npx automatically fetches and starts the lightweight kronos-mcp connector over stdio โ there is no port, daemon or infrastructure for the user to maintain. Free tools work without a wallet: kronos_catalog, kronos_sample and kronos_risk. Paid tools can pay automatically only when the operator configures a local buyer signer.
{
"mcpServers": {
"kronos": {
"command": "npx",
"args": ["-y", "kronos-mcp"]
}
}
}
For automated x402 payments, set one or both variables in the local MCP process environment: KRONOS_X402_EVM_PRIVATE_KEY for Base-compatible EVM payments and KRONOS_X402_SOLANA_PRIVATE_KEY for Solana payments. These are buyer secrets; they are never sent to Kronos as private keys.
Prepare an agent wallet
This is a buyer-operated setup, not a Kronos service. Use a wallet or key-management system you already control.
Do not give an autonomous agent access to a personal or treasury wallet. Fund only the amount the operator is prepared to let the agent spend.
Kronos accepts USDC on Base and Solana โ the exact network is defined by the current 402 challenge.
Use a local secret store or environment injection. Never commit it, add it to MCP configuration files tracked by git, or provide it to Kronos support.
Use free tools before enabling automated payments.
Agent safety
- Review endpoint prices in the catalog before automation.
- Use a dedicated wallet and choose its funding level yourself; Kronos does not impose a restrictive daily budget.
- Keep the existing API rate limits in mind, especially for GPU playground calls.
- Monitor buyer-wallet activity independently and rotate its key if compromise is suspected.
- Treat forecasts as research signals, never as trading instructions.
Refunds & disputes
x402 payments are on-chain USDC transfers settled by the PayAI facilitator. Each payment is tied to a specific request via the X-Request-Id header echoed in the response.
- Successful delivery: If the endpoint returns HTTP 200 with valid data, the payment is final. No refund is available for forecasts that turn out to be incorrect โ Kronos provides research signals, not guarantees.
- Handler failure after upfront payment: If the endpoint returns HTTP 5xx after the payment was settled (upfront flow), contact support with the
X-Request-Idand transaction hash. We will refund the full amount to the payer's wallet within 5 business days. - Facilitator settlement failure: If the PayAI facilitator fails to settle, the client is not charged. The 402 response includes the failure reason; no action is needed.
- Duplicate charges: If the same transaction hash is used for multiple requests, our system detects it and alerts the team. Contact support if you believe you were charged twice for the same request.
- Dispute window: Disputes must be submitted within 30 days of the payment. Include the
X-Request-Id, transaction hash, and network (Solana or Base).
Refunds are manual on-chain transfers. Kronos cannot reverse a settled on-chain transaction; instead, we send an equivalent USDC transfer back to the payer's address.
Error catalog
Every API response uses standard HTTP status codes. Error bodies are JSON with error (machine-readable code) and optional detail (human-readable explanation).
| Status | Error code | When | How to handle |
|---|---|---|---|
| 402 | payment_required |
Paid endpoint requested without valid payment. Response body contains the x402 challenge: price, accepts (asset, network, scheme), payTo (destination), x402-version. |
Parse the challenge, sign a payment with your buyer wallet, and retry the same request with X-PAYMENT and X-REQUEST-ID headers. Use @x402/fetch (JS) or x402-requests (Python) to automate this. |
| 429 | rate_limited |
Too many requests. Each endpoint has its own limit (see rate limits table). detail explains which limit was hit. |
Back off and retry. The Retry-After header (when present) indicates seconds to wait. For predict, use cached responses (omit ?refresh=true) โ cache TTL is 5โ15 min per timeframe. |
| 503 | kronos_disabled |
Kronos service is disabled server-side (KRONOS_ENABLED=false). All paid endpoints return this. |
Retry later. This is a server configuration state, not a client error. Check /risk (free) for operational status. |
| 503 | forecast_unavailable |
Could not generate or retrieve a forecast. The symbol may not have enough candle data on the upstream exchange. | Try a different symbol or wait for the upstream exchange to provide more data. On-demand symbols may need their first prediction to be triggered manually. |
| 500 | kronos_error |
Internal server error. For upfront payment flow endpoints, the response includes retry_token and refund_reference. |
If retry_token is present, retry the same request with X-Retry-Token header (one-time use, 1h TTL). If refund_reference is present, contact support with that tx hash for a refund. |
| 404 | unknown_symbol |
The requested symbol is not in the Kronos catalog and on-demand discovery failed (invalid or unsupported Gate.io symbol). | Check /catalog for supported symbols. For on-demand, ensure the symbol exists on Gate.io. |
| 400 | missing_text / missing_query / invalid_agent_id |
Required parameter missing or invalid. detail explains what's needed. |
Fix the request parameters and retry. No payment is charged for 400 errors. |
Retry tokens (upfront flow only)
When a 5xx error occurs after an upfront payment was settled (predict, forecast-distribution, playground, market-brief, similar-markets, outcome-stats, behavioral-correlations, rationale-novelty), the response includes:
retry_tokenโ one-time use token, 1h TTL. Send inX-Retry-Tokenheader on your next request to bypass payment.refund_referenceโ on-chain tx hash of the settled payment. Cite this when requesting a manual refund.
For authorization flow endpoints (data/analysis), payment only settles on successful (2xx) responses โ no refund needed on 5xx.
API reference pages
Detailed documentation for each endpoint and topic:
API Overview
Base URL, authentication, rate limits, supported assets, and the full endpoint catalog.
Predict
Core forecast endpoint. Direction, probability, and conformal ranges across 5 timeframes.
Forecast Distribution
Full sample paths with p05โp95 percentiles. For risk analysis, tail estimation, and distribution-aware modeling.
Market Context
Cross-venue funding, OI, liquidations, and options IV. Fuse with predictions for confluence.
Similar Markets
Semantic search via embeddings โ find historically similar resolved markets and outcomes.
Model Accuracy
Audited hit rate, Brier score, and calibration. Every prediction scored against actual prices.
Benchmarks
Kronos vs all forecasting agents on Seshat. Transparent, audited leaderboard.
Models
Foundation Model architecture, capabilities, and supported assets.
Pricing & Plans
Every endpoint, every price. From $0.005 to $0.05. No subscriptions.
x402 Micropayments
How payment works: USDC in the HTTP header, settled on-chain. Solana or Base.
Security
No API keys to leak. x402 is the auth model. CORS, CSP, SSRF protection, rate limiting.
Accuracy Candles
Per-timeframe MAPE & MAE from 47k+ audited candles. Which timeframes the model predicts best.
Risk History
Best and worst streaks ever โ globally, per symbol, per timeframe. With date ranges.
Decisions
Browse recent predictions with audit status, Brier score, and per-timeframe summary.
Forecast Evolution
How predictions change over time โ direction flips, confidence drift, range revision.
Historical Analogs
Past situations similar to the current forecast and what actually happened.
Regime Detection
Cross-symbol alignment โ risk-on vs risk-off. How many assets agree on direction.
Agent Track Record
Kronos as market voter โ win rate, Brier score, per-coin breakdown.
Agent Votes
Recent Kronos market votes with confidence, rationale, and outcome.
Agent Signals
Live view of open markets where Kronos is actively voting.
Composite Signal
Quant (Kronos) vs Crowd divergence โ who wins when they disagree.
Confluence
Quant vs sentiment vs crowd โ AGREE/CONFLICT/NEUTRAL tags with confluence score.
AI Digest
7 data sources cross-referenced into one insight-driven analysis. Saves 6 paid calls.
Market Brief
AI crypto narrative with source-backed news, sentiment, events, and Kronos alignment.
Outcome Stats
Outcome distribution of historically similar markets โ what usually happens.
Behavioral Correlations
How similarly agents reason โ not just how they vote, but how they explain it.
Rationale Novelty
Detect agents recycling templated reasoning vs genuine per-market analysis.
Playground
Custom GPU inference with adjustable temperature, top_p, and sample_count.