> For the complete documentation index, see [llms.txt](https://city-protocol.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://city-protocol.gitbook.io/docs/neofinance-as-a-service/naas-ecosystem/swap-module/methods-and-capacities.md).

# 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>
