https://github.com/al-the-bot-father/meteora_dbc_py
Meteora Dynamic Bonding Curve (DBC) with Python
https://github.com/al-the-bot-father/meteora_dbc_py
bonding bonding-curve curve dynamic meteora meteora-dbc python solana swap
Last synced: 2 months ago
JSON representation
Meteora Dynamic Bonding Curve (DBC) with Python
- Host: GitHub
- URL: https://github.com/al-the-bot-father/meteora_dbc_py
- Owner: AL-THE-BOT-FATHER
- Created: 2025-08-04T19:56:54.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-05T20:45:37.000Z (11 months ago)
- Last Synced: 2025-08-23T18:20:38.078Z (10 months ago)
- Topics: bonding, bonding-curve, curve, dynamic, meteora, meteora-dbc, python, solana, swap
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# meteora_dbc_py
Python library to trade on Meteora Dynamic Bonding Curve (DBC).
```
pip install solana==0.36.1 solders==0.23.0
```
Updated: 8/4/2025
# Contact
My Telegram: https://t.me/AL_THE_BOT_FATHER

# Instructions
Clone the repo and use example_buy.py or example_sell.py.
**If you can - please support my work and donate to: 3pPK76GL5ChVFBHND54UfBMtg36Bsh1mzbQPTbcK89PD**
# FAQS
**What format should my private key be in?**
The private key should be in the base58 string format, not bytes.
**Why are my transactions being dropped?**
You get what you pay for. Don't use the main-net RPC, just spend the money for Helius or Quick Node.
**How do I change the fee?**
Modify the unit_budget and unit_price values.
**Does this code work on devnet?**
No.
# Example
```
from solana.rpc.api import Client
from solders.keypair import Keypair # type: ignore
from pool_utils import fetch_pool_from_rpc
from meteora_dbc import buy
# Configuration
priv_key = "base58_priv_str_here"
rpc = "rpc_url_here"
mint_str = "meteora_dbc_address"
sol_in = 0.01
unit_budget = 100_000
unit_price = 1_000_000
# Initialize client and keypair
client = Client(rpc)
payer_keypair = Keypair.from_base58_string(priv_key)
# Fetch pool and execute buy
pool_str = fetch_pool_from_rpc(client, mint_str)
if pool_str:
buy(client, payer_keypair, pool_str, sol_in, unit_budget, unit_price)
else:
print("No pool address found...")
```
```
from solana.rpc.api import Client
from solders.keypair import Keypair # type: ignore
from pool_utils import fetch_pool_from_rpc
from meteora_dbc import sell
# Configuration
priv_key = "base58_priv_str_here"
rpc = "rpc_url_here"
mint_str = "meteora_dbc_address"
percentage = 100
unit_budget = 100_000
unit_price = 1_000_000
# Initialize client and keypair
client = Client(rpc)
payer_keypair = Keypair.from_base58_string(priv_key)
# Fetch pool and execute sell
pool_str = fetch_pool_from_rpc(client, mint_str)
if pool_str:
sell(client, payer_keypair, pool_str, percentage, unit_budget, unit_price)
else:
print("No pool address found...")
```