Quote a trade on Canton DEXes
quoteBest execution for selling amount of token sell (or amount_usd worth) for token buy, on
every venue that can make the trade on its own markets in one or two swaps: an AMM pool (Cantex,
Tradecraft, OneSwap, Pool Party), an order book (Temple, Rocky), or two of them in a row on the same
venue (Temple: CC to USDCx, then USDCx to CBTC; Pool Party: CC to USDC.B, then USDC.B to CBTC). The
same comparison as the site's best execution, at any size. Pool fees, book fees and price impact are
included; after_network_fee also takes off the venue's per-trade network fee on each swap (the fee
table, with which fees are measured, documented or assumed, is in network_fees). A pool whose
reserves have stood still while its price left the market is no market here (not_trading). A
venue whose route takes an order book that shows more of a token than exists (a side larger than its
registry's total supply) carries book_shows_more_than_exists: its price, not a size it can fill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | Symbol of the token bought, e.g. USDCx | |
| sell | Yes | Symbol of the token sold, e.g. CC | |
| amount | No | How much of the sold token, in its own units. Give this or amount_usd, not both | |
| amount_usd | No | Size of the sale in US dollars at our price of the sold token. Give this or amount, not both |