Skip to main content

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: Bearer header (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 a gap message.
  • Handles hello and heartbeat internally; you receive events and gaps only.
  • Raises AuthError for an unknown, expired or revoked key and FeedError for 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)

Source distribution for sol-feed 0.1.1
File Size Uploaded
sol_feed-0.1.1.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sol-feed 0.1.1
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page