Launch tokens, trade on bonding curves, then graduate to DEX. Simple REST API — no SDK. In production, send x-api-key; writes sign with an EVM privateKey.
From zero to token launch in 3 API calls. In production, include x-api-key on every request.
curl -X POST /api/agent/wallet \
-H "Content-Type: application/json" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet" \
-d '{}'
# Response:
# { "address": "0xABC...", "privateKey": "0xDEF...", "balance": "0" }Save the privateKey (wallet key) — you need it for write operations. In production, include x-api-key on every request.
Send HYPE to your new address. Token creation pays an on-chain creation fee (default 0.01 HYPE) plus gas. Buys/sells also require gas.
curl -X POST /api/agent/create-token \
-H "Content-Type: application/json" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet" \
-d '{
"privateKey": "0xYOUR_KEY",
"name": "MyToken",
"symbol": "MTK",
"description": "An agent-launched token",
"creatorFeeBps": 40
}'
# Response:
# { "success": true, "tokenAddress": "0x...", "creatorFeeBps": 40 }Set creatorFeeBps: 40 (or omit it) — creator fee is fixed at 0.4% and paid to the creator on every buy and sell.
Bonding Curve
Price rises with buys, falls with sells. Constant-product AMM with virtual reserves.
50 HYPE Raised
When the curve accumulates 50 HYPE, it becomes graduation‑ready. Anyone can finalize graduation on-chain (executeGraduation) via POST /api/agent/graduate or the web UI.
Hyperclaw DEX
Liquidity added to Hyperclaw. LP tokens burned forever. Free market.
| Fee | Amount | Recipient | When |
|---|---|---|---|
| Protocol fee | 0.6% | Fee recipient | Every trade |
| Creator fee | 0.4% (fixed) | Token creator | Every trade |
| Creation fee | 0.01 HYPE | TokenFactory owner | Token creation |
| Graduation fee | 1 HYPE | Fee recipient | Graduation |
Note: platform (0.6%) and creator (0.4%) fees are fixed. Creation/graduation fees are on-chain values (defaults shown above).
hyperclaw AI (on the home page) can search tokens, quote trades, check balances, and prepare buy/sell/launch actions. Trades require a wallet confirmation. Token launches are executed by a relayer (gasless) and go live immediately. In production, wallet tools require login.
Skill file (tool list + recommended flows):
GET /skills.mdThis is separate from /skill.md, which documents the REST agent API.
Example prompts:
sell all my $ELONhow much fees did i earn so far?launch Moon Cat $MCAT@hypeclawlive runs as a separate worker process. It polls mentions and replies using the same agent tools as the in-app chat.
Run locally:
npm run twitter-botHealth check: GET /api/twitter-bot/status
Key settings:
TWITTER_BOT_HANDLE (default: hypeclawlive)TWITTER_BOT_NETWORK_MODE (fork|mainnet, default: NEXT_PUBLIC_DEFAULT_NETWORK)TWITTER_BOT_POLL_MS (default: 60000)TWITTER_BOT_MAX_REPLIES_24H (default: 90)ANTHROPIC_MODEL (default: claude-haiku-4-5-20251001)hyperclaw supports multiple agent discovery standards. Point your agent at any of these files.
| File | Standard | Use Case |
|---|---|---|
| /skill.md | Agent Skills | Full API reference — give this to your agent |
| /.well-known/agent.json | A2A Protocol | Machine-readable agent card (Google A2A) |
| /llms.txt | llms.txt | LLM content discovery (844K+ sites) |
There are two layers of auth:
x-api-key header: required when the server is configured with AGENT_API_KEY (always in production).privateKey in the JSON body to sign transactions.# Server auth (prod):
-H "x-api-key: $HYPERPUMP_API_KEY"
# Optional network selector:
-H "x-hyperpump-network: mainnet" # or "fork"
# Writes (create, buy, sell, graduate) sign with a wallet key:
{ "privateKey": "0xYOUR_PRIVATE_KEY", ...params }
# Reads (tokens, quote, wallet balance) do not need privateKey:
GET /api/agent/tokens?offset=0&limit=20Security Note
The private key signs transactions on-chain. Only use keys you control. Never share your main wallet key — generate a dedicated agent wallet via POST /api/agent/wallet.
/api/agent/walletGenerate a new wallet or import an existing one.
New wallet (request body):
{}New wallet (response):
{
"address": "0xABC...",
"privateKey": "0xDEF...",
"balance": "0",
"balanceWei": "0",
"warning": "Store your private key securely. It will not be shown again."
}Import existing wallet (request body):
{ "privateKey": "0xYOUR_PRIVATE_KEY" }Import existing wallet (response):
{
"address": "0xABC...",
"balance": "100.5",
"balanceWei": "100500000000000000000"
}/api/agent/wallet?address=0x...Check HYPE balance of any address.
{
"address": "0xABC...",
"balance": "100.5",
"balanceWei": "100500000000000000000"
}/api/agent/create-tokenCreate a new token on the bonding curve. Pays TokenFactory.creationFee (default 0.01 HYPE) plus gas.
| Param | Required | Description |
|---|---|---|
privateKey | Yes | Your wallet private key |
name | Yes | Token name |
symbol | Yes | Token ticker (alphanumeric, max 12 chars) |
description | No | Token description (max 600 chars) |
image | No | Token image (IPFS CID/ipfs://... or https URL, max 250 chars) |
imageBase64 | No | Upload an image (data URL or raw base64). Requires PINATA_JWT on the server. |
twitterHandle | No | Launch on behalf of a Twitter handle (e.g. @elonmusk) and set it as fee recipient. Requires server relayer (RELAYER_PRIVATE_KEY). |
feeRecipient | No | Launch on behalf of a 0x... address and set it as fee recipient. Requires server relayer (RELAYER_PRIVATE_KEY). |
creatorFeeBps | No | Creator trading tax: fixed at 40 bps (0.4%). You earn this on every trade. |
Response:
{
"success": true,
"txHash": "0x...",
"tokenAddress": "0xNEW_TOKEN",
"creator": "0xYOUR_ADDRESS",
"name": "MyToken",
"symbol": "MTK",
"image": "Qm... (or url)",
"creatorFeeBps": 40,
"gasUsed": "300000"
}/api/agent/tokens?offset=0&limit=20List all tokens with price, progress, and graduation status.
{
"tokens": [
{
"address": "0x...",
"name": "MyToken",
"symbol": "MTK",
"price": "0.00000000003177",
"progressPercent": 3.96,
"graduated": false,
"creatorFeeBps": 40
}
],
"total": 12,
"offset": 0,
"limit": 20
}/api/agent/token?address=0x...&holder=0x...Full token details. Add holder param to include your balance.
{
"address": "0x...",
"name": "MyToken",
"symbol": "MTK",
"price": "0.00000000003177",
"marketCap": "31.77",
"progressPercent": 3.96,
"graduated": false,
"creatorFeeBps": 40,
"creatorFeePercent": 0.4,
"holderBalance": "1000000.0"
}/api/agent/graduateFinalize graduation (moves liquidity to DEX). Requires a wallet tx.
| Param | Required | Description |
|---|---|---|
privateKey | Yes | Your wallet private key |
token | Yes | Token contract address |
Response:
{
"success": true,
"txHash": "0x...",
"token": "0x...",
"pair": "0x... (dex pair)",
"hypeInLP": "50.0",
"tokensInLP": "123456789.0",
"gasUsed": "120000"
}/api/agent/quote?token=0x...&side=buy&amount=5Price quote for buy or sell. Always quote before trading.
| Param | Required | Description |
|---|---|---|
token | Yes | Token contract address |
side | Yes | "buy" or "sell" |
amount | Yes | HYPE amount (for buy) or token amount (for sell) |
Buy response:
{ "side": "buy", "hypeIn": "5", "tokensOut": "151969957.08" }Sell response:
{ "side": "sell", "tokensIn": "50000000", "hypeOut": "1.625" }/api/agent/buyBuy tokens with HYPE on the bonding curve.
| Param | Required | Description |
|---|---|---|
privateKey | Yes | Your wallet private key |
token | Yes | Token contract address |
amountHype | Yes | HYPE to spend (e.g., "5" for 5 HYPE) |
slippageBps | No | Slippage tolerance. 100 = 1%. Range 1-5000. Default 100. |
Response:
{
"success": true,
"txHash": "0x...",
"token": "0x...",
"hypeSpent": "5",
"tokensReceived": "151969957.08",
"protocolFee": "0.03",
"creatorFee": "0.02",
"graduated": false,
"graduationReady": false,
"gasUsed": "95000"
}/api/agent/sellSell tokens for HYPE. Token approval is handled automatically.
| Param | Required | Description |
|---|---|---|
privateKey | Yes | Your wallet private key |
token | Yes | Token contract address |
amountTokens | Yes | Tokens to sell (e.g., "50000000" for 50M tokens) |
slippageBps | No | Slippage tolerance. 100 = 1%. Range 1-5000. Default 100. |
Response:
{
"success": true,
"txHash": "0x...",
"token": "0x...",
"tokensSold": "50000000",
"hypeReceived": "1.625",
"hypeOutGross": "1.6414",
"protocolFee": "0.0098",
"creatorFee": "0.0066",
"gasUsed": "84000"
}Note: hypeReceived is net to the seller (gross minus fees).
/api/agent/analytics?token=0x...&graduated=falseAggregated volume/trades and price history (indexer-backed, may lag).
| Param | Required | Description |
|---|---|---|
token | Yes | Token contract address |
graduated | No | Set true to include DEX trades (default false) |
limit | No | Price history points (50-5000, default 1500) |
Response:
{
"token": "0x...",
"totalVolume": "123.45",
"buyVolume": "80.12",
"sellVolume": "43.33",
"tradeCount": 420,
"uniqueTraders": 1337,
"priceHistory": [{ "timestamp": 1710000000, "price": "0.000000030000000000" }],
"graduationTimestamp": null
}/api/agent/trades?token=0x...&graduated=falseLatest trades (curve, and optionally DEX + graduation event).
{
"token": "0x...",
"items": [
{ "type": "trade", "data": { "isBuy": true, "hypeAmount": "1000000000000000000", "tokenAmount": "..." } }
]
}/api/agent/holders?token=0x...&limit=200&offset=0Top holders (indexer-backed + RPC sync).
| Param | Required | Description |
|---|---|---|
token | Yes | Token contract address |
createdAt | No | Token createdAt (unix seconds). Helps bound initial sync. |
limit | No | 1-500 (default 200) |
offset | No | Pagination offset (default 0) |
refresh | No | Force refresh/sync job (true/false) |
sync | No | Wait for sync to complete (true/false) |
Response:
{
"token": "0x...",
"totalHolders": 1234,
"holders": [{ "holder": "0x...", "balance": "1000000000000000000", "pct": "0.10%" }]
}import requests
import os
BASE = "https://hyperclaw.xyz/api/agent"
HEADERS = {
"x-api-key": os.environ["HYPERPUMP_API_KEY"],
"x-hyperpump-network": "mainnet",
}
# 1. Create wallet
wallet = requests.post(f"{BASE}/wallet", json={}, headers=HEADERS).json()
pk = wallet["privateKey"]
print(f"Address: {wallet['address']}")
# 2. Fund wallet with HYPE (manual step)
# 3. Launch token with 0.4% creator fee (fixed)
token = requests.post(f"{BASE}/create-token", json={
"privateKey": pk,
"name": "AgentCoin",
"symbol": "AGENT",
"description": "Launched by an AI agent",
"creatorFeeBps": 40
}, headers=HEADERS).json()
print(f"Token: {token['tokenAddress']}")
# 4. Buy 5 HYPE worth
buy = requests.post(f"{BASE}/buy", json={
"privateKey": pk,
"token": token["tokenAddress"],
"amountHype": "5",
"slippageBps": 200
}, headers=HEADERS).json()
print(f"Got {buy['tokensReceived']} tokens")const BASE = "https://hyperclaw.xyz/api/agent";
const API_KEY = process.env.HYPERPUMP_API_KEY;
const NETWORK = "mainnet";
if (!API_KEY) throw new Error("Missing HYPERPUMP_API_KEY");
// Create wallet
const wallet = await fetch(`${BASE}/wallet`, {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": API_KEY, "x-hyperpump-network": NETWORK },
body: "{}",
}).then(r => r.json());
// Launch token
const token = await fetch(`${BASE}/create-token`, {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": API_KEY, "x-hyperpump-network": NETWORK },
body: JSON.stringify({
privateKey: wallet.privateKey,
name: "AgentCoin",
symbol: "AGENT",
creatorFeeBps: 40,
}),
}).then(r => r.json());
// Quote before buying
const quote = await fetch(
`${BASE}/quote?token=${token.tokenAddress}&side=buy&amount=5`,
{ headers: { "x-api-key": API_KEY, "x-hyperpump-network": NETWORK } }
).then(r => r.json());
console.log(`Would get ${quote.tokensOut} tokens`);
// Buy
const buy = await fetch(`${BASE}/buy`, {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": API_KEY, "x-hyperpump-network": NETWORK },
body: JSON.stringify({
privateKey: wallet.privateKey,
token: token.tokenAddress,
amountHype: "5",
}),
}).then(r => r.json());# Generate wallet
curl -X POST /api/agent/wallet \
-H "Content-Type: application/json" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet" \
-d '{}'
# Create token
curl -X POST /api/agent/create-token \
-H "Content-Type: application/json" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet" \
-d '{"privateKey":"0xKEY","name":"Test","symbol":"TST","creatorFeeBps":40}'
# Get quote
curl "/api/agent/quote?token=0xTOKEN&side=buy&amount=5" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet"
# Buy
curl -X POST /api/agent/buy \
-H "Content-Type: application/json" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet" \
-d '{"privateKey":"0xKEY","token":"0xTOKEN","amountHype":"5"}'
# Sell
curl -X POST /api/agent/sell \
-H "Content-Type: application/json" \
-H "x-api-key: $HYPERPUMP_API_KEY" \
-H "x-hyperpump-network: mainnet" \
-d '{"privateKey":"0xKEY","token":"0xTOKEN","amountTokens":"50000000"}'All errors return {"error":{"code":"SOME_CODE","message":"Human readable message"}} with an HTTP status code.
| Error | Fix |
|---|---|
| Token has graduated | Trade on Hyperclaw DEX instead |
| Slippage exceeded | Increase slippageBps (try 200-500) |
| Insufficient HYPE balance | Fund your wallet with more HYPE (and leave a bit for gas) |
| creatorFeeBps is fixed at 40 | Creator fee is fixed at 0.4% (40 basis points) |
Chain
HyperEVM
Chain ID
999
Native Token
HYPE (18 decimals)
RPC
Env-driven (mainnet + fork). Default mainnet: https://rpc.hyperliquid.xyz/evm
Explorer
https://purrsec.com
Gas
Buy ~95K, Sell ~84K, Create ~300K
Network selection: send x-hyperpump-network: mainnet|fork (or set cookie hyperpump_network). Default comes from NEXT_PUBLIC_DEFAULT_NETWORK.
Fork RPCs can differ for browser vs server. In the browser, fork RPC calls may be proxied through /api/rpc/fork to avoid CORS/mixed-content issues.