Overview
This guide provides a step-by-step overview of integrating Bungee Auto into your application.
Integration Flow
All Bungee integrations follow the four key steps below. For detailed API specifications, see the API Reference.
1. Get a quote
Request a quote from the /bungee/quote
endpoint to receive available routes, fee estimates, and transaction data for your token swap.
2. Handle token approvals
For ERC20 tokens only:
- Auto Mode: Uses Permit2 for gasless approvals (Permit2 tx data is provided in the quote response)
- Manual Mode: Requires standard ERC20 approval transaction (approval transaction data is provided in the quote response and execution data in the build-tx response)
3. Submit the transaction (onchain or gasless)
Auto ERC20
Sign the Permit2 typed data and submit it offchain via /bungee/submit
endpoint
See submit onchain requests to get the transaction data in the quote response and submit ERC20 requests onchain
Auto Native Token
- Transaction data is provided in the quote response
- Submit the request onchain to the Inbox Contract
Manual Routes
Build transaction data via /bungee/build-tx
endpoint and submit onchain
4. Monitor the transaction status
- API Endpoint:
/bungee/status
Track the status of your transaction until completion.
Submit requests with Permit2
Integrate Bungee with Permit2 for ERC20 tokens
Submit requests onchain
Integrate Bungee with the Inbox Contract
API Base URL
The Bungee Auto API is available at:
https://public-backend.bungee.exchange
All API endpoints use this base URL. For details, see the API Reference.
This public endpoint is available for development and testing with a rate limit of 20 requests per minute (RPM). No authentication is required for the public endpoint.
Requesting Production API Access
For production use with higher rate limits, please fill out the Bungee API access request form to request dedicated API keys and access to our production endpoint.
Submission Methods
Bungee Auto requests can be submitted in two ways:
Gasless request with Permit2
This method uses the Bungee Auto API with Permit2 for gasless approvals:
- Get a quote from the Bungee API
- Create a request via the API
- Approve Permit2 contract if needed
- Sign a Permit2 message
- Submit the request with the signature
- Monitor the status via the API
This is the recommended approach for ERC20 tokens as it provides a better user experience by eliminating the need for separate approval transactions. Additionally, it allows for gasless approvals, saving users gas fees and tokens are only transferred if the auction is completed and a transmitter has picked up the request.
For a complete implementation guide, see Permit2 Integration (ERC20).
Inbox Contract
This method uses the Bungee Auto inbox contract to directly submit the request onchain:
- Get a quote from the Bungee API
- Create and submit a request onchain via Inbox contract
- Monitor the status via the API
This method is required for native tokens (ETH, MATIC, etc.) and can also be used for ERC20 tokens if Permit2 is not an option or if the integration is directly onchain.
For a complete implementation guide, see onchain request submission via Inbox Contract.