Skip to main content

Overview

Unicorn APIs​

Unicorn provides several APIs and data sources to help developers integrate with and build on top of the Unicorn protocol.

Available APIs​

Trading API​

The Unicorn Trading API provides quote generation and transaction building for token swaps across 25+ chains.

  • Trading API Overview - Get started with the Trading API
  • Integration Guide - Complete implementation guide with schemas and best practices
  • Quote & Swap Endpoints - Generate quotes and build unsigned transactions
  • Permit2 Support - Gasless approvals via EIP-712 signatures
  • Cross-Chain Swaps - Multi-step cross-chain swap support

Subgraph API​

The Unicorn Subgraph provides a GraphQL API for querying historical and real-time data from the Unicorn protocol.

Routing API​

The Unicorn Routing API provides optimized trade routes and quotes for swaps.

  • Smart Order Routing - Find the best prices across multiple pools
  • Gas Optimization - Routes optimized for gas efficiency
  • Multi-hop Support - Complex routing across token pairs

Price APIs​

Get real-time and historical price data for tokens on Unicorn.

  • Current Prices - Real-time token prices
  • Historical Data - Price charts and historical trends
  • Pool Information - Liquidity and volume data

Getting Started​

For Developers​

If you're building applications that need to:

  • Execute token swaps - Use the Trading API
  • Query historical trading data - Use the Subgraph API
  • Get optimal swap routes - Use the Routing API
  • Display token prices - Use the Price APIs

For Data Analysis​

The Subgraph API is perfect for:

  • Analytics dashboards
  • Trading strategy research
  • Protocol metrics and insights
  • DeFi research and analysis

Rate Limits and Usage​

  • Subgraph API: Generous rate limits via The Graph
  • Routing API: Production-ready with caching
  • Price APIs: Real-time updates with historical data