Skip to Content
EnDocs
Trading API
Overview

Trading API

The swap trading feature provides two integration modes: Instruction Mode and Order Mode. Choose the mode that best fits your integration needs.


Instruction Mode

Integration flow:

  1. Get Quote/swapx/pro/quote
  2. Get Calldata/swapx/pro/swap
  3. Sign Transaction — completed on the client side
  4. Send to Chain — via /swapx/pro/send or directly to the node by the integrator

Characteristics:

  • Offers higher integration flexibility
  • Bitget Wallet returns the contract call’s calldata (for Solana, returns instructions and serialized transaction)
  • Integrators can wrap and customize on top of this

Supported capabilities: Same-chain swap

View Instruction Mode Documentation →


Order Mode

Integration flow:

  1. Get Quote/swapx/order/getSwapPrice
  2. Create Order/swapx/order/makeSwapOrder
  3. Sign Order — completed on the integrator’s side (e.g., self-hosted wallet / custodial signing flow)
  4. Submit Order/swapx/order/submitSwapOrder
  5. Query Order/swapx/order/getSwapOrder

Characteristics:

  • Bitget Wallet handles the complete order lifecycle
  • Integrators do not need to maintain order state

Supported capabilities: Same-chain swap, Cross-chain swap, No-gas capability

View Order Mode Documentation →

Last updated on