Contents

Chapter 1

Aggregator API

REST API template wrapping multiple DEX aggregators (1inch, 0x, Paraswap, CowSwap) with your own fee layer.

Product 5 of the defi-router store. Part of the CryptoForge DeFi toolkit.

Price: $14.99 | License: MIT | Python: >=3.11 | Framework: FastAPI


Chapter 2

Overview

A production-ready FastAPI backend that aggregates swap quotes from four major DEX aggregators, compares across providers, selects the best route by net output, and injects your protocol fee before returning the swap calldata to the caller.

Key Features

  • Multi-provider aggregation — Queries 1inch, 0x, Paraswap, and CowSwap in parallel
  • Smart ranking — Ranks quotes by dst_amount - (gas_estimate * gas_price) for true best output
  • Protocol fee injection — Configurable BPS fee deducted from swap output, sent to your fee recipient
  • Redis caching — 5-second TTL prevents redundant upstream calls during user quote browsing
  • Multi-chain — Supports Ethereum, Optimism, Polygon, Arbitrum, and Base out of the box
  • OpenAPI docs — Auto-generated Swagger UI at /docs
  • Docker-ready — Production Dockerfile + docker-compose with Redis
Chapter 3
🔒 Available in full product

Architecture

Chapter 4
🔒 Available in full product

Quick Start

You’ve reached the end of the free preview

Get the full Aggregator Api and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $15 →
📦 Free sample included — download another copy for the full product.
Aggregator Api v1.0.0 — Free Preview