Skip to main content
A Swap converts one stablecoin held in a HIFI Wallet into another. The destination can be the same wallet, a different HIFI Wallet, or an External Wallet - and can be on a different chain than the source. Like Onramp, Offramp, and Bridge, it’s a quote-then-accept flow. For supported pairs check out Supported Onchain Asset.
HIFI sources liquidity from both CEXs and DEXs to ensure the best execution.

Create a swap (quote)

Requires an Idempotency-Key header. Either source.amount or destination.amount can drive the conversion, not both. The source and destination chains are derived from source wallet and destination wallet. Request
Response
quote.expiresAt reflects when the quoted rate was locked in

Accept a swap quote

Checks the source wallet’s on-chain balance against the quoted amount before proceeding. Request
Response
If the source wallet’s balance is too low to cover the quoted amount, this returns a 200 with status: "QUOTE_FAILED" and error: "INSUFFICIENT_BALANCE" rather than an error response

Status

Additional information

Swaps can be routed through an approval workflow before they settle - status shows PENDING_APPROVAL until someone approves it, or REJECTED if it’s declined. The quote is only generated once the transfer request is approved. Accept the quote afterward to kick off the transaction flow.Checkout Transfer Approval for more details.

Getting Help

  • 📧 Email: support@hifi.com
  • 💬 Slack: Message us in our shared Slack channel