Free Crosschain Swap API | 107+ DEXes, No Wallet Needed

The LeoDex Swap API page header: Swap via API

Lions,

We believe swapping crypto should take nothing more than your own wallet. Now it can run from your own code too.

The LeoDex Swap API is now live and it's a simple API key that is publicly available on https://leodex.io/swap-api. Just hand that link to your agent and it'll set it up for you.

Your app, bot or AI agent can now swap BTC, ETH, SOL, ZEC and more across 40+ chains, through the same routes as leodex.io.


TLDR; If you've ever wanted to wire crosschain swaps into a script, a bot or an AI agent without filling in a signup form, you can now do it with one public key from leodex.io/swap-api, a few plain HTTP calls and your own wallet, with no KYC.

  • A free API key on the page: no signup, no account, no charge per call
  • Three calls, nothing to sign: get a quote, get a deposit address, track the status
  • Wallet mode covers the rest: one call for every offer, one for the transaction to sign
  • Point an AI agent at leodex.io/swap-api.md and it gets the key, the calls and our rules for agents
  • LeoDex never holds your funds. EVER.

What We Shipped

One public key, no signup. The key sits at the top of leodex.io/swap-api. Copy it, send it as a header, and you're calling the API. No account and no KYC on LeoDex.

Wall of chain logos on the LeoDex Swap API page: 40+ chains. One key.

Three calls, any wallet. For crosschain swaps, the deposit flow needs no wallet connection and nothing to sign. You get a quote, ask for a deposit address, send the funds from your own wallet and check the status until it's done.

Wallet mode for every other route. If your app already has a wallet, one call gives you every offer and a second gives you the transaction to sign. Memo-based routes, EVM approvals and same-chain swaps live here, across the same routes as leodex.io, including Chainflip, NEAR Intents, MAYAChain, Relay, Rango, Across, Mayan and BOB Gateway.

Ready for AI agents. Point an agent at leodex.io/swap-api.md: one file with the key, the calls and rules written for agents. Any agent that can make HTTP requests can use it.

The same fee as leodex.io. LeoDex's fee is 0.02% on most stablecoin and same-asset routes and ranges up to 0.45% for other assets based on protocol fees and routes.

Also in this release

  • An OpenAPI 3.1 file at leodex.io/swap-api/openapi.json and a Swap API section in our llms.txt.
  • Quotes work straight from any browser.
  • The public key only reaches swap routes. Anything else gets a clear 403, so a shared key can't touch anyone's account data.
  • JSON errors that say what went wrong and how to fix it.

Why We Shipped It

Our goal with LeoDex is to make swapping feel as easy as a centralized exchange, without the account, the worry about custodian risk or handing over your coins. In an era where Binance is getting hacked for $6B and MEXC is getting cut off by the US Treasury; do you really want to risk leaving your crypto in someone else's hands?

Our mission is to Democratize Financial Knowledge and Access.

A lot of what makes exchanges easy is what people build on them: bots, dashboards, wallets and, lately, AI agents. All of it starts with an API key.

We wanted it to be this short:

  1. Copy the key.
  2. Ask for a quote.
  3. Send from your own wallet.
  4. Track it.

No signup. No KYC. Your own wallet. We've been routing swap protocols since April 2024, and the Swap API puts those routes behind one key.

If we're being completely honest, an exchange API still has one thing on us: your bot can trade a balance that's already sitting there. Here, every swap is a real transfer from your own wallet, so there's a deposit window to hit and a network fee to pay. We think that's the right trade.


We just shipped the LeoDex Swap API


That said, you can easily use AI to make a custom "agent wallet" solution. Robinhood and others are already rolling out these segmented wallet solutions and it's super easy to build one for yourself. Again that YOU own (not us or anyone else). We'll give you the API to make it easy to trade out of that wallet whenever you want, at low fees and across all the crosschain DEXes on the planet.

How It Works

Deposit mode (no wallet connection)

  1. Click "Copy key" at the top of leodex.io/swap-api and send it as the Api-Key header to api.leokit.dev.
  2. GET /quote-deposit with two assets (like BTC.BTC and ETH.ETH) and an amount. You see the price before anything moves.
  3. POST /deposit-address with the quote id, a refund address on the source chain and your receive address. Leave the protocol out and the API picks the deposit route with the best expected output among Chainflip, NEAR Intents and Relay.
  4. Send the exact amount from your own wallet before the address expires.
  5. POST /status until it says success. If a swap fails, the provider refunds your refund address and the status shows refunded.

Three step cards: Get a quote, Send to the deposit address, Track it

Wallet mode (every other route)

  1. GET /quote with the same inputs to see every offer.
  2. POST /deposit with the quote id, the protocol you picked and your addresses to get the transaction to sign.
  3. Sign and broadcast it from your own wallet, then POST /status with the quote id and the transaction id.

Copy-paste samples for curl, JavaScript and Python, plus a prompt for AI agents, are on leodex.io/swap-api.

The curl sample on the LeoDex Swap API page, with the API key blurred

For AI agents

  1. Click "Copy prompt for your AI agent" on leodex.io/swap-api, or point your agent at leodex.io/swap-api.md.
  2. Ask it for the swap you want.
  3. The guide tells your agent to get a live quote, show it to you and wait for an explicit yes before it creates a deposit address. It also tells it never to invent or reuse an address, and never to ask for a private key or seed phrase.
  4. You send the funds from your own wallet.

The For AI agents and bots card on the LeoDex Swap API page

In every mode, LeoDex never holds your funds. They go from your wallet, through the swap protocol, to your own address.

A Few Things to Watch Out For

  • Stablecoins. LeoDex's fee is 0.02% on most stablecoin and same-asset routes. Some routes, such as Chainflip and BOB, charge more on stable pairs.
  • Exact amount, before expiry. Every deposit address has an expiry time. Send the exact amount from a wallet you control before it passes.
  • Deposit mode is for crosschain swaps. Use wallet mode for same-chain swaps, memo-based routes and EVM approvals.
  • Refunds go where you tell them. Use a refund address you control on the source chain. Providers may also screen addresses and refuse or refund swaps.
  • The key can rotate. Take it from leodex.io/swap-api, which always shows the current one.

What's Next

We'd rather hear what you need than guess. Tell us what you're wiring swaps into, which pairs and chains matter to you, and what's missing. We'll expand our support and continue to provide Every Route So You Can Swap the Best One.

Get the key at https://leodex.io/swap-api

If you have any feedback, or want to tell us what you're building, use the "?" help icon on leodex.io to send it directly to us. It helps us (seriously) improve the site.

Onwards 🦁

0.06784126 BEE
0 comments