sol-feed (Python)
Python client for the Lunar Shadow Labs feed: decoded Solana DEX swaps, launches, migrations, pool creations and liquidity changes on 12 venues, over one WebSocket, in one JSON shape. Market data only.
pip install sol-feed
import asyncio, os
from sol_feed import Feed, ui_amount
async def main():
async for m in Feed(os.environ["LSL_KEY"], kinds=["swap"], venues=["pump", "pumpswap"]):
if m["kind"] == "gap":
print("gap:", m["reason"], m["missed"]) # the only indication that data was missed
continue
side = "buy" if m["is_buy"] else "sell"
print(m["venue"], side, ui_amount(m["base_amount"], m["base_decimals"]), m["base_mint"], m["price"])
asyncio.run(main())
LSL_KEY is the API key on your account page (it is not your
Whop license key).
What the client does for you
- Sends the key as an
Authorization: Bearerheader (never in the URL). - Reconnects with exponential backoff (1 s → 30 s, with jitter) and resumes from the last message it
gave you (
?since=<epoch>:<seq>), so a short disconnect loses nothing that is still in the server's buffer. Anything that could not be recovered arrives as agapmessage. - Handles
helloandheartbeatinternally; you receive events and gaps only. - Raises
AuthErrorfor an unknown, expired or revoked key andFeedErrorfor a request the server rejects (for example an unknown kind or venue name). Those are not retried.
Options
| argument | meaning |
|---|---|
kinds |
swap, launch, curve_complete, migration, pool_create, liquidity, mint_update |
venues |
pump, pumpswap, launchlab, meteora_dbc, raydium_v4, raydium_cpmm, raydium_clmm, pancake_v3, orca, meteora_dlmm, meteora_damm_v1, meteora_damm_v2, and token2022 (token-extension updates, the venue of every mint_update) |
watch |
mints, pools or wallets to follow (a wallet matches every event it is the actor of) |
url |
defaults to wss://feed.lunarshadowlabs.com/ws |
on_reconnect |
callable(info) with attempt, delay, reason, called before each reconnect |
With no filter at all, the server applies the filter saved on your account page.
Breaking out of async for m in Feed(...) closes the connection. If you keep the iterator from
feed.events() in a variable, call await it.aclose() when you are done, or the connection keeps
one of your key's connection slots until it is garbage-collected.
ui_amount(amount, decimals) scales a raw amount string to an exact Decimal (amounts are strings
because they exceed the integers a float can hold).
The full message reference is at https://lunarshadowlabs.com/docs/.
License
MIT
Metadata
Release files for sol-feed 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sol_feed-0.1.1.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sol_feed-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / sol_feed-0.1.1.tar.gz
| Download URL | sol_feed-0.1.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11e53922c2a971e533178ae7fabb67f65a6b5ded05afed510085776de186cc21
|
|
BLAKE2b-256 checksum How to use checksums |
48771232f204aa7e570cd3d9112241bc5546a7776437e215de130460d1b2fe72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / sol_feed-0.1.1-py3-none-any.whl
| Download URL | sol_feed-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b53833039e84965884899f7a7b8cb54c6fbf968381e6777a469e4300d656e787
|
|
BLAKE2b-256 checksum How to use checksums |
ec3d57a8b132ca69ec57161841b8a0c4dd8ab5f02a4d7e1e9d67a186deeadda7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency log