Skip to main content
When working with tokens that use bonding curves (like pump.fun on Solana or clanker on Base), you often need to find the bonding curve contract address to interact with the pool before it migrates to a traditional AMM. This cookbook shows you two methods to retrieve bonding curve addresses using Mobula’s API.

Two Methods to Find Bonding Curves

The simplest way - directly get the bondingCurveAddress field:

Method 2: Using token/markets

List ALL pools/markets for a token, then find the bonding curve by matching the pool type with the token’s source:

Understanding Bonding Curves

A bonding curve is a pricing mechanism where token price increases as more tokens are purchased. Many protocols use bonding curves to bootstrap liquidity for new tokens before eventually migrating to traditional AMM pools once a threshold is reached.

Key Concepts

source: The protocol that launched the token (e.g., “pumpfun”, “clanker”, “moonshot”) type: The pool type identifier (e.g., “pumpfun”, “clanker”, “uniswap-v2”) Bonding Curve Pool: When a token’s source matches a pool’s type, that pool is the bonding curve. For example:
  • Token source: “pumpfun” → Pool type: “pumpfun” = Bonding curve
  • Token source: “clanker” → Pool type: “clanker” = Bonding curve

Key Response Fields


Method 1: Using token/details (Simplest)

TypeScript

Python


Method 2: Using token/markets (Advanced)

This method lists ALL pools and finds the bonding curve by matching pool type with token source.

TypeScript

Python


How It Works

Understanding the Matching Logic

When you query token/markets, you get ALL pools for a token:
The bonding curve pool is where type matches source:
  • Pool 1: type: "pumpfun" = source: "pumpfun" ✅ This is the bonding curve!
  • Pool 2: type: "raydium-v4"source: "pumpfun" ❌ This is a migrated pool

Response Structure (token/details)

Response Structure (token/markets)


Protocol-Specific Examples

Pump.fun (Solana)

Clanker (Base)

Moonshot (Solana)

Generic Function for Any Protocol


Advanced: Monitor Bonding Progress


Source to Pool Type Mapping

Common bonding curve protocols and their identifiers:

Best Practices

Use token/details for simplicity: If you only need the bonding curve address, use token/details which directly returns bondingCurveAddress.
Match source with type: When using token/markets, find the pool where type matches the token’s source - that’s your bonding curve.
Bonding curve addresses become inactive: Once bonded: true, the bonding curve pool is no longer active. Token has migrated to a new pool.
Multiple pools are normal: token/markets returns ALL pools for a token (bonding curve + migrated pools). The bonding curve is just one of them.

Troubleshooting

Issue: No pool matches token source

Problem: No pool where type equals token source Solutions:
  1. Token may have completed bonding (check bonded: true)
  2. Token may not have originated from a bonding curve
  3. Use token/details to check bondingCurveAddress directly
  4. Verify token address is correct
Example:

Issue: bondingCurveAddress is null

Problem: token/details returns bondingCurveAddress: null Solutions:
  1. Token has completed bonding - check bonded: true
  2. Token didn’t launch via bonding curve
  3. Check poolAddress for current active pool

Issue: Multiple pools with same type

Problem: Multiple pools found with matching type Solution: This is unusual but possible. Choose based on:
  • Pool with bonded: false (active bonding curve)
  • Highest liquidityUSD
  • Most recent createdAt date

Comparison: token/details vs token/markets


Token Details API

Get bondingCurveAddress directly

Token Markets API

List all pools for a token

Market Details API

Detailed info about specific pools

Swap Execution API

Execute swaps on bonding curves

Get Started

Create a free Mobula API key and start finding bonding curve addresses today!

Need Help?

Telegram

Fast support

Discord

Community

Slack

Enterprise

Email

Contact us