Skip to main content

Credentials and environments

Test and production use the same endpoints. Traffic gating comes from the credentials:
  • Test credentials (-test suffix, e.g. <maker>-rfqt-test) receive quote requests only when you authenticate with their API key as a Bearer token. General user flow does not route to test credentials. Use these for your self-test loop.
  • Production credentials receive general user flow as soon as you connect and start streaming. Bebop issues production credentials once your integration passes /maker-status.
Test credentials remain usable after promotion. Keep them as a staging channel for iterating without touching production flow.

Testing on mainnet

With streaming and quote responses implemented, run through the following checks on the mainnet of the chain you’re launching on. You’ll need balances and approvals in place to execute a swap. Before moving on, confirm:
1

Pricing connection and streaming

Connect to the Pricing WebSocket and start streaming levels. Confirm no WebSocket error messages come back.
2

Quotes connection

Connect to the Quotes WebSocket. Implement both success responses and appropriate error responses (e.g. when the size requested is too low, or for unexpected errors).
3

Fees handled

Ensure you handle fees as described in Fees.
Next, try /maker-status: see Diagnostics.

Running self-test quotes

To request quotes from your maker only, send a quote request authenticated with your API key as a Bearer token (the same credential used for the WebSocket connection). The key identifies your maker, so the request routes only through your maker. Example:
curl -X GET 'https://api.bebop.xyz/pmm/ethereum/v3/quote?sell_tokens=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&buy_tokens=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&sell_amounts=2000000000000000000000&taker_address=0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6&approval_type=Standard&skip_validation=true&gasless=false' \
  -H "Authorization: Bearer YOUR_API_KEY"
The maker name corresponds to a specific type of request. Naming convention:
  • Self-execution: MAKER_NAME-rfqt
  • Self-execution (fast mode): MAKER_NAME-rfqt-fast

Self-execution quotes

Send a request with gasless: false to test self-execution. Bebop pings your maker for a taker_quote request via the WebSocket. The API response includes a tx object with the calldata to send the order on-chain. See example.

Troubleshooting

If your maker receives no quote requests, or returns InsufficientLiquidity on requests you expected to fill, check in this order:
  1. Streaming pricing? The router only routes to makers streaming current pricing. If you’re not on the Pricing WebSocket with fresh levels, you’re invisible.
  2. Approvals on the settlement contract? The router checks balances and allowances before pinging makers. See Contracts and tokens.
  3. Enough inventory for the requested size? Your streamed levels are capped at your balance and approval. Large requests skip makers without enough.
  4. Using the right maker ID? Each mode has its own maker ID. Make sure your test request authenticates with the API key for the right maker.
  5. Not currently disabled? Check enabled: false in /maker-status; a disable message on your WebSocket is another signal.
When in doubt, /maker-status shows what the router sees from your stream. See Diagnostics.