Openocean

Openocean Swap API public and Pro access

Openocean offers public and Pro Swap API access for applications requesting DEX quotes and constructing wallet-signed swaps. Public access has a documented default limit of 2 requests per second and token-category trading fees. Pro access supports arrangements for higher limits or customized fees. The choice concerns request capacity, charging terms, and the controls an integration must implement.

Last updated

API versions and commercial tiers describe different things. V4 is the recommended interface, while V3 is the legacy option. Choosing a tier leaves separate questions about token units, recipients, and the conditions a transaction must satisfy.

In short: The two-week trial allows throughput below 10 requests per second; ongoing Pro limits and fees require separate commercial terms.

Public capacity and Pro terms shape the access choice

Public access supplies the standard Swap API service, while Pro access addresses higher request demands and customized fee arrangements. Quote refresh frequency and concurrent application requests determine whether the public default fits the intended workload.

The public request limit

The default public limit is 2 requests per second (RPS). That limit concerns API requests, so it does not promise two completed swaps each second. An application needs to account for its quote traffic and transaction-building requests when assessing capacity. The public trading-fee schedule remains relevant even when request volume stays below the limit.

Pro access and trial conditions

Pro access addresses integrations needing higher limits or customized fee arrangements. All builders can request a two-week free trial with throughput below 10 RPS. Ongoing Pro service has its own commercial terms. Compare the proposed production limit and fee terms separately; the trial does not establish either one.

V4 supplies the shared quote and transaction interface

V4 is the recommended Swap API version, and Enterprise access uses the same V4 interface. Access tiers therefore concern service terms rather than separate API generations. A quote request returns pricing and route information, while a swap request supplies a transaction body when the required wallet account is present. The application or wallet then signs and broadcasts the transaction. V4 also accepts enabledDexIds and disabledDexIds , with enabledDexIds taking precedence when both are supplied. Those settings select or exclude DEXs for the request, using indexes from the selected chain's dexList response.

V4's quote and swap endpoints deprecate amount and gasPrice in favor of amountDecimals and gasPriceDecimals , which take the token amount in smallest units and, on EVM chains, the gas price in wei. Mixing display amounts with smallest-unit integers changes the requested trade size, so the integration must apply the input token's actual decimals. Public and Pro access do not change those parameter meanings. DEX aggregation remains the mechanism supplying the quote, independently of the commercial access decision.

Public trading fees follow token-pair categories

The public Swap API uses a tiered trading-fee schedule organized around token categories. These percentages concern trading through public access, separately from network gas. The schedule identifies Stable, Correlated, Common, and Exotic categories, with the applicable pair determining the rate. A customized Pro arrangement needs its own fee comparison.

Stable and Correlated pairs

The public Swap API lists a 0.01% trading fee for Stable-to-Stable pairs. USDC and USDT form a documented example. Correlated pairs carry a 0.1% rate, covering Stable-to-Correlated and Correlated-to-Correlated trades. ETH and stETH are Correlated examples. The pair classification determines the rate, so the presence of a stablecoin alone does not make a mixed pair eligible for the Stable-to-Stable rate.

Common and Exotic pairs

Common trades carry a 0.25% rate, and the category covers the top 200 tokens by market capitalization identified through CoinGecko, excluding Stable and Correlated tokens. Its pair families include Stable-to-Common, Correlated-to-Common, and Common-to-Common. Exotic pairs carry a 0.5% rate, covering trades between an Exotic token and a Stable, Correlated, Common, or another Exotic token. Market-cap rankings can change, so an earlier Common classification does not settle a later trade's fee.

Same-category trades charge the fee in the output token, while mixed-category trades charge the fee in the token from the higher-priority category: Stable, Correlated, Common, and Exotic, in that order. The fee rate and the charging token are distinct details when comparing an expected swap return.

Referrer settings introduce a separate fee decision

The optional referrerFee parameter lets an integrator configure a trading charge between 0.01% and 5% of the input token, using percentage units. This charge belongs to the integration's fee configuration and needs consideration alongside public trading fees or customized Pro terms. For same-category public trades, the standard fee uses the output token; a configured referrer charge uses the input token.

The referrer field expects an externally owned account (EOA) address identifying the integration. With no fee set up, the address can serve purely as tracking. Supplying it does not automatically establish a percentage charge. Revenue-sharing terms separately govern how much of a configured fee the integration retains.

Slippage and price impact require different controls

Execution controls apply independently of the chosen access tier. Slippage defines acceptable movement during execution, while price_impact reports estimated price deviation. The distinction affects which conditions an integration evaluates before presenting a transaction for signing.

The V4 slippage parameter

V4 accepts slippage values from 0.05 to 50, expressed as percentages, with a default of 1%. This range describes accepted parameter values without recommending a wide tolerance. Raising the tolerance widens the movement the transaction can accept relative to its quote.

Integrator price-impact thresholds

Openocean does not automatically block execution because the reported price impact is high. An integration must evaluate that estimate and implement its own threshold if it intends to reject such trades.

The minOutput condition

V4 supports minOutput on Base, BNB Chain, and Ethereum. It specifies a minimum output amount in the target token's smallest units. Execution fails when actual output falls below that value. This network-specific option does not establish identical support across every integrated chain.

Account and sender settings define transaction roles

The account field supplies the wallet address needed for transaction calldata from the V4 swap endpoint. Without it, the endpoint returns quote information only. When sender is present, it identifies the caller, and account identifies the receiver. Otherwise, account occupies both roles. These settings matter when a product constructs a swap with separate calling and receiving addresses.

The address fields identify transaction roles without providing a wallet signature or authorizing token spending, and API access does not grant control of wallet funds. Spending authorization and transaction signing remain separate requirements from the ability to obtain a response under an access plan.

Graphic: Openocean - Account and sender settings define transaction roles

View full-size image

Gas estimation remains separate from access pricing

Network gas pays for on-chain execution and remains separate from API trading fees. V4 returns estimatedGas as a reference estimate, so the transaction still needs gas estimation appropriate to its selected network and actual transaction body. A successful API response alone does not establish that the proposed transaction will execute.

Gas limits concern the execution budget, while gas prices reflect network charging conditions. An integration can estimate the constructed transaction through its own provider and allow suitable execution headroom. Network gas prices can change between construction and broadcast, so a stale value can contribute to failure. These costs remain relevant when evaluating customized Pro fees.

Network permissions qualify the commercial access choice

An integration must satisfy the permissions for its chosen network and feature, independently of its public or Pro access terms. Solana Swap API access requires whitelisting and an authorized API key; selecting a commercial tier alone does not establish that authorization. A Solana integration therefore needs to include network eligibility alongside its request-capacity and fee requirements.

Gasless API availability is also chain-specific, with BNB Chain and Base among its supported networks. Gasless support belongs to that separate API capability. It does not make every ordinary Swap API transaction on those networks free of gas requirements. Broader multi-chain coverage likewise does not establish identical access conditions or feature availability on each chain.

Widgets and order APIs address different integration work

The Swap Widget provides an embeddable component for swaps and bridging, with wallet support and configurable layout, theme, and behavior. It suits an integration needing those functions inside an existing product. Direct REST integration leaves the application responsible for requesting quotes and transaction bodies. Choosing between those paths concerns interface work and customization, separately from choosing request limits and fee terms.

Visual summary: Openocean - Widgets and order APIs address different integration work

View full-size image

Limit orders target an execution price, while dollar-cost averaging (DCA) schedules recurring purchases on supported networks. Openocean exposes them as separate API families. The Limit Order API uses v2 paths to create, manage, and cancel orders. The v2 label belongs to the order interface; V4 remains the recommended Swap API version. Likewise, cross-chain capability in the widget does not establish that a chain-specific V4 request implements every bridge flow.

Support records identify quote and swap problems

The Ticket API accepts support requests for quote and swap errors, requiring a referrer address in the request path and a user wallet address in account . Optional fields can hold the chain, API version, transaction hash, question, quote data, transaction data, and error information. A transaction hash applies when a transaction exists; a quote-only issue can supply request and error details. The returned ticket code identifies a support request without establishing a resolved problem or completed swap.

Neither the required account field nor the referrer field requests a private key.

Access selection follows the workload and charging terms

Public access fits a workload within its default request limit when the standard fee schedule meets the integration's requirements. Pro access addresses a need for higher throughput or customized commercial terms. Both use API responses to supply the wider swap flow; network permissions and transaction controls remain separate conditions.

Visual summary: Openocean - Access selection follows the workload and charging terms

View full-size image

  • Compare quote-refresh and transaction-building traffic with the public default of 2 RPS.
  • Choose Pro terms when higher capacity or customized fees are required, using the proposed production limits.
  • Treat the two-week trial's throughput below 10 RPS as a trial condition.
  • Compare public token-category fees and any configured referrer charge with the applicable Pro arrangement.
  • Include required chain authorization, wallet signing, and transaction controls in either integration.

The access choice remains suitable only while its workload, charging terms, and network eligibility continue to match the application.

Still wondering about Openocean?

How does V4 reverseQuote change the meaning of the token fields?

V4 reverseQuote places the token to receive in inTokenAddress and the token to sell in outTokenAddress. Those positions reverse the frontend's usual sell-to-buy orientation. The requested amount describes the target token to receive, and the endpoint calculates the required sell amount. Integrations must preserve that orientation when interpreting the response.

Where does a V4 integration obtain token decimal metadata?

The V4 tokenList endpoint returns token records containing decimals, addresses, symbols, and chain information. Decimals determine how a human-readable token amount converts into the smallest-unit integer required by amountDecimals. Use the metadata for the actual token on the selected chain; a familiar symbol alone does not establish the contract or decimal precision.

What does getTransaction return for an API swap?

V4 getTransaction returns recorded transaction details for an Openocean contract transaction hash on the specified chain. Its response includes status, sender, receiver, input and output token addresses, amounts, and fee information. Interpret the returned status when assessing execution; receiving a response or knowing the hash alone does not establish a successful swap.

Is AllowanceHolder an alternative to Permit2 for token approvals?

For supported ERC-20 swaps, AllowanceHolder is an alternative requiring a one-time token approval without a separate permit signature, while Permit2 SignatureTransfer uses an EIP-712 signature and requires a token approval when the existing Permit2 allowance is insufficient, regardless of whether the integration uses public or Pro API access.

Can V4 swap calldata be decoded through the API?

V4 decodeInputData accepts transaction input data and a method parameter through GET or POST. It returns decoded swap information such as the source token, destination token, receiver fields, amount, minimum-return fields, and calls. Decoding helps identify what the transaction describes; it does not establish that the swap has executed or that its conditions will succeed.