hero.titlePart1 hero.titleHighlight

hero.subtitle

<250ms
hero.stats.responseTime
99.92%
hero.stats.uptime
521+
hero.stats.projects
140B+
hero.stats.volume

Trusted by the best

Powering the future of decentralized finance

<250ms
Median Response Time
Blazing fast!
99.92%
Uptime
Historical uptime for Oxdefiapi services
4.4%
Revert Rates
Lowest in DeFi
521+
Projects powered by Oxdefiapi APIs
See case studies →
78M+
Transactions
140B+
Volume USD
10M+
Unique wallets

Modular DeFi solutions

Composable DeFi building blocks designed to work seamlessly together

Swap API

Turn any app into a trading platform

Learn more

Gasless API

Say goodbye to "insufficient gas"

Learn more

Trade Analytics API

Keep track of what matters to your business

Learn more

Integrate in 5 minutes or less

Embed crypto trading in your app with just a few lines of code

const main = async () => {
  const sellAmount = parseUnits("1000", await usdc.read.decimals());
  
  // fetch quote
  const quoteParams = new URLSearchParams({
    chainId: client.chain.id.toString(),
    sellToken: usdc.address,
    buyToken: weth.address,
    sellAmount: sellAmount.toString(),
    taker: client.account.address,
  });
  
  const quoteResponse = await fetch(
    "https://api.oxdefiapi.com/swap/allowance-holder/quote?" + 
    quoteParams.toString(),
    { headers }
  );
  
  const quote = await quoteResponse.json();
  console.log("Quote to swap 1000 USDC for WETH: ", quote);
}

main();

Frequently asked questions