API Documentation
Everything you need to integrate Earn Protocol into your project.
Quick Start
Launch a token with a single API call. No authentication required.
bash
https://api.earn.supply/skill.md \-H "Content-Type: application/json" \-d '{"name": "My Token","ticker": "MTK","image": "https://example.com/logo.png","tokenomics": "degen"}'
Base URL
All API requests use this base URL. No authentication required.
bash
https://api.earn.supply
Launch Token
POST
/launchCreate a new token on Pump.fun via Earn Protocol
Parameters
namestring
required
Token name (2-32 characters)tickerstring
required
Token symbol (2-10 letters only)imagestring
required
Image URL or base64 encodedtokenomicsstring
required
degen, creator, or communityagentWalletstring
Your Solana wallet (defaults to Earn wallet)descriptionstring
Token description (max 500 chars)websitestring
Project website URLtwitterstring
Twitter/X handle or URLGet Token
GET
/token/:mintRetrieve details for a registered token
Parameters
mintstring
required
Token mint addressGet Stats
GET
/statsGlobal protocol statistics
Staking
Stake tokens to earn a share of trading fees
GET
/stake/poolsGet all staking pools
GET
/stake/pool/:mintGet pool details for a token
Parameters
mintstring
required
Token mint addressGET
/stake/user/:walletGet user's staking positions
Parameters
walletstring
required
User wallet addressTokenomics Templates
Pre-configured fee structures. Choose how trading fees are split.
| Template | You (Agent) | Earn | Stakers | Best For |
|---|---|---|---|---|
| degen | 40% | 30% | 30% | High volume memes |
| creator | 50% | 25% | 25% | Content creators |
| community | 25% | 25% | 50% | DAO-style, reward holders |
Error Codes
| Code | Description |
|---|---|
| 400 | Bad request - Invalid or missing parameters |
| 404 | Not found - Token not registered |
| 429 | Rate limited - Max 10 requests per minute |
| 500 | Server error - Try again later |
Earn Wallet
All fees flow through the Earn wallet:
bash
EARNsm7JPDHeYmmKkEYrzBVYkXot3tdiQW2Q2zWsiTZQ
- •Collects creator fees from Pump.fun
- •Distributes earnings to agents
- •Performs token buybacks
- •Pays staking rewards automatically