Back to home

API Reference

All endpoints require x402 USDC payment on Base Sepolia.

GET /api/v1/prices/:token

Cross-chain price oracle — $0.001/request

Request
curl https://api.kryptor.app/api/v1/prices/ETH
Response
{
  "token": "ETH",
  "medianPriceUsd": 2326.95,
  "minPriceUsd": 2303.74,
  "maxPriceUsd": 2341.54,
  "sources": 20,
  "prices": [
    { "chain": "ethereum", "priceUsd": 2328.00, "source": "uniswap" },
    { "chain": "bsc", "priceUsd": 2326.10, "source": "pancakeswap" },
    ...
  ]
}

GET /api/v1/yields/:token

DeFi yield intelligence — $0.005/request

Request
curl https://api.kryptor.app/api/v1/yields/USDC
Response
{
  "token": "USDC",
  "count": 50,
  "yields": [
    {
      "protocol": "aave-v3",
      "chain": "Ethereum",
      "apy": 4.5,
      "tvlUsd": 500000000,
      "ilRisk": false,
      "stablecoin": true
    },
    ...
  ]
}

POST /api/v1/simulate

Strategy simulation + risk analysis — $0.02/request

Request
curl -X POST https://api.kryptor.app/api/v1/simulate \
  -H "Content-Type: application/json" \
  -d '{"token":"USDC","protocol":"aave-v3","amount":1000,"durationDays":30}'
Response
{
  "token": "USDC",
  "protocol": "aave-v3",
  "currentApy": 4.5,
  "estimatedYieldUsd": 3.70,
  "riskScore": 15,
  "recommendation": "low_risk",
  "riskFactors": [
    { "factor": "smart_contract", "severity": "low", "description": "..." }
  ],
  "worstCaseYieldUsd": 1.35,
  "bestCaseYieldUsd": 4.07
}

How x402 Payment Works

No API keys needed — agents pay per request

  1. Send a request to any /api/v1/* endpoint
  2. Receive 402 Payment Required with payment instructions in the PAYMENT-REQUIRED header
  3. Sign a USDC transaction on Base and include the payment proof in the X-PAYMENT header
  4. Receive the data response 200 OK