Build on top of IPX with our RESTful API — access market data, trading, and bonding curve endpoints
The IPX API is a RESTful interface that returns JSON responses. It enables developers to build trading bots, portfolio dashboards, analytics tools, and custom integrations on top of the IPX platform. All endpoints operate over HTTPS and are accessible from any programming language.
https://ipx.exchange/api
Bearer token in Authorization header
100 requests / minute per key
JSON request/response bodies
Navigate to Settings → Developer → API Keys and click "Generate New Key".
Path: Settings → Developer → Generate API Key
Critical: Your API secret is shown only once. Copy it immediately and store it securely (e.g., environment variable, secrets manager). If you lose it, you'll need to generate a new key.
Include your API key as a Bearer token in the Authorization header of every request:
const response = await fetch('https://ipx.exchange/api/trading/market', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);Security: Never expose your API key in client-side JavaScript. Always call the API from a server-side environment (Node.js, Python, etc.) or use a proxy endpoint.
The IPX API provides these primary endpoints:
/api/trading/marketReturns current market data for all listed tokens including price, 24h volume, market cap, and price change percentages.
/api/trading/orderbookReal-time order book with bid/ask prices and quantities. Supports depth parameter to control the number of price levels returned.
/api/trading/tradesRecent trade history with timestamps, prices, quantities, and trade direction (buy/sell). Supports pagination via cursor.
/api/trading/chartOHLCV (Open, High, Low, Close, Volume) candlestick data for charting. Supports 1m, 5m, 15m, 1h, 4h, 1d intervals.
/api/bonding-curve/statusCurrent bonding curve state: supply minted, current price, curve progress percentage, and graduation threshold.
/api/bonding-curve/quoteGet a price quote for buying or selling a specific quantity of tokens through the bonding curve. Returns estimated price impact and slippage.
Here's a complete TypeScript example that fetches market data and displays token prices:
// Fetch all market data
async function getMarketData() {
const res = await fetch('https://ipx.exchange/api/trading/market', {
headers: {
'Authorization': `Bearer ${process.env.IPX_API_KEY}`,
'Content-Type': 'application/json',
},
});
if (!res.ok) {
throw new Error(`API error: ${res.status} ${res.statusText}`);
}
const { data } = await res.json();
return data;
}
// Fetch order book for a specific token
async function getOrderBook(tokenAddress: string, depth = 20) {
const params = new URLSearchParams({
token: tokenAddress,
depth: depth.toString(),
});
const res = await fetch(
`https://ipx.exchange/api/trading/orderbook?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.IPX_API_KEY}`,
'Content-Type': 'application/json',
},
}
);
if (!res.ok) {
throw new Error(`API error: ${res.status} ${res.statusText}`);
}
const { data } = await res.json();
return data; // { bids: [...], asks: [...] }
}
// Get a bonding curve quote
async function getBondingCurveQuote(
tokenAddress: string,
amount: string,
side: 'buy' | 'sell'
) {
const params = new URLSearchParams({
token: tokenAddress,
amount,
side,
});
const res = await fetch(
`https://ipx.exchange/api/bonding-curve/quote?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.IPX_API_KEY}`,
'Content-Type': 'application/json',
},
}
);
if (!res.ok) {
throw new Error(`API error: ${res.status} ${res.statusText}`);
}
const { data } = await res.json();
return data;
// { estimatedPrice, priceImpact, slippage, totalCost }
}The IPX API enforces rate limits to ensure fair usage and platform stability:
| Tier | Limit | Window |
|---|---|---|
| Standard | 100 requests | Per minute |
| Market Data | 300 requests | Per minute |
| Trading | 30 requests | Per minute |
Rate limit info is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1711036800When you exceed the limit, you'll receive a 429 Too Many Requests response. Implement exponential backoff in your retry logic.
Instead of polling, receive real-time notifications when events occur. Configure webhooks in Settings → Developer → Webhooks.
trade.executedFires when a trade is executed on any of your watched tokens
token.graduatedFires when a token graduates from the bonding curve to the DEX
price.alertFires when a token price crosses your configured threshold
order.filledFires when one of your open orders is filled (partially or fully)
revenue.distributedFires when a project distributes revenue to token holders
Your webhook endpoint receives a POST request with a JSON payload:
// Example webhook handler (Next.js API route)
import { NextRequest, NextResponse } from 'next/server';
import crypto from 'crypto';
export async function POST(req: NextRequest) {
const body = await req.text();
const signature = req.headers.get('X-IPX-Signature');
// Verify webhook signature
const expectedSig = crypto
.createHmac('sha256', process.env.IPX_WEBHOOK_SECRET!)
.update(body)
.digest('hex');
if (signature !== expectedSig) {
return NextResponse.json(
{ error: 'Invalid signature' },
{ status: 401 }
);
}
const event = JSON.parse(body);
switch (event.type) {
case 'trade.executed':
console.log('Trade:', event.data);
break;
case 'token.graduated':
console.log('Graduated:', event.data.tokenAddress);
break;
// Handle other events...
}
return NextResponse.json({ received: true });
}The API uses standard HTTP status codes. Every error response includes a structured JSON body:
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Not enough USDC to complete this trade",
"details": {
"required": "150.00",
"available": "42.50"
}
}
}| Status | Code | Meaning |
|---|---|---|
400 | INVALID_PARAMS | Missing or invalid query parameters |
401 | UNAUTHORIZED | Invalid or missing API key |
403 | FORBIDDEN | API key lacks permission for this endpoint |
404 | NOT_FOUND | Token or resource not found |
429 | RATE_LIMITED | Too many requests — back off and retry |
500 | INTERNAL_ERROR | Server error — retry with exponential backoff |
Accelerate development with official and community resources:
Official SDK with full type definitions, auto-retry, and WebSocket support.
npm install @ipx/sdkComplete API reference with interactive request builder and example responses.
https://docs.ipx.exchange/apiJoin the #developers channel for support, code sharing, and integration ideas.
discord.gg/ipx-developersMarket data and order books change frequently, but you don't need millisecond freshness for most use cases. Cache responses for 5–15 seconds to reduce API calls and stay within rate limits.
Use exponential backoff for failed requests (1s, 2s, 4s, 8s, max 30s). Always check the Retry-After header on 429 responses. Never retry 400-level errors (except 429) — they indicate client issues.
Generate new API keys every 90 days. Use separate keys for development and production. If a key is compromised, revoke it immediately from Settings → Developer.
Only grant the permissions your integration actually needs. A portfolio tracker only needs Read access — don't give it Trade permissions. This limits damage if the key is leaked.
List endpoints return paginated results. Always check for a 'nextCursor' field and loop until it's null to get all results. Default page size is 50; max is 200.
For real-time data needs, webhooks are far more efficient than polling. They eliminate wasted requests, reduce latency, and won't eat into your rate limit budget.
Problem: Every request returns a 401 error even though you've included an API key.
Check the following:
Authorization: Bearer YOUR_KEY (note the space after "Bearer")console.log(process.env.IPX_API_KEY?.length))Problem: You're hitting rate limits and requests are being rejected.
Solutions to reduce your request rate:
X-RateLimit-Remaining header to preemptively slow down before hitting the limitRetry-After header value before retryingProblem: Requests from your frontend JavaScript fail with CORS errors.
This is expected behavior:
/api/proxy/market) to forward requestsProblem: You've configured a webhook URL but events aren't arriving at your endpoint.
Debug your webhook setup:
Problem: API responses show prices or data that seem outdated.
Considerations:
X-Data-Timestamp response header to see when the data was generatedAutomate budget data ingestion from the API
Manage data room documents programmatically via API
Understand the trading interface before building trading bots
Understand token supply and bonding curves for better API usage
Check out the full API reference or join the developer community