# Swap API

### Introduction:

[OpenOcean Swap API](https://apis.openocean.finance/developer/apis/swap-api/api-v4) is a **multi-chain DEX aggregation and smart order routing API** that gives developers access to the **best token swap prices** and seamless on-chain execution. With a single integration, you can add crypto trading directly into your application - ideal for **wallets, DeFi dApps, trading bots, or institutional platforms, etc**.

It helps you:

* **Find the best swap prices** across 1,000+ liquidity sources, including AMMs (e.g. Uniswap V4, Balancer V3, PancakeSwap Infinity, Curve), RFQ and DeFi launchpads (e.g., Virtuals, PumpFun).
* **Execute trades on-chain** with just a few lines of code.
* **Support the most chains - 40+ chains**, covering both EVM and non-EVM networks such as Solana and Sui.

With OpenOcean, you get **deep liquidity, high reliability, and developer-friendly integration** to power trading at scale.

### API Plans & Pricing

* **Public Plan**: 2 RPS (20 requests / 10 seconds).
* Exceeding the limit may result in rate limiting or temporary blocking.
* **Swap Fees**: It is flexible and may vary depending on use case and integration. **On Solana, the Swap API starts from FREE.**
* **Trial Period**: 2-week free testing available for builders - contact our BD team in the [API group](https://t.me/OpenOceanAPI).
* **Enterprise Plan**: For higher RPS and business collaboration, submit a request [form](https://openocean.larksuite.com/share/base/form/shrusY4ukLSoP6htyoprXgZiiQc).

<mark style="color:$danger;">\*If you are using our API for arbitrage strategies and Non-EVM chains such as Solana, please reach out directly to</mark> [<mark style="color:$danger;">Telegram</mark>](https://t.me/OpenOceanAPI) <mark style="color:$danger;">or</mark> [<mark style="color:$danger;">Discord</mark>](https://discord.gg/cxK6CCYcGp) <mark style="color:$danger;">for tailored services and whitelist.</mark>

### API Referral Program

Earn rewards by referring your frens or projects to integrate OpenOcean’s powerful API — the fastest and most precise DEX aggregation solution. Whether you're a builder, partner, or community member, share us and get rewarded on every successful integration.

Start growing with OpenOcean — let’s build the future of DeFi together! 🌊\
\
To learn more about the rewards, reach out to our BD in the [API group](https://t.me/OpenOceanAPI).

### Get Started

{% content-ref url="swap-api/api-v4" %}
[api-v4](https://apis.openocean.finance/developer/apis/swap-api/api-v4)
{% endcontent-ref %}

{% content-ref url="swap-api/api-v3" %}
[api-v3](https://apis.openocean.finance/developer/apis/swap-api/api-v3)
{% endcontent-ref %}

{% content-ref url="swap-api/advanced-usage/gmx-exclusive-api" %}
[gmx-exclusive-api](https://apis.openocean.finance/developer/apis/swap-api/advanced-usage/gmx-exclusive-api)
{% endcontent-ref %}

{% content-ref url="swap-api/sdk" %}
[sdk](https://apis.openocean.finance/developer/apis/swap-api/sdk)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apis.openocean.finance/developer/apis/swap-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
