# Methods and Capacities

City Protocol's swap client uses method-level separation to cleanly divide discovery, building, approval, and execution. This structure reduces integration surface area and mirrors established SDK design standards used in traditional trading infrastructure.

<table><thead><tr><th width="211.56640625">Method</th><th width="140.828125">Scope</th><th>Description</th></tr></thead><tbody><tr><td><strong>getQuote</strong></td><td>Price Discovery</td><td>Returns a read-only quote estimate including output amount, price impact, and aggregator route. Does not commit any state change.</td></tr><tr><td><strong>buildSwap</strong></td><td>Transaction Building</td><td>Fetches the swap transaction payload from the aggregator with configurable slippage, gas level, and swap mode (<code>exactIn</code> or <code>exactOut</code>).</td></tr><tr><td><strong>getApproveTransaction</strong></td><td>Allowance Management</td><td>Returns ERC-20 approval transaction calldata for a given token and amount, ready to be signed by the user's wallet.</td></tr><tr><td><strong>checkApprovals</strong></td><td>Allowance Management</td><td>Checks token allowance for a wallet, with optional explicit <code>spender</code> parameter for custom integrations.</td></tr><tr><td><strong>getSupportedChains</strong></td><td>Network Discovery</td><td>Lists all chains supported by the underlying aggregator.</td></tr><tr><td><strong>getLiquidity</strong></td><td>Network Discovery</td><td>Lists available liquidity sources for a specified chain index.</td></tr><tr><td><strong>executeSwap</strong></td><td>End-to-End Execution</td><td>Orchestrates approval lookup, stale-approval handling, swap build, and final execution via a developer-supplied callback.</td></tr></tbody></table>


---

# 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/neofinance-as-a-service/swap-module/methods-and-capacities.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.
