Bungee Auto API Reference
The Bungee Auto API provides endpoints for integrating swaps into your application.
Bungee Auto and the new Bungee API are currently in beta.
Base URL​
https://public-backend.bungee.exchange
This public endpoint is for development and testing only. No authentication is required, but for production use with higher rate limits, contact the Bungee team for dedicated API keys with our dedicated production endpoint.
Available Endpoints​
Endpoint | Description |
---|---|
/tokens/list | Get a list of available tokens |
/tokens/search | Search for specific tokens |
/app/supported-chains | Get a list of supported chains |
/bungee/quote | Get pricing information for swaps |
/bungee/request | Create and submit swap requests |
/bungee/status | Check 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:
- Always capture and log this ID along with the error details
- Include this ID when reporting issues to the Bungee team
- 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}/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.