Quotes and pricing
How Tidepool produces a quote, what each amount means and how fees and slippage apply.
Where prices come from
USD prices come from CoinGecko (usd-coin, tether, near, bitcoin, ethereum, tether-gold), cached briefly. If CoinGecko is unreachable, fixed fallback prices are used and /v0/health shows a non-coingecko source. The rate for a pair is priceIn / priceOut, computed with 18 decimals of fixed-point precision and integer (BigInt) maths in base units.
Fees
The fee is taken from the output, in basis points:
| Pair | No API key | Any API key |
|---|---|---|
| Stable ↔ stable (USDC, USDT) | 26 bps | 1 bp |
| Everything else | 45 bps | 20 bps |
The +25 bps for keyless calls mirrors mainnet 1Click. On Tidepool any X-API-Key or Authorization: Bearer value counts as a key.
Amounts in a quote
| Field | Meaning |
|---|---|
amountIn | What you should deposit. |
minAmountIn | The least deposit that will still be swapped. Less than this waits as INCOMPLETE_DEPOSIT and is refunded at the deadline. |
amountOut | Expected output at the quoted price, after fees. |
minAmountOut | amountOut × (1 − slippageTolerance). Settlement below this is refused and refunded. |
*Formatted, *Usd | Human-readable decimals and USD values. |
deadline | Last moment a deposit counts. 60 s to 24 h in the future for live quotes. |
timeEstimate | Seconds to settle after deposit (about 10). |
Live checks
- The maker must hold at least
amountOutof the destination token, or the quote fails withNot enough maker liquidity. - At settlement the worker re-prices. If the new output is below
minAmountOut(pro rata to what was swapped), the deposit is refunded withSLIPPAGE_EXCEEDED. The maker never pays more than the quotedamountOut.
Signature
signature is an ed25519 signature by the maker key over the quote body, prefixed ed25519:. It proves the quote came from Tidepool. It is not a 1Click signature.
Dry vs live
dry: true | dry: false | |
|---|---|---|
| Price and amounts | ✓ | ✓ |
depositAddress | — | ✓ |
| Watched and settled | — | ✓ |
| Deadline rule | any | 60 s to 24 h ahead |