Pass no request headers. These are static files, and a GET that carries one makes
the browser ask with OPTIONS first, which the file store answers with 405. That is
the cause of almost every CORS error anyone reports here.
Three things you can build
Each one is a single file with no dependency and no build step. The order is ours
and it is fixed — the browser demo first because it needs nothing but a
browser. It is not a ranking of the three.
What is this token?
index.html
Someone sends me a contract address. What is it, and whose?
The lookup a wallet or an explorer actually needs. It also shows the two things that catch people out: the fetch carries no request headers, and address keys are not lowercased because a Solana mint is case-sensitive.
<!-- What is this token?
Paste a contract address, get the company, the issuer and the chain.
One file. No build step, no framework, no dependency, no API key.
Data from Stocks On Chain, CC BY 4.0. https://stocksonchain.io
Two things worth copying along with the code:
1. The fetch passes NO request headers at all. A GET that carries one
triggers a CORS preflight, and these static files answer OPTIONS with
405 - so adding a headers object is what breaks this, not the origin.
2. Keys in the index are addresses exactly as the registry stores them:
checksummed mixed case on the EVM chains, base58 on Solana, where case
matters. So this builds its own lowercased map once, rather than
lowercasing the source. -->
<title>What is this token?</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
:root { color-scheme: light dark; --ink: #1a1a1a; --paper: #fdfcf8; --line: #d8d3c4; --quiet: #716752; }
@media (prefers-color-scheme: dark) {
:root { --ink: #ece7da; --paper: #15140f; --line: #3b382e; --quiet: #9a907b; }
}
* { box-sizing: border-box; }
body { margin: 0; padding: 24px 16px; background: var(--paper); color: var(--ink);
font: 15px/1.5 ui-sans-serif, system-ui, sans-serif; }
main { max-width: 42rem; margin: 0 auto; }
h1 { font-size: 1.25rem; margin: 0 0 .25rem; }
p.sub { margin: 0 0 1.25rem; color: var(--quiet); }
form { display: flex; gap: .5rem; flex-wrap: wrap; }
input { flex: 1 1 20rem; min-width: 0; padding: .6rem .7rem; border: 1px solid var(--line);
border-radius: 3px; background: var(--paper); color: var(--ink);
font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
button { padding: .6rem 1rem; border: 1px solid var(--ink); border-radius: 3px;
background: var(--ink); color: var(--paper); font: inherit; cursor: pointer; }
#out { margin-top: 1.25rem; }
.hit { border: 1px solid var(--line); border-left: 3px solid var(--ink);
border-radius: 3px; padding: .8rem .9rem; margin-bottom: .6rem; }
.tick { font: 600 1.05rem ui-monospace, monospace; }
.co { color: var(--quiet); }
dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; margin: .6rem 0 0; }
dt { color: var(--quiet); font-size: .8rem; }
dd { margin: 0; font-size: .85rem; }
code { font: 12px ui-monospace, monospace; word-break: break-all; }
a { color: inherit; }
footer { margin-top: 1.5rem; padding-top: .7rem; border-top: 1px solid var(--line);
color: var(--quiet); font-size: .75rem; }
</style>
<main>
<h1>What is this token?</h1>
<p class="sub">Paste a contract address from any chain.</p>
<form id="f">
<input id="q" spellcheck="false" autocomplete="off"
placeholder="0x… or a Solana mint" aria-label="Contract address">
<button>Look it up</button>
</form>
<div id="out" aria-live="polite"></div>
<footer>
Data from Stocks On Chain (Gwei, Inc.), CC BY 4.0.
<span id="read"></span>
Not investment advice. Nothing here says an address is safe or genuine — check it against the issuer.
</footer>
</main>
<script>
var SRC = 'https://stocksonchain.io/api/addresses.json';
var out = document.getElementById('out');
var index = null;
function text(el, s) { el.textContent = s; }
function load() {
if (index) return Promise.resolve(index);
// No headers. See the note at the top of this file.
return fetch(SRC)
.then(function (r) { return r.json(); })
.then(function (doc) {
var lower = {};
for (var k in doc.addresses) lower[k.toLowerCase()] = k;
index = { doc: doc, lower: lower };
text(document.getElementById('read'), 'Read ' + doc.generatedAt.slice(0, 10) + '.');
return index;
});
}
function render(address, rows, doc) {
out.innerHTML = '';
rows.forEach(function (r) {
var chain = doc.chains[r[0]];
var issuer = doc.issuers[r[1]];
var ticker = r[2], slug = r[3], symbol = r[4];
var company = doc.companies[slug];
var box = document.createElement('div');
box.className = 'hit';
var head = document.createElement('div');
var t = document.createElement('span');
t.className = 'tick';
t.textContent = ticker;
head.appendChild(t);
if (company) {
var c = document.createElement('span');
c.className = 'co';
c.textContent = ' ' + company;
head.appendChild(c);
}
box.appendChild(head);
var dl = document.createElement('dl');
[
['Issuer', issuer],
['Chain', chain],
['Token symbol', symbol],
['Address', address]
].forEach(function (pair) {
var dt = document.createElement('dt');
dt.textContent = pair[0];
var dd = document.createElement('dd');
if (pair[0] === 'Address') {
var code = document.createElement('code');
code.textContent = pair[1];
dd.appendChild(code);
} else {
dd.textContent = pair[1];
}
dl.appendChild(dt);
dl.appendChild(dd);
});
box.appendChild(dl);
var more = document.createElement('p');
more.style.margin = '.6rem 0 0';
more.style.fontSize = '.8rem';
var a1 = document.createElement('a');
a1.href = 'https://stocksonchain.io/stocks/' + slug;
a1.rel = 'noopener noreferrer';
a1.target = '_blank';
a1.textContent = 'Figures for ' + ticker;
var a2 = document.createElement('a');
a2.href = 'https://stocksonchain.io/verify/' + chain + '/' + address;
a2.rel = 'noopener noreferrer';
a2.target = '_blank';
a2.textContent = 'Check this address';
more.appendChild(a1);
more.appendChild(document.createTextNode(' · '));
more.appendChild(a2);
box.appendChild(more);
out.appendChild(box);
});
}
document.getElementById('f').addEventListener('submit', function (e) {
e.preventDefault();
var typed = document.getElementById('q').value.trim();
if (!typed) return;
text(out, 'Looking…');
load().then(function (ix) {
var key = ix.lower[typed.toLowerCase()];
if (!key) {
// A real and useful answer, not a failure: this site tracks tokenized
// stocks, so an address it does not hold is probably not one.
text(out, 'No tokenized stock is recorded at that address.');
return;
}
render(key, ix.doc.addresses[key], ix.doc);
}).catch(function () {
text(out, 'Could not reach the index. It is a static file, so a retry usually works.');
});
});
</script>
A desk plaque
main.py
How big is the on-chain stock market today?
That the whole integration is a plain GET and nine lines of parsing. The payload is under 1 KB, so a $6 microcontroller can hold it, and every figure on screen carries the day it was read.
Reads
/api/pulse.json
Needs
A Pico W or an ESP32 and an 8x32 LED matrix, about $15. No soldering.
# A desk plaque for the on-chain stock market.
#
# Shows how many stocks, tokens and owner addresses this site has read, and
# when it read them. One number that changes about once a day.
#
# Data from Stocks On Chain (Gwei, Inc.), CC BY 4.0. https://stocksonchain.io
# Not investment advice. This site sells nothing.
#
# ---------------------------------------------------------------------------
# PARTS, about $15
# - Raspberry Pi Pico W, or any ESP32 with WiFi (~$6)
# - MAX7219 4-in-1 8x32 LED matrix module (~$8)
# - 5 jumper wires. No soldering.
#
# WIRING (Pico W -> matrix)
# 3V3 (pin 36) -> VCC GND (pin 38) -> GND
# GP3 (pin 5) -> DIN GP2 (pin 4) -> CLK GP5 (pin 7) -> CS
#
# SETUP
# 1. Flash MicroPython: https://micropython.org/download/RPI_PICO_W/
# 2. Copy max7219.py onto the board (the standard MicroPython driver).
# 3. Put your WiFi details below, save this as main.py, reset the board.
#
# The same code drives an OLED or an e-paper panel: only show() changes. The
# fetch and the parse are the whole integration, and they are nine lines.
# ---------------------------------------------------------------------------
WIFI_SSID = "your-network"
WIFI_PASSWORD = "your-password"
# Under 1 KB, which is why this runs on a microcontroller at all.
URL = "https://stocksonchain.io/api/pulse.json"
# How often to ask. The site is rebuilt about once a day, so once an hour is
# already far more often than the data changes. Please do not hammer it.
REFRESH_SECONDS = 3600
import time
import network
import urequests
from machine import Pin, SPI
import max7219
spi = SPI(0, baudrate=10_000_000, polarity=1, phase=0, sck=Pin(2), mosi=Pin(3))
display = max7219.Matrix8x8(spi, Pin(5), 4) # 4 modules = 32x8 pixels
display.brightness(2)
def connect():
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if not wlan.isconnected():
wlan.connect(WIFI_SSID, WIFI_PASSWORD)
while not wlan.isconnected():
time.sleep(0.5)
return wlan
def scroll(message):
"""Scroll one line of text across the matrix, once."""
width = len(message) * 8
for offset in range(width + 32):
display.fill(0)
display.text(message, 32 - offset, 0, 1)
display.show()
time.sleep(0.03)
def read_pulse():
# NOTE: no headers. A GET with a headers object triggers a CORS preflight,
# and these static files answer OPTIONS with 405. Plain GET, always.
r = urequests.get(URL)
try:
return r.json()
finally:
r.close() # on a microcontroller this matters
def lines(p):
"""What to show, and nothing it has not read.
Every figure here carries the time it was read, so the plaque says when,
not just how much. A key that is missing means we have not read it - it is
never a zero, so this shows nothing rather than inventing one.
"""
out = ["STOCKS ON CHAIN"]
out.append("%s stocks on %s chains" % (p["stocks"], p["chains"]))
out.append("%s tokens" % p["listings"])
if "holders" in p:
# One holder is one address holding one listing, so a wallet holding
# several is counted more than once. Say "addresses", not "people".
out.append("%s owner addresses" % p["holders"])
# The oldest and newest read behind that sum. They differ because each
# chain is counted on its own day.
out.append("counted %s to %s" % (p["holdersFrom"][:10], p["holdersTo"][:10]))
if "actions" in p:
out.append("%s corporate actions on chain" % p["actions"])
out.append("read %s" % p["generatedAt"][:10])
# CC BY 4.0 asks for attribution wherever the data goes, including onto an
# object. The plaque names the source and the licence, same as a page would.
out.append("stocksonchain.io CC BY 4.0")
out.append("not investment advice")
return out
connect()
while True:
try:
pulse = read_pulse()
for line in lines(pulse):
scroll(line)
except Exception as err:
# Say the read failed. Never leave the last good number on screen with
# no warning - a stale figure that looks live is worse than a blank one.
scroll("read failed: %s" % err)
time.sleep(REFRESH_SECONDS)
A corporate-action ticker tape
main.py
What have issuers done to these tokens on chain?
How to read the corporate-action feed without a 1.5 MB download, and why this is not a price ticker: the multiplier before and after rather than a percentage, time order rather than size order, and no colour by direction.
Reads
/api/actions.json
Needs
The same board and matrix as the plaque. One purchase covers both.
# A ticker tape for on-chain corporate actions.
#
# Scrolls what issuers actually DID to their tokens on chain - a split, a
# dividend folded into the multiplier - with the transaction behind each one.
#
# Data from Stocks On Chain (Gwei, Inc.), CC BY 4.0. https://stocksonchain.io
# Not investment advice. This site sells nothing.
#
# ---------------------------------------------------------------------------
# SAME PARTS AND WIRING AS THE PULSE PLAQUE, about $15:
# Pico W (or any WiFi ESP32) + MAX7219 4-in-1 8x32 LED matrix, 5 wires.
# 3V3 -> VCC, GND -> GND, GP3 -> DIN, GP2 -> CLK, GP5 -> CS
# Flash MicroPython, copy max7219.py to the board, save this as main.py.
#
# WHY THIS IS NOT A PRICE TICKER, AND MUST NOT BECOME ONE
# A price ticker is a trading screen. This shows corporate actions: events with
# a date and a transaction you can go and check. So it prints the multiplier
# before and after rather than a percentage, it is in time order rather than
# ordered by size, and nothing is coloured by direction. Those are not style
# choices - a red and green percentage per ticker IS a trading screen, whatever
# the data behind it.
# ---------------------------------------------------------------------------
WIFI_SSID = "your-network"
WIFI_PASSWORD = "your-password"
# The newest 24 actions, about 6 KB. The full tape is 1.5 MB and will not fit
# in the RAM on this board, which is why this endpoint exists.
URL = "https://stocksonchain.io/api/actions.json"
REFRESH_SECONDS = 3600
import time
import network
import urequests
from machine import Pin, SPI
import max7219
spi = SPI(0, baudrate=10_000_000, polarity=1, phase=0, sck=Pin(2), mosi=Pin(3))
display = max7219.Matrix8x8(spi, Pin(5), 4)
display.brightness(2)
def connect():
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if not wlan.isconnected():
wlan.connect(WIFI_SSID, WIFI_PASSWORD)
while not wlan.isconnected():
time.sleep(0.5)
return wlan
def scroll(message, speed=0.03):
width = len(message) * 8
for offset in range(width + 32):
display.fill(0)
display.text(message, 32 - offset, 0, 1)
display.show()
time.sleep(speed)
def read_actions():
# No headers. See the note in the pulse demo: a headers object triggers a
# preflight, and these static files answer OPTIONS with 405.
r = urequests.get(URL)
try:
return r.json()
finally:
r.close()
def describe(row):
"""One action as one line of tape.
The issuer and the chain are not decoration. A figure about a token says
whose token it is and where it lives, or it is a number with no owner.
"""
parts = [row["ticker"], row["kind"].upper()]
# from/to are absent on a kind that moves no multiplier. Absent means there
# is no such pair, so print nothing rather than a zero or a dash.
if "from" in row and "to" in row:
parts.append("%.6f to %.6f" % (row["from"], row["to"]))
parts.append("%s on %s" % (row["issuer"], row["chain"]))
parts.append(row["at"][:10])
# The first 10 characters of the hash, to say a transaction exists. The
# payload carries it in full and so does the site: a shortened hash
# resolves on no explorer, so it is a hint here and never the record.
parts.append("tx %s..." % row["txHash"][:10])
return " ".join(parts)
connect()
while True:
try:
feed = read_actions()
scroll("ON-CHAIN CORPORATE ACTIONS newest first")
for row in feed["latest"]:
scroll(describe(row))
# Say what the window is. These are the newest 24 of a longer tape, and
# an issuer's oracle usually writes many tokens in one transaction, so
# several rows sharing an issuer and a date is the shape of the data
# rather than a stuck feed.
scroll("showing %s of %s full tape at stocksonchain.io/events" % (feed["count"], feed["total"]))
scroll("CC BY 4.0 not investment advice")
except Exception as err:
scroll("read failed: %s" % err)
time.sleep(REFRESH_SECONDS)
What data exists, and for how many stocks
Read this before you design anything. Owner counts cover nearly every stock and a
price covers about a tenth, so a page built on counts works and a page built on
prices mostly renders nothing. Counted from the snapshot read 2026-11-17.
Field
What it is
Stocks
Tokens
ticker, company, chains, issuers
Which company, whose token, which chain
1,017
3,833
holders
Owner addresses, from our own replay of the chain
970
3,573
transfers
Transfers counted while replaying the token
970
2,505
mechanics.multiplier
Shares a token counts as, where the mechanic has one
913
3,469
price
Read off a dollar pool we can see, or absent
99
151
marketCap
Token price times token supply
99
151
volume24h
Counted from swap logs in the pools we read
0
0
Order: the order these fields appear in a listing payload. Not a ranking, and not sorted by coverage. Of 1,017 stocks and 3,833 tokens.
There are also 376 corporate actions on the tape, each with its
transaction, and 105 days of daily totals.
Three things to get right
A stock, an instrument and a listing are three different things. A stock is
the company. An instrument is one product from one issuer. A listing is that
product on one chain. One issuer can put the same product on several chains, so
counting listings and calling them products overstates the choice a reader has.
Read mechanics.kind before you touch anything inside it. It is a
tagged union. Anything that is not erc8056 has no multiplier at all —
the field is absent, not null and not 1.0. Substituting a default publishes a
number nobody read.
A missing figure is missing, not zero. Where this site has not read something
it omits the field. Rendering an absent price as 0, or a dash, turns "we have not
looked" into "we looked and it is nothing".
The rules your page has to keep
These travel with the data. They are the same rules the agent skill hands a model,
from the same source, so they cannot drift apart.
Report, never assert. Every number here carries a timestamp. Quote it. If you state a price without saying when it was read, you have made the number less true than it was when we published it.
Never rank, never rate, never recommend. Do not build a "best", "top" or "trending" list out of this data, and do not sort it by performance. Every ordered collection in these endpoints states its own `sortKey`, and none of them is a ranking. A ranked list is investment advice delivered by layout.
Send the reader to the issuer on who may buy. Each issuer publishes its own rule, and this data gives you its address (`eligibility.sourceUrl`) rather than its text. That is deliberate: an eligibility rule is a legal position that can change without this site noticing, so no copy of it is trustworthy - including one you generate. Link to the issuer. Do not state, summarise or infer who may buy.
A stock token is not a share. What the instrument legally is depends on the wrapper the issuer chose, and each issuer describes its own. Report the wrapper; do not assert what a holder does or does not own.
No investment advice. This data supports the question "does this exist, and where". It does not support "should I buy it".
If the field you wanted is not here
Tell us. POST a kind and a subject to the
feedback endpoint, or call report_gap on the MCP server. It is free, it
needs no key, and nothing about the caller is recorded.
Frequently asked questions
Is it really free, and is there a key?
Yes, and no. Every endpoint on this page is a static JSON file served with CORS open. There is no account, no key, no rate limit and nothing to sign up for.
Why does my fetch fail with a CORS error?
Almost always because the request carries a header. These are static files, and a GET that carries any request header makes the browser send an OPTIONS preflight first, which the file store answers with 405. Remove the headers object and the same request works.
Can I use this on a commercial site?
Yes. The data is CC BY 4.0, which asks only that you credit Stocks On Chain and link back. Paying nothing and crediting us is the whole arrangement.
Why do so few stocks have a price?
Because this site publishes only prices it reads itself, off a dollar pool deep enough to mean something. Most of these tokens have no such pool, and a few have one holding a few hundred dollars, which quotes a number that is not a price. Where there is no readable market there is no price here. The table on this page says how many that is today.
Can I keep a copy, or do I have to call you every time?
Keep a copy. These are static files and they change about once a day, so caching them is correct. The read time is in every payload, so a cached copy can still say how old it is.