DoritoKit API
/quote - Request a trade quote
Endpoint
Method: POST
URL: https://crunchy.dorito.club/api/quote
Request parameters
Here's a detailed description of the different parameters:
Parameter | Type | Required | Description |
---|---|---|---|
|
| ✅ Yes | The asset being sold (e.g. |
|
| ✅ Yes | The asset being bought (e.g. |
|
| ✅ Yes | Amount in basic units (decimals separated with a dot). |
|
| ❌ No | Limits the possible liquidity providers. |
|
| ✅ Yes | Address of the sender. |
|
| ✅ Yes | Address of the recipient. |
|
| ❌ No | Max slippage in percentage (5 = 5%). |
|
| ❌ No | Affiliate address for revenue sharing. |
|
| ❌ No | Fee percentage in basis points (50= 0.5%). |
|
| ❌ No | Include transaction details in the response. |
Note: Asset names for sellAsset
and buyAsset
should follow the following nomenclature:
Chain.Ticker (e.g.,
"BTC.BTC"
or"ARB.ETH"
)Chain.Ticker-ContractAddress (e.g.,
"ETH.USDC-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
)
This is the identifier
as provided in the /tokens
endpoint.
Example request
A simple request to trade ETH.ETH
to BTC.BTC
may omit the providers
list if you can manage them in the response, but should include the amount, the involved addresses and slippage settings.
The expiration time returned by the endpoint is an estimation. We recommend requesting a new quote at least every minute if the trade has not been executed yet.
Join our Community
Any other questions? Book a Call