# Recommended Swap Composition

For the best user experience, we recommend splitting swap concerns into clear layers:

* **Quoting layer** (`getQuote`, `getLiquidity`, `getSupportedChains`) for pre-trade UI state, chain selection, and route previews.
* **Execution layer** (`buildSwap`, `getApproveTransaction`, `checkApprovals`) when you need fine-grained control over approval UX and transaction lifecycle.
* **Managed layer** (`executeSwap`) when you want the SDK to orchestrate the full flow and only care about the final transaction hashes.

#### Notes

* `executeSwap` is generic and depends entirely on your `executeTransaction` implementation.
* EVM approval orchestration — including revoke-then-approve for USDT-like tokens — is handled internally.
* When using `readableAmount`, token decimals must be supplied by your application or a metadata service.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://city-protocol.gitbook.io/docs/software-development-kit/swap/recommended-swap-composition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
