Quote a conversion and return the transactions that execute it
Changed onTakes an intent (chain, input token, output token, base-unit amount) and returns whatever executes it. Routing policy — the slippage floor, the deadline window, which contract is called — therefore changes with a backend deploy rather than a client release, which is what makes the mobile app viable. The client signs through its own wallet; this service never holds a key and never broadcasts.
Two response shapes, discriminated by strategy, and a client must branch on that field before reading any other:
- mint — an input stablecoin on the hub. Returns the approve + mint calls to sign. mint mints to msg.sender and approve names only the spender, so no recipient address is present in these bytes for this service to substitute, which is what lets the client re-derive every call and refuse to sign on a mismatch.
- swapAndMint / swapAndStake — anything else. Returns a solved routing plan, not calldata: this service runs the probe and the numerical solve Li.Fi’s contract-call quoting forces on an exact-input flow, and the client builds its own destination call and makes one Li.Fi request with it. The client never signs bytes this service produced, so this service cannot redirect funds; its influence is confined to the plan’s numbers, each of which the client bounds on both sides.
A 201 means the request was not statically refused, not that the conversion will succeed.
Request
- Base URLhttps://api.dre.app (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"chainId": 8453,
"fromToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"toToken": "0xB4E008A61b5A7A7D0e1aebd639F704d24821Bb2F",
"amount": "100000000",
"fromAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}Response
Calls to sign, or a routing plan to execute
Example response
{
"strategy": "mint"
}Changes
- breaking
added to the response body
oneOflist for the response status - breaking
the response's body type changed from
objectto no type for status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - info
added the new optional request property
- info
added the non-success response with the status
- breaking