Skip to main content
CryptoLens/Docs/API reference
API Reference

CryptoLens API

7 endpoints for portfolio data, gas prices, trending tokens, market sentiment, live prices, wallet analysis, and UK tax estimates.

Getting started

The CryptoLens API gives you programmatic access to the same data that powers the site. Scan wallets across 29 blockchains, pull live prices, check gas fees, and estimate UK tax liability — all via simple REST calls.

Base URL: https://cryptolens.uk/api/v1

Authentication: API key via x-api-key header or Authorization: Bearer

Format: All responses are JSON with the envelope { success, plan, data, timestamp }

Rate limits

PlanPriceRequests/minAPI keysEndpoints
Pro£4.99/mo6003All 7
Developer£19.99/mo2,0005All 7
Business£49.99/mo6,00025All 7

Rate limit status is returned in response headers. If you exceed the limit, you'll receive a 429 response with a retryAfter field.

Authentication

Include your API key in every request via the x-api-key header:

curl -H "x-api-key: clk_your_api_key_here" \
  "https://cryptolens.uk/api/v1/portfolio?address=0x1234..."

Generate your API keys from your account dashboard.

Endpoints

All endpoints are under /api/v1

GET/portfolio

Scan a wallet and return token balances, values, and portfolio metrics across all supported chains.

Parameters

addressrequired

Wallet address (0x... for EVM, base58 for Solana)

chainoptional

Blockchain: eth, bsc, polygon, arbitrum, optimism, base, avalanche, sol. Omit to scan all EVM chains.

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/portfolio?address=0xYOUR...&chain=eth"

Example response

{
  "success": true,
  "plan": "developer",
  "data": {
    "address": "0xYOUR_WALLET_ADDRESS_HERE",
    "chain": "eth",
    "nativeBalance": "2.5 ETH",
    "nativeSymbol": "ETH",
    "totalValue": 15234.50,
    "totalTokens": 12,
    "tokens": [
      { "symbol": "ETH", "name": "Ethereum", "balance": "2.5", "value": 5000.00, "percentage": 32.8 }
    ]
  },
  "timestamp": "2026-04-18T12:00:00.000Z"
}
GET/gas

Live gas prices across all 8 supported blockchains — Ethereum, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche, and Solana.

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/gas"

Example response

{
  "success": true,
  "plan": "developer",
  "data": {
    "chains": {
      "eth": { "low": 8, "standard": 12, "fast": 18, "unit": "gwei" },
      "polygon": { "low": 25, "standard": 30, "fast": 45, "unit": "gwei" },
      "sol": { "priorityFee": 0.00005, "unit": "SOL" }
    },
    "timestamp": "2026-04-18T12:00:00.000Z"
  },
  "timestamp": "2026-04-18T12:00:00.000Z"
}
GET/sentiment

Market fear & greed index and sentiment signals.

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/sentiment"

Example response

{
  "success": true,
  "plan": "pro",
  "data": {
    "score": 72,
    "label": "Greed",
    "previous": 65
  },
  "timestamp": "2026-04-18T12:00:00.000Z"
}
GET/prices

Current prices for specified coins in GBP and USD, with 24h change and market cap data. Powered by CoinGecko.

Parameters

idsrequired

Comma-separated CoinGecko IDs: bitcoin,ethereum,solana (max 50)

vs_currenciesoptional

Comma-separated currencies (default: gbp,usd)

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/prices?ids=bitcoin,ethereum,solana"

Example response

{
  "success": true,
  "plan": "developer",
  "data": {
    "bitcoin": { "gbp": 51234.00, "usd": 64123.00, "gbp_24h_change": 2.1 },
    "ethereum": { "gbp": 2456.00, "usd": 3078.00, "gbp_24h_change": -0.8 },
    "solana": { "gbp": 112.50, "usd": 140.90, "gbp_24h_change": 5.3 }
  },
  "timestamp": "2026-04-18T12:00:00.000Z"
}
GET/wallet-age

Check when a wallet made its first transaction and how old it is.

Parameters

addressrequired

Wallet address (0x... for EVM)

chainoptional

Blockchain (default: eth)

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/wallet-age?address=0xYOUR..."

Example response

{
  "success": true,
  "plan": "pro",
  "data": {
    "address": "0xYOUR_WALLET_ADDRESS_HERE",
    "firstTransaction": "2015-08-07T00:00:00.000Z",
    "ageDays": 3907,
    "ageLabel": "10 years, 8 months",
    "totalTransactions": 1247
  },
  "timestamp": "2026-04-18T12:00:00.000Z"
}
GET/tax

HMRC-compliant UK CGT computation: full Section 104 pool, same-day rule, 30-day bed-and-breakfast rule, annual exempt amount per year, and the 30 Oct 2024 rate split. Same engine that produces the SA108 schedule on the dashboard.

Parameters

addressrequired

Wallet address

chainoptional

Blockchain (default: eth)

yearoptional

UK tax year e.g. 2025/26 (default: current)

engineoptional

hmrc (default — full Section 104 engine) or heuristic (legacy rough estimate)

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/tax?address=0xYOUR...&chain=eth&year=2025/26"

Example response

{
  "success": true,
  "plan": "business",
  "data": {
    "address": "0xYOUR...",
    "chain": "eth",
    "taxYear": "2025/26",
    "engine": "hmrc",
    "summary": {
      "totalProceeds": 42100.00,
      "totalCosts": 38540.00,
      "totalGains": 4360.00,
      "totalLosses": 800.00,
      "netGain": 3560.00,
      "annualExemption": 3000,
      "taxableGain": 560.00,
      "estimateIfBasicRate": 100.80,
      "estimateIfHigherRate": 134.40,
      "taxBasicRate": 100.80,
      "taxHigherRate": 134.40
    },
    "disposalCount": 47,
    "section104Pools": [
      { "token": "ETH", "quantity": 0.85, "costGBP": 1700.00, "averageCost": 2000.00 }
    ],
    "methodology": {
      "rules": [
        { "rule": "Same-day matching", "citation": "TCGA 1992 s.105(1)(b)" },
        { "rule": "30-day bed-and-breakfast", "citation": "TCGA 1992 s.106A" },
        { "rule": "Section 104 pool", "citation": "TCGA 1992 s.104" }
      ]
    }
  }
}
GET/transactions

Paginated transaction history for a wallet. Same source as /portfolio but exposes the tx array directly with pagination headers, so you don't have to load the full holdings response just to walk a tx list.

Parameters

addressrequired

Wallet address

chainoptional

Blockchain (default: eth)

pageoptional

1-indexed page number (default 1)

pageSizeoptional

10-200 (default 50)

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/transactions?address=0xYOUR...&chain=eth&page=1&pageSize=50"

Example response

{
  "success": true,
  "plan": "developer",
  "data": {
    "address": "0xYOUR...",
    "chain": "eth",
    "transactions": [
      {
        "hash": "0xabc...",
        "type": "send",
        "tokenSymbol": "USDC",
        "value": "1000.50",
        "timestamp": 1736159420000,
        "valueGBP": 790.40
      }
    ],
    "pagination": { "page": 1, "pageSize": 50, "totalPages": 7, "totalCount": 342 }
  }
}
GET/fumbles

Biggest fumbles for a wallet — disposals where the user sold before all-time-high. Returns the cost-of-regret in GBP per token, sorted by biggest fumble first. CryptoLens signature feature.

Parameters

addressrequired

Wallet address

chainoptional

Blockchain (default: eth)

limitoptional

Max fumbles to return, 1-50 (default 10)

Example request

curl -H "x-api-key: clk_your_key" \
  "https://cryptolens.uk/api/v1/fumbles?address=0xYOUR...&chain=eth&limit=5"

Example response

{
  "success": true,
  "plan": "pro",
  "data": {
    "address": "0xYOUR...",
    "chain": "eth",
    "totalFumbleGBP": 124800.50,
    "biggestFumble": {
      "token": "Shiba Inu",
      "symbol": "SHIB",
      "soldOn": "2021-04-12",
      "soldAt": 0.000004,
      "ath": 0.00007,
      "amount": 1500000000,
      "costOfRegretGBP": 99000.00
    },
    "fumbles": [ /* … */ ]
  }
}
POST/historical-prices

Bulk historical price lookup — returns GBP price for each (token, date) request with the source that priced it (CoinGecko / DefiLlama / GeckoTerminal / Birdeye / DexScreener). Tax-tooling primitive used by anyone building their own portfolio dashboard.

Parameters

Body: requestsrequired

Array of { tokenId, date (YYYY-MM-DD), mint?, chain?, ts? } — max 200 per call

Example request

curl -X POST -H "x-api-key: clk_your_key" -H "Content-Type: application/json" \
  -d '{"requests":[{"tokenId":"bitcoin","date":"2024-12-15"},{"tokenId":"ethereum","date":"2024-12-15"}]}' \
  "https://cryptolens.uk/api/v1/historical-prices"

Example response

{
  "success": true,
  "plan": "developer",
  "data": {
    "prices": [
      { "tokenId": "bitcoin", "date": "2024-12-15", "priceGBP": 79412.30, "source": "coingecko", "cached": false },
      { "tokenId": "ethereum", "date": "2024-12-15", "priceGBP": 3120.45, "source": "coingecko", "cached": false }
    ],
    "total": 2,
    "cached": 0
  }
}

Ready to integrate?

7 endpoints, 600+ req/min on Pro, 2,000 on Developer. Get your key and start building.

Get API Key