Skip to main content

METEORA DLMM SDK

Project description

metpysdk

metpysdk is a Python SDK for interacting with Meteora DLMM (Dynamic Liquidity Market Maker) on Solana.

It provides high-level, async-friendly primitives for:

  • querying DLMM pairs
  • inspecting bins and liquidity
  • reading positions and rewards
  • parsing on-chain accounts safely and accurately

The SDK is designed as a library, not a script:

  • clean public API
  • explicit versioning
  • byte-accurate account parsing
  • minimal, modern dependency set

⚠️ This project is in active development (0.x).
APIs may change until 1.0.0.


Features

  • 🚀 Async-first API (asyncio)
  • 🔍 Accurate parsing of DLMM on-chain accounts
  • 🧱 Construct-based binary layouts (no abandoned deps)
  • 🧠 Clear separation between public API and internals
  • 🛠️ Designed for bots, analytics, and backend services

Installation

Requirements

  • Python 3.9+
  • Poetry (recommended) or pip

With Poetry (recommended)

poetry add metpysdk

With pip

pip install metpysdk

Quick Example

import asyncio

from metpysdk import DLMMClient
from solders.pubkey import Pubkey


async def main():
    client = DLMMClient()

    lb_pair = Pubkey.from_string(
        "INSERT_LB_PAIR_ADDRESS_HERE"
    )

    active_bin = await client.get_active_bin(lb_pair)

    print("Active bin ID:", active_bin.bin_id)
    print("Price:", active_bin.price)


asyncio.run(main())

Project Structure

metpysdk/
├── accounts/     # Parsed on-chain account models
├── dlmm/         # Core DLMM client logic
├── helpers/      # High-level helpers and combinators
├── layouts/      # Binary layouts (construct-based)
├── utils/        # RPC, filters, derivations, constants
└── __init__.py   # Public API surface

Only symbols re-exported from package-level modules are considered public API.
Everything else may change without notice until 1.0.0.

Public API

The main entry point is:

from metpysdk import DLMMClient

Additional data models and enums are exposed via:

from metpysdk.accounts import (
    Position,
    ActiveBin,
    StrategyParameters,
)

Deep imports from internal modules are not supported.

Development

Setup

git clone https://github.com/yourname/metpysdk.git
cd metpysdk
poetry install

Poetry will create a local .venv/ automatically.

Linting

poetry run ruff check src/metpysdk
poetry run pylint src/metpysdk

Tests

poetry run pytest

Versioning

This project follows semantic versioning:

0.x.y — unstable, breaking changes allowed
1.0.0 — first stable API
>=1.0.0 — no breaking changes without major bump

License

MIT License © 2025 Ivan Bezborodov

See LICENSE for details.

Disclaimer

This SDK is provided as-is, without warranties.
Interacting with on-chain programs involves financial risk.
Always validate results independently before using in production.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metpysdk-0.1.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metpysdk-0.1.1-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file metpysdk-0.1.1.tar.gz.

File metadata

  • Download URL: metpysdk-0.1.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.9 Windows/10

File hashes

Hashes for metpysdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fd60a19fc19331d928d55de415fd3dd36b76ded747bf2949d84a0218b16ae5da
MD5 285449ff4793b0c72cd784a5a4d70531
BLAKE2b-256 70d93356deb64a15ebfb58b9e6571a372bdafe7273d3de8a79526223be10ac31

See more details on using hashes here.

File details

Details for the file metpysdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: metpysdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.9 Windows/10

File hashes

Hashes for metpysdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d3af8d6cf166abce2cbc4e68dd19cff6c8d2d26c597815c87a0d5c3e117f3b
MD5 ee2148c69c564b7a3eedff6f1f231737
BLAKE2b-256 a79b5d0329f48833c90cf939a386d76d9e4d3ed3a3e29d366ff44e197520779d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page