Token-2022 risk flags, live on every event
Token-2022 mints can carry extensions that change what holding or moving a token means: a permanent
delegate, a transfer fee, a transfer hook, a pause switch. One-off checker tools look up one token at a time. Our
feed attaches the mint's flags to every swap, launch and pool event, for both sides of the trade, and sends a
mint_update when a flag changes.
Market data only. Flags describe a mint's configuration; they are not a safety rating or advice.
Subscribe
import asyncio, json, os, websockets # pip install websockets
URL = "wss://feed.lunarshadowlabs.com/ws?kinds=swap,launch,pool_create,mint_update"
HEADERS = {"Authorization": f"Bearer {os.environ['LSL_KEY']}"}
WATCH = ("freeze_authority", "permanent_delegate", "transfer_fee", "transfer_hook", "paused", "default_frozen")
async def main():
async with websockets.connect(URL, additional_headers=HEADERS, max_size=None) as ws:
async for raw in ws:
m = json.loads(raw)
if m["kind"] == "mint_update":
print("mint changed", m["mint"], m["changes"])
continue
flags = m.get("base_flags")
if flags: # None = not known yet
found = [k for k in WATCH if flags.get(k)]
if found:
print(m["kind"], m["venue"], m["keys"][0], found)
asyncio.run(main())
A real swap with flags
{
"v": 1,
"seq": 173326,
"kind": "swap",
"venue": "orca",
"keys": [
"Xs3oZwbHvqis4NYcf4YKWmEia2eC84wSiVrcYcTqpH8",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"ASAxmEaTT1HFe3mVC3zbKDE4tuB28W7732XQrEMBM5W2",
"CgUud6C3myg3C5pDzzNwQVeqqfRi3jUVwLagdbNfjM2R"
],
"stage": "executed",
"source": "geyser",
"commitment": "processed",
"slot": 454292796,
"sig": "X7G3SZH4zGqTnDyaiEgBtiDSHLV6ooRcF6fiEvKuEP51rdn1EvepbYJ6YbEkHpiWojEeKVKzwuLdG6a6dMd8uLH",
"ix": 3,
"inner": 3,
"t_ingest_us": 1791394882920172,
"t_emit_us": 1791394882920219,
"via": "FLASHX8DrLbgeR8FcfNV1F5krxYcYMUdBkrP1EPBtxB9",
"pool": "ASAxmEaTT1HFe3mVC3zbKDE4tuB28W7732XQrEMBM5W2",
"user": "CgUud6C3myg3C5pDzzNwQVeqqfRi3jUVwLagdbNfjM2R",
"base_mint": "Xs3oZwbHvqis4NYcf4YKWmEia2eC84wSiVrcYcTqpH8",
"quote_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"is_buy": true,
"base_amount": "63821305",
"quote_amount": "106416295",
"base_decimals": 8,
"quote_decimals": 6,
"price": 166.74102010292646,
"fees": {
"lp": "75085",
"protocol": "11219"
},
"partial": false,
"derived": false,
"base_flags": {
"program": "token2022",
"decimals": 8,
"supply": "55997543337979",
"mint_authority": "7pt9tkctJPK7PPNQJ77GKg8ZffSF6QxoMiCFYHxrtaCj",
"freeze_authority": "JDq14BWvqCRFNu1krb12bcRpbGtJZ1FLEakMw6FdxJNs",
"permanent_delegate": "5aMNNLQJwAEeoemTEMkv5NVjqKwvvefRYCQ5Z67HFvEq",
"paused": false,
"confidential": true,
"scaled_ui": {
"multiplier": 1,
"new_multiplier": 1,
"new_multiplier_ts": 0
},
"metadata_pointer": "Xs3oZwbHvqis4NYcf4YKWmEia2eC84wSiVrcYcTqpH8",
"extensions": [
18,
12,
6,
25,
26,
4,
14,
19
]
},
"quote_flags": null,
"x": {
"input_transfer_fee": "0",
"output_transfer_fee": "0",
"post_sqrt_price": "23810497197193600693",
"quote_rule": "priority"
}
}
Captured from our live feed on 2026-10-07.
This token has a mint authority, a freeze authority, a permanent delegate, a pause switch (currently off), confidential transfers
and a scaled UI amount, all visible in base_flags without a separate lookup.
What the flags mean
| flag | meaning |
|---|---|
program | spl or token2022 |
mint_authority | who can mint more supply; null = revoked |
freeze_authority | who can freeze holders' accounts; null = revoked |
permanent_delegate | an account that can move or burn anyone's tokens |
transfer_fee | a fee taken on every transfer: older / newer with bps, max, epoch |
transfer_hook | a program that runs on every transfer |
paused | whether transfers are paused |
default_frozen | new token accounts start frozen |
non_transferable | the token cannot be transferred |
close_authority, interest_rate_bps, scaled_ui, confidential, metadata_pointer, permissioned_burn | present only when the mint carries that extension |
extensions | every Token-2022 extension type number on the mint |
A flag that the mint doesn't carry is absent. Quote mints can carry flags too, in quote_flags.
Known, unknown and changed
nullflags mean not known yet, never "safe". A mint's first events can benullwhile we read it.- Known flags are a snapshot from our last successful read of the mint, refreshed about hourly.
- When a Token-2022 mint changes one of these fields (for example it is paused, or its transfer fee changes),
you receive a
mint_updatelisting each change with its old and new value. Supply changes are not sent.
{
"v": 1,
"seq": 143991,
"kind": "mint_update",
"venue": "token2022",
"keys": [
"3XFyVaZMFcA5qht3STXyKPJ4fUAqHEDCM52okDveWqih",
null,
null,
null
],
"stage": "executed",
"source": "geyser",
"commitment": "processed",
"slot": 454292601,
"sig": "5DmGV8LaXoA4SARR4a3MiaEnDuji9dYSB96Do7Z7HS1oTH4UJP2z4jM4fm81hVjw5rckhU868HGqExpgiEWERsRV",
"ix": 0,
"inner": null,
"t_ingest_us": 1791394829450165,
"t_emit_us": 1791394829450165,
"via": null,
"mint": "3XFyVaZMFcA5qht3STXyKPJ4fUAqHEDCM52okDveWqih",
"changes": [
{
"field": "transfer_fee_authority",
"old": "WLHv2UAZm6z4KyaaELi5pjdbJh6RESMva1Rnn8pJVVh",
"new": "5KXDF6QnqhBj72hDtJNkkpFaQVUfbFXNybMsp3DiK6tD"
}
]
}
Captured from our live feed on 2026-10-07.
Try the feed
One WebSocket, 12 Solana venues, one flat price.
Start free trial Read the docs
3-day free trial, then $49/month per license plus applicable tax, charged automatically every month until you cancel. Cancel online any time before the trial ends and you pay nothing. Starting a trial means you agree to the Terms. Market data only, no signals or advice.