For developers

Build a Token Unlock Tracker in v0 With One Prompt

Build a token unlock tracker in v0 with one prompt: a Next.js Route Handler calls the Vestream API, and the key lives in Vercel's environment variables.

·6 min read·By Non Fungible Howard

v0 builds Next.js apps from a prompt and deploys them to Vercel. This guide builds a live token unlock tracker with the Vestream API, with the call in a Route Handler so your key never reaches the browser.

🔑The one rule

Your key must stay on the server. Anything in browser code can be read by anyone who opens the page, and the Vestream API refuses calls made straight from other websites' browsers anyway, so a browser-only app won't work. Every prompt here tells the builder to make the call from server-side code and to read the key from a secret.

1. Get a key

Get a free Vestream key at vestream.io/build. It appears on screen straight away; confirm your email within 24 hours to keep it working. The free plan is 250 calls a month and 50 a day.

2. Paste the prompt into v0

Start a new v0 project and paste this as your first message. It builds Unlock Radar: the biggest token unlocks in the next 7 days, with filters.

text
Build a web app called Unlock Radar that shows the biggest token unlocks coming up in the next 7 days.

Data: Call the Vestream API only from server-side code, never from the browser. Send the header "Authorization: Bearer <key>", reading the key from a secret named VESTREAM_API_KEY. Don't put the key in code or in this chat: ask me to add it as a secret.
- Request GET https://www.vestream.io/api/v1/unlocks/upcoming?days=7&min_usd=100000&limit=200 and cache the result for 10 minutes, so page views don't each use an API call.
- The response has an `unlocks` array. Each item has unlock_time (Unix seconds), token_symbol, token_decimals, chain_id, protocol, amount (a string in raw units: divide by 10 to the power token_decimals), usd_value (a number, can be null), supply_share (0 to 1, can be null) and url (the token's Vestream page).

Page:
- A table sorted by unlock_time: date and time in the visitor's time zone, token, chain (chain names: 1 Ethereum, 10 Optimism, 56 BNB Chain, 101 Solana, 137 Polygon, 8453 Base, 42161 Arbitrum, 43114 Avalanche, otherwise show the number), amount with thousands separators, USD value (a dash when null), share of supply as a percentage (a dash when null), and a link to url.
- Filters for chain and minimum USD value.
- A small line under the table: "Data: Vestream".
- If the API returns an error, show its `error` message instead of an empty table.

Use Next.js. Put the API call in a Route Handler at app/api/unlocks/route.ts and have the page fetch /api/unlocks. Read the key from process.env.VESTREAM_API_KEY, and never give it a NEXT_PUBLIC_ name.

3. Add your key as a secret

  1. 1Open the project menu (…) → Environment Variables and add VESTREAM_API_KEY with your key.
  2. 2Include the Development environment: v0's preview can only read variables available to Development. Add Production too, for the deployed app.
  3. 3Never give it a NEXT_PUBLIC_ name: Next.js sends those to the browser. If v0 ever creates one for your key, delete it and replace the key.

4. Check it works

Open the preview. You should see a table of unlocks for the next 7 days, served from /api/unlocks. Visit /api/unlocks in the preview to see the raw data your page uses.

What you seeWhat it meansFix
An empty table, no errorThe call ran in the browser and was refused, or the key wasn't foundAsk: "Make sure the Vestream call runs on the server and reads VESTREAM_API_KEY from secrets."
"Missing or invalid Authorization header"The key isn't being sentCheck the secret is named exactly VESTREAM_API_KEY, then ask the builder to send "Authorization: Bearer" plus the key
"Confirm your email to keep using this key"The 24-hour confirmation window passedOpen the link in the welcome email from Vestream, then reload
"Daily limit of 50 requests reached"The free plan's daily calls are usedMake sure the 10-minute cache is in place; it resets at 00:00 UTC
Amounts with 18 extra zerosAmounts come in raw unitsAsk: "Divide amount by 10 to the power token_decimals before showing it."

Mind the free limits. The prompt caches the API response for 10 minutes, so visitors don't each use a call. 50 calls a day is plenty for one dashboard; a busier app or a bot that checks often needs Starter ($49 a month, 1,000 calls).

Keep building: three follow-up prompts

Paste these one at a time once the first version works.

Add a lock check page

text
Add a page where I paste a token's chain ID and contract address. Server-side, call GET https://www.vestream.io/api/v1/token/{chainId}/{address}/summary (same key and secret as before). Show locked_now and locked_share_of_supply (0 to 1), cancelable_locked (tokens the sender can still cancel; amounts are raw units, divide by 10 to the power token_decimals), next_unlock (unlock_time, amount, usd_value), active_schedules and the market (price_usd, liquidity_usd). If locked_now is 0, say "No vesting found on the platforms Vestream reads", not "safe".

Add unlock pressure

text
On the lock check page, also call GET https://www.vestream.io/api/v1/token/{chainId}/{address}/pressure?days=30 server-side and show ratios.unlock_to_daily_volume, ratios.unlock_to_liquidity and biggest_day (date, usd_value). Highlight unlock_to_daily_volume above 1 in amber. Ratios can be null when the token has no market deep enough to value: show "unknown", not 0.

Add a wallet view

text
Add a page where I paste a wallet address. Server-side, call GET https://www.vestream.io/api/v1/wallet/{address}/vestings?active_only=true and list each item in `streams`: tokenSymbol, protocol, chainId, lockedAmount and claimableNow (raw units, divide by 10 to the power tokenDecimals) and nextUnlockTime (Unix seconds). If coverage.complete is false, show coverage.note above the list.

Where to go next

Frequently Asked Questions

Why a Route Handler?

Route Handlers run on the server, so they can read the key from process.env without it ever being sent to the browser. The page fetches your own /api/unlocks route instead of calling Vestream directly.

Does the cache work on Vercel?

Yes. Ask v0 to cache the Route Handler's Vestream response for 10 minutes; it can use Next.js's fetch revalidation for that.

Is the data free?

For testing and small apps: 250 calls a month and 50 a day on the free plan. Launching something other people use needs a paid plan, which also allows commercial use.

Where does the data come from?

From the vesting and lock contracts themselves, across 13 platforms and 13 chains including Sablier, Hedgey, UNCX, Team Finance, PinkSale, Streamflow and Jupiter Lock, priced from DEX markets.

Track your own token vesting

Paste any wallet, see every unlock across 13 protocols and 13 chains. Free, no sign-up.

Build with the same data

A free API key and MCP server for token vesting, lock and unlock data across every protocol we index.

Get a free API key →

Read the developer docs

More from Vestream Resources