Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/src/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ provider failures in one error variant, so the API conservatively emits

`SWAP_ORACLE_UNAVAILABLE` does not assert that a market is closed. It means an
oracle-backed order could not be evaluated because its external context endpoint
was unavailable. Individual order reverts that are not identified as oracle
fetch failures are treated as non-executable liquidity; failures of the overall
quote operation remain `SWAP_QUOTE_FAILED`.
was unavailable and the surviving healthy orders could not fully serve the
request within its price limits. An unavailable order does not block an
otherwise complete healthy route. Individual order reverts that are not
identified as oracle fetch failures are treated as non-executable liquidity;
failures of the overall quote operation remain `SWAP_QUOTE_FAILED`.

Domain codes are assigned at the boundary where the failure is understood.
Detailed dependency logs and the coded response event share the same
Expand Down
12 changes: 9 additions & 3 deletions docs/src/swap-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,15 @@ and execution.
clients. Omitting `chainId` selects Base (`8453`). Use V3 for any other network.

Oracle-backed orders can be temporarily unavailable for evaluation when their
external context fetch fails. Quote endpoints then return HTTP 503 with
`SWAP_ORACLE_UNAVAILABLE`. This is distinct from HTTP 404 `SWAP_NO_LIQUIDITY`,
which means the evaluated order set has no executable capacity for the request.
external context fetch fails. Such orders are excluded from the executable
route. Healthy orders can still serve quotes and calldata, including
slippage-based requests, when they fill the requested amount within the
applicable price limits. If unavailable orders leave the request without a
complete healthy route, the API returns HTTP 503 with `SWAP_ORACLE_UNAVAILABLE`,
including for up-to modes. Without oracle failures, up-to modes still allow
partial fills. This is distinct from HTTP 404 `SWAP_NO_LIQUIDITY`, which means
the evaluated order set has no executable capacity for the request. Selected
orders still require valid oracle context and calldata preflight checks.

### Understanding Price Limits

Expand Down
Loading
Loading