What you’ll build: A complete trade flow from quote request to settlement.Time required: 10-15 minutesPrerequisites: Basic understanding of EVM wallets and token approvals.
The trading example below uses EVM. Solana RFQ quotes return
solana_tx and blockhash instead of tx.1. Discover Supported Chains and Tokens
Before requesting quotes, identify which chains and tokens Bebop supports. This information changes as new assets are added, so your integration should refresh it regularly.Get Supported Chains
Retrieve the supported blockchains:/pmm/ethereum/v3/quote).
Get Tokens for a Chain
Once you know which chain you want to trade on, retrieve the list of supported tokens:2. Request a Quote
Quotes return the exact price and settlement parameters for your trade. Regular quotes expire typically within 60-75 seconds (depending on the blockchain), so request them when you’re ready to execute.Authentication
You can try the API in demo mode, however, we encourage you to request an API key to get production-grade pricing and higher limits.Basic Quote Request
Direct wallet flow: Use the sending wallet as
taker_address. receiver_address receives the bought tokens and defaults to taker_address.Choosing sell_amounts vs buy_amounts
Choosing sell_amounts vs buy_amounts
- Use
sell_amountswhen you know exactly how much you want to sell (e.g., “Sell 1 WETH”) - Use
buy_amountswhen you know exactly how much you want to receive (e.g., “Buy 5000 USDC”)
Converting human amounts to base units
Converting human amounts to base units
1500000000000000000Understanding the Response
The response below shows the fields that you need for the direct transaction flow.3. Approve the Sell Token
Approve the current quote’sapprovalTarget for the sell amount. Confirm the approval transaction before settlement.
See Token Approvals for the allowance check and approval code.
4. Sign and Broadcast
The/v3/quote response includes a tx object that is ready to submit.
For Permit2 trades through BebopRouter, follow the Permit2 self-execution guide before broadcasting.Partial fills are also supported. See the Partial Fills guide for details.
nonce and chainId. Then sign and broadcast the transaction before the quote expires.
Next Steps
Ready to explore more? Dive into the guides:Token Approvals
Manage token approvals for trading.
Partial Fills
Combine market maker and AMM liquidity.
Multi-Token Trades
Swap multiple tokens in a single transaction.