Price a same-network asset swap
Prices a swap between two assets on the same network, comparing the sources available and returning the best net rate.
Read-only. It is a POST because it carries a body (the pair, the amount, the tolerance), not because it writes. Nothing leaves any wallet.
The quote does not execute, and executable says so rather than leaving it to be assumed. There is no route that accepts a quote: moving value needs an execution gate that no source currently passes. The absence of that route is the gate, not an omission.
The wallet that receives the outgoing asset is derived from the authenticated client. The body carries the pair and the amount, never a destination: accepting one would let a caller price, and later execute, a swap whose proceeds land somewhere else.
slippage_bps is required and has no silent default. A hidden default would decide, on the client's behalf, how much they accept losing.
min_amount_out travels beside amount_out, never instead of it. Showing only the expected output would make the tolerance disappear from the answer, and the client would compare an optimistic figure against an already-discounted one elsewhere.
Not every network carries a pair. A swap needs both assets settled on the same network, and some networks carry only one of them. A pair no source serves answers a named error, never a zero or an empty quote, so a pair that cannot be served stays distinguishable from a bad price.
quotes_compared and sources_unavailable are counts, never lists. That a comparison happened is worth knowing (the best of three is a different answer from the only one that replied), and the number says it without naming who.
Request
- Base URLhttps://developers.ozav.io/v2
- Auth
- API key in header X-API-Key
- or HTTP bearer
Request body
Example request
{
"chain": "ethereum",
"asset_in": "USDT",
"asset_out": "USDC",
"amount_in": "100000000",
"slippage_bps": 50
}Response
The swap priced.
Changes
No recorded changes to this operation across all 1 revision of this API.