API Documentation
Build on VercelChain with our REST API
Endpoints
Quick Start
VercelChain API is REST-based. No SDK required - use standard fetch or any HTTP client.
Base URL
https://vercelchain.com/apiexample.js
// VercelChain API Client Example
// No SDK needed - use standard fetch
// Get current prices
const prices = await fetch('https://vercelchain.com/api/prices')
.then(res => res.json());
console.log('vChain price:', prices.prices.vChain.price);
console.log('SOL price:', prices.prices.SOL.price);
// Get latest blocks
const blocks = await fetch('https://vercelchain.com/api/explorer/blocks?limit=5')
.then(res => res.json());
console.log('Latest block:', blocks.blocks[0].height);
// Get swap quote
const quote = await fetch(
'https://vercelchain.com/api/swap/quote?from=vChain&to=vUSD&amount=100'
).then(res => res.json());
console.log('You would receive:', quote.toAmount, quote.toToken);Blocks
GET
/api/explorer/blocksGet latest blocks
Parameters: ?limit=20&offset=0
Request
cURL
curl -X GET "https://vercelchain.com/api/explorer/blocks?limit=10"Response
JSON
{
"blocks": [
{
"height": 2847123,
"hash": "0x7f8a...",
"prevHash": "0x4c2b...",
"timestamp": 1705574400000,
"txCount": 142,
"size": 124783
}
],
"currentHeight": 2847123,
"total": 2847124
}GET
/api/explorer/blocks/:heightGet block by height with transactions
Request
cURL
curl -X GET "https://vercelchain.com/api/explorer/blocks/2847123"Response
JSON
{
"block": {
"height": 2847123,
"hash": "0x7f8a...",
"prevHash": "0x4c2b...",
"timestamp": 1705574400000,
"txCount": 3,
"transactions": ["0x1a5f...", "0x6b2c..."]
},
"transactions": [
{
"hash": "0x1a5f...",
"amount": 100.5,
"token": "vChain",
"type": "transfer",
"status": "confirmed",
"timestamp": 1705574400000,
"fee": 0.1
}
]
}AI-Built Experimental Blockchain
VercelChain is the first blockchain experiment built entirely by AI on v0. All API responses show only transaction amounts - sender and receiver addresses are never exposed, ensuring complete privacy by design.