Openocean crypto swaps through aggregated liquidity
Openocean combines liquidity from decentralized exchanges (DEXs) to quote crypto swaps, using split routes or intermediate tokens when they improve execution. An aggregator compares available paths for the selected assets and network, and trades use wallet authorization and on-chain execution. Its wider toolkit includes cross-chain access, limit orders, recurring purchases, and developer integrations.
The distinction between finding a route and executing a trade shapes its costs and controls. Network support, order conditions, and the chosen integration also determine which features are available for a particular task.
Network selection defines the available swap
Each swap quote concerns a specific network, input token, output token, and amount, so network selection determines which liquidity can contribute. Coverage spans more than 40 networks, including Ethereum, BNB Chain, Arbitrum, Solana, and Sui. Ethereum Virtual Machine (EVM) networks share an execution environment; non-EVM networks use different systems. Solana access through the application programming interface (API) requires an authorized key and whitelisting.
Multi-chain coverage and cross-chain movement describe different functions. A same-chain swap changes assets within one network. Cross-chain access adds a mechanism for moving value between networks and may include swaps around that movement. Chain coverage alone does not establish a particular bridge route, and a token's availability on one network does not establish its availability on another.
Split routes and intermediate tokens change the liquidity path
Routing evaluates candidate paths against liquidity, gas costs, and expected execution. The routing engine can split an order across multiple liquidity sources when doing so improves execution. Splitting distributes the input among venues, while multi-hop routing uses intermediate tokens to connect the input and output assets. Both mechanisms can contribute to the same route.
Uniswap, Curve, Balancer, and PancakeSwap are among the integrated liquidity venues. Request-for-quote (RFQ) sources and private liquidity also contribute to the aggregation model. These sources provide different ways to obtain executable pricing. Their availability follows the selected network and integration, so the overall venue list does not describe every individual swap.
Approvals, signatures, and settlement describe different states
Openocean constructs routes and transaction data for wallet-authorized trades, while the wallet and network handle authorization and execution of the transaction. That model is non-custodial: the aggregator does not hold the assets awaiting a swap. A quote describes an estimated output and a proposed path; it does not establish a completed exchange.
Token approvals govern a contract's permission to spend an asset. The contract needs sufficient allowance where the selected flow requires it. Approval alone does not transfer the requested output asset or prove that trading occurred. The permitted amount and spender define the scope of that authorization.
Permit2 provides a signature-based option for supported Swap API integrations. It still requires adequate token allowance to Permit2; insufficient allowance calls for an initial token approval. The alternative AllowanceHolder mechanism uses a one-time approval without an additional permit signature. The separate Gasless Swap API uses Permit2 signatures on supported chains, with Openocean covering gas for swap execution.
The user signs an ordinary swap transaction, and the application or wallet broadcasts it. Successful on-chain settlement establishes the completed swap. For an EVM same-chain swap, the encoded minimum output limits acceptable execution. Failure to meet that limit reverts the exchange. A reverted EVM transaction can still incur network fees. The execution toolkit also includes dynamic slippage and defenses against maximal extractable value (MEV), which concerns value captured through transaction ordering or inclusion.
V3 and V4 require different input units
V4 is the recommended Swap API version, while legacy V3 uses a different convention for token quantities supplied in a request.
The V4
amountDecimals
field expresses the input amount in the token's smallest units.
V3's
amount
accepts a human-readable token quantity. Values copied between these conventions change meaning.
V4 uses
gasPriceDecimals
for EVM gas prices in wei; V3's
gasPrice
uses GWEI, a gas-price denomination. V4 deprecates
amount
and
gasPrice
. Some examples still show these deprecated fields.
The quoted return and the total swap cost differ
Swap costs combine network charges, liquidity-venue fees, and any charges the selected interface or API integration applies to the transaction. Gas pays for network execution, while liquidity providers' trading fees affect available market rates. Additional hops or split paths can change execution requirements, which is why routing considers gas efficiency alongside output.
Gas estimates describe expected execution costs. Network conditions can change them, and they do not establish a fixed final charge.
The public Swap API lists fees of 0.01% for Stable-to-Stable pairs and 0.1% for pairs involving Correlated assets, excluding Common or Exotic assets. Pairs involving Common assets, with no Exotic asset, carry 0.25%. Pairs involving an Exotic asset carry 0.5%. Same-category trades charge the fee in the output token. Mixed-category trades follow the collection priority Stable, Correlated, Common, then Exotic. This schedule applies to public API swaps.
An integration can add a configured partner fee, and Pro API access can use customized arrangements. Slippage tolerance constrains acceptable execution; it is not a fixed additional fee. Price impact describes the trade's effect on available pricing, and raising slippage tolerance does not remove that impact or improve liquidity.
Trading tools cover orders, yield, and prediction markets
Limit orders target an execution price, while dollar-cost averaging (DCA) schedules recurring trades according to the order's interval and allocation. These tools build on aggregation, with network availability specific to each feature. A limit order also carries an expiration time. Its creation response can indicate a pending order, so acceptance does not establish a fill.
The DCA V2 API supports optional price bounds alongside interval and allocation settings. The DCA V2 API requires an interval of at least 60 seconds between scheduled trades. It specifies per-trade minimums of $30 on Ethereum and $5 on other supported EVM networks. Those minimums concern each scheduled swap, not the total strategy allocation.
Prediction-market access includes a Polymarket integration, while Pendle yield trading and commodity perpetual markets add separate choices, including gold, silver, and oil perpetuals. These offerings address different objectives from a spot token exchange. The Zap API connects token conversion with adding or removing liquidity and supported staking or vault actions. Its scope follows the integrated protocol; a zap capability does not imply access to every pool or vault.
SDKs and widgets embed the aggregation layer
The REST API, software development kit (SDK), and swap widget give applications different ways to integrate aggregation capabilities into their own interface. Direct API access exposes quote and transaction-building data. An SDK packages integration helpers; a widget adds an embedded swap interface with configurable layout, theme, and behavior. The widget supports same-chain and cross-chain experiences. Wallets, trading platforms, and automated tools can use these interfaces without maintaining a separate connection to every integrated DEX.
Network and timing determine the appropriate trading tool
A spot quote describes available pricing; it does not establish that either order will fill under its separate conditions.
- An immediate swap fits an exchange within a supported network when the quoted route matches the intended assets.
- Cross-chain access fits movement to another network when the selected transfer route supports both endpoints.
- A limit order fits a price-conditioned trade on a network its order contract supports.
- DCA fits scheduled trades when each swap meets the applicable minimum amount and interval requirements.
- A widget fits an embedded trading interface when its network coverage and configuration match the required swap or bridge experience.
A direct DEX remains an alternative when its net quote is competitive and no additional route is needed. Aggregation extends the search across liquidity venues. Comparing the same input token, output token, amount, and network keeps that cost comparison meaningful.
Common questions about Openocean
-
Why does the swap app ask me to enable JavaScript?
- The swap app requires JavaScript to run its trading interface. A browser blocking scripts may display an enable-JavaScript message instead of the application. That screen concerns loading the interface; it does not establish that a wallet transaction has failed or that a particular token route is unavailable.
-
Can an API integration restrict routing to selected DEXs?
- V4 supports DEX selection through the enabledDexIds and disabledDexIds parameters. These use venue indices from the network's dexList response, rather than arbitrary exchange names. When both parameters apply, enabledDexIds takes priority. Restricting venues narrows the liquidity the request allows the routing engine to consider.
-
When does a V4 swap response omit transaction calldata?
- The V4 swap API returns quote information without calldata or a transaction body when the request omits account. That field supplies the wallet address for transaction construction. An output estimate in this response does not provide a signable swap transaction or establish that the exchange has executed.
-
What information does the API support ticket require?
- An API support ticket requires a referrer address and the user's wallet address. Its optional fields include the transaction hash, quote details, transaction data, error information, chain, version, and a written question. These details identify the affected request. A support ticket number identifies the inquiry, not a completed swap.
-
How many public Swap API requests can an application send?
- The public Swap API has a default limit of 2 requests per second. Pro access allows customized rate arrangements.