Skip to main content

Bungee API Reference

The Bungee API provides endpoints for integrating swaps into your application.

Integration Types & Endpoints

We support three types of API integrations. Depending on your integration method, authentication and rate limits will differ.

Use the public sandbox for quick testing and development. For production integrations, please contact the Bungee team to request access: https://forms.gle/z3q5RdXjouuXR85k9

Public Sandbox — For Testing Only

  • Endpoint: https://public-backend.bungee.exchange/
  • Who this is for: Developers or teams who want to quickly try out APIs without setup.
  • Key facts:
    • No authentication or whitelisting
    • Very limited RPS (shared/public)
    • Not suitable for production

Dedicated Backend Integrators

  • Endpoint: https://dedicated-backend.bungee.exchange/
  • Who this is for: Projects that run their own backend servers and call our APIs server-to-server (typically a single IP or small range).
  • Key facts:
    • Auth: API key via x-api-key
    • Default 20 RPS (extendable)
    • Limits enforced at the API key level

Frontend / Direct Integrators

  • Endpoint: https://backend.bungee.exchange/
  • Who this is for: Projects that call Bungee APIs directly from their frontend, apps, or mobile clients.
  • Key facts:
    • Auth: Domain/IP whitelist (no API key)
    • Default 100 RPM per IP
    • Limits enforced at the IP level

Comparison Table

Integrator TypeEndpointAuthenticationRate LimitEnforcement MethodUse Case
Sandbox (Public)https://public-backend.bungee.exchange/NoneVery LimitedShared/PublicTesting only
Dedicated Backendhttps://dedicated-backend.bungee.exchange/API Key20 RPS (extendable)API key–basedProduction backends
Frontend / Directhttps://backend.bungee.exchange/Whitelisted Domains100 RPMIP–basedFrontends, dApps, wallets

Available Endpoints

EndpointDescription
/api/v1/supported-chainsGet a list of supported chains
/api/v1/tokens/listGet a list of available tokens
/api/v1/tokens/searchSearch for specific tokens
/api/v1/bungee/quoteGet pricing information for swaps
/api/v1/bungee/submitSubmit swap requests
/api/v1/bungee/build-txBuild transaction data for Bungee Manual
/api/v1/bungee/statusCheck the status of submitted requests

Server Request ID

All responses include a server-req-id header that can be used for debugging purposes when contacting support. When encountering any errors or unexpected behavior:

  1. Always capture and log this ID along with the error details
  2. Include this ID when reporting issues to the Bungee team
  3. Add the ID to any error messages shown to users to facilitate troubleshooting

Example of capturing the server-req-id in error handling:

async function getQuote(params) {
const url = `${BUNGEE_API_BASE_URL}/api/v1/bungee/quote`;
const queryParams = new URLSearchParams(params);
const queryUrl = `${url}?${queryParams}`;
const response = await fetch(queryUrl);
const data = await response.json();
const serverReqId = response.headers.get("server-req-id");

if (!data.success) {
throw new Error(
`Quote error: ${data.statusCode}: ${data.message}. server-req-id: ${serverReqId}`
);
}

return data.result;
}

The server-req-id provides the Bungee team with crucial information to trace the exact request through their systems, significantly improving debugging efficiency and resolution time.