DEX.AG
Search…
Proxy Contract
DEX.AG Proxy Contracts allow your platform to integrate our existing DEX order aggregation with:
  • custom platform fees
  • execute multiple orders in a single transaction
Simply pass a proxy parameter into our existing API/SDK to route trades through your contract instead of sending orders directly to the DEX.
DEX.AG can handle the initial setup and deployment of Proxy Contracts for platforms that would like access to DEX.AG's trade aggregation feature.
To get started, fill out our Proxy Application form.
API Example: Get the best price and order details for 1 DAI paying with ETH
1
https://api-v2.dex.ag/trade?from=ETH&to=DAI&fromAmount=1&dex=best&proxy=<contract address>
Copied!
SDK Example: Get the best price and order details for 1 DAI paying with ETH
1
sdk.getTrade({to: 'DAI', from: 'ETH', toAmount: 1, dex: 'Best', proxy: '<contract address>'})
Copied!
Deploying a DEX.AG Proxy Contract:
Update contract settings:
Example application:
To see an application using the DEX.AG SDK with a Proxy Contract in production, see checkout.dex.ag. You can also fork the application on Github.
Have questions? Talk to us on Discord.
Last modified 1yr ago
Copy link