Integrate Same-chain Swap
Same-chain swap exchanges one token for another on the same blockchain. When fromChain == toChain, you are in a same-chain scenario. Bitget Wallet offers two integration paths—choose based on who handles signing and broadcast:
| Approach | Best for |
|---|---|
| Sign and broadcast yourself | Higher flexibility; you handle signing and broadcast |
| Platform-managed order flow | Create and submit orders via API; no order state to maintain |
Sign and Broadcast Yourself
Bitget Wallet returns contract call calldata (for Solana, instructions and serialized transaction). Integrators can wrap and customize on top, then complete signing and broadcast via their own RPC node or /bgw-pro/swapx/pro/send.
Integration Flow
- Get Quote —
/bgw-pro/swapx/pro/quote - Get Calldata —
/bgw-pro/swapx/pro/swap - Sign Transaction — completed on the client side
- Send to Chain — via
/bgw-pro/swapx/pro/sendor directly to an RPC node
Characteristics
- Higher integration flexibility
- Integrator handles signing and broadcast
- Supported capabilities: Same-chain swap
API Reference
Platform-Managed Order Flow
The process is split into steps; Bitget Wallet handles the full order lifecycle, and integrators submit signed transactions via API without maintaining order state.
Integration Flow
- Get Quote — Call
/bgw-pro/swapx/order/getSwapPricefor estimated output and fees - Create Order — Call
/bgw-pro/swapx/order/makeSwapOrderto create an order and receive transaction data - Sign Transaction — Completed on the integrator side (e.g., self-hosted wallet / custodial signing)
- Submit Order — Call
/bgw-pro/swapx/order/submitSwapOrderwith the signed transaction - Monitor Status — Poll
/bgw-pro/swapx/order/getSwapOrderto track completion - Check reconciled fees (optional) — Call
/bgw-pro/swapx/order/checkOrdersFeeto batch-query reconciled fees
Characteristics
- Bitget Wallet handles the complete order lifecycle
- Integrators do not need to maintain order state
- Supported capabilities: Same-chain swap, NoGas
API Reference
Related Docs
Last updated on


