Execute a swap
Executes a token swap from the customer’s WaaS wallet. The routing (on-chain DEX vs cross-chain bridge) is determined automatically — the merchant does not need to know or specify how the swap is fulfilled.
Flow:
- Call
GET /api/v1/swap/quoteto preview the output amounts - Call this endpoint with
amount_out_minset to your slippage floor (fromto_amount_minin the quote) - Check
GET /api/v1/swap/customer/{customerID}/historyor the merchant dashboard for status
The customer wallet must exist (created via POST /api/v1/wallet/customers) and
hold sufficient balance to cover the swap amount plus gas.
Authorizations
Business API key for server-to-server integrations.
Key prefix determines the environment — no separate flag needed:
test_sk_* = sandbox/testnet, live_sk_* = production/mainnet.
Path Parameters
Your internal customer identifier (same value used when creating the wallet)
Body
Amount to swap in base units (integer string)
"1000000"
Source chain (POL, BSC, ETH, ARB, etc.)
"POL"
Token address on source chain, or "native"
"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"
Destination chain
"BSC"
Token address on destination chain, or "native"
"0x55d398326f99059fF775485246999027B3197955"
Minimum acceptable output in base units. Use to_amount_min from the quote.
Omitting this removes slippage protection — always set it in production.
"992047"

