Skip to main content

Overview

Mobula’s Execution APIs provide a unified interface to execute trades across decentralized exchanges:

Swap API

Spot Trading
  • Cross-chain token swaps
  • Best price routing
  • Slippage protection
  • Transaction building

Perps API

Perpetual Trading
  • Leverage positions
  • Cross-margin support
  • Order management
  • Position tracking

TypeScript SDK

For the best developer experience, use the official TypeScript SDK:
npm install @mobula_labs/sdk
import { MobulaClient } from '@mobula_labs/sdk';

const client = new MobulaClient({ apiKey: 'your-api-key' });

// Get swap quote
const quote = await client.getSwapQuote({
  chain: 'ethereum',
  fromToken: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
  toToken: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
  amount: '1000000000000000000',
  slippage: 0.5
});

SDK Documentation

Full type safety, all REST methods, and utility functions included

API Endpoints

Demo API

demo-api.mobula.io
  • No signup required
  • Rate limited (for testing only)
  • Perfect for exploring the API

Production API

api.mobula.io
  • Requires free API key
  • Higher rate limits
  • Production-ready
Getting Started: You can test all endpoints using demo-api.mobula.io without any signup. For production use, generate a free API key to use api.mobula.io.