What Rubic API is used for
Rubic API is designed to help developers:- build token swap functionality
- support cross-chain transfers
- aggregate liquidity from multiple providers
- handle both EVM and non-EVM blockchains through a single API
- avoid direct integration with multiple DEXes and bridges
Who Rubic API is for
Rubic API is intended for:- wallets
- DeFi applications
- aggregators
- trading interfaces
- backend services executing swaps on behalf of users
Supported execution models
Rubic API supports different execution models depending on the selected route and blockchain combination:- EVM contract-based swaps
- EVM deposit-based swaps
- non-EVM native transactions (TON, TRON, Solana, Sui)
- manual deposit-based execution for non-EVM routes
Core integration flow
A typical integration with Rubic API consists of three main stages:- Quote
- Swap
- Transaction status tracking
Step 1: Quote
The quote endpoints are used to calculate possible swap routes and expected output amounts. At this stage, the API:- evaluates available DEXes, bridges, and providers
- calculates output amounts and fees
- returns route information and estimated results
Step 2: Swap
The swap endpoints are used to request execution data for a selected route. At this stage, the API:- recalculates the output amount
- returns the exact data required to execute the swap
- provides execution instructions depending on the route type
Step 3: Transaction status check
After execution is initiated, the integrator can track swap progress using the provided identifiers. Transaction status tracking allows:- monitoring cross-chain execution
- checking whether the destination transaction was completed
- handling partial execution or failures
Typical integration flow
- User selects tokens and amount
- Application requests a quote
- User confirms the quote
- Application requests swap execution data
- Application executes the transaction or deposit
- Application tracks transaction status until completion
Important notes
- Quotes are not guaranteed and may change
- Swap execution may return updated amounts
- Integrators must handle user confirmations explicitly
- Execution logic differs by provider and blockchain