# Read Methods

#### getQuote

Returns a read-only price estimate from the aggregator. Use this for quoting expected output in your UI before a user commits to a swap. The SDK automatically resolves common token symbols (`USDC`, `USDT`, `ETH`, `SOL`, `native`) into chain-specific addresses.

```
const quote = await swapClient.getQuote({
  chainIndex: "1",
  fromToken: "USDC",
  toToken: "WETH",
  readableAmount: "100",
  tokenDecimals: 6,
  swapMode: "exactIn",
});
```

#### getSupportedChains

Lists all chains supported by the aggregator. Useful for populating chain pickers.

```
const chains = await swapClient.getSupportedChains();
```

#### getLiquidity

Lists available liquidity sources for a given chain.

```
const sources = await swapClient.getLiquidity({
  chainIndex: "1",
});
```

#### checkApprovals

Checks the current ERC-20 allowance for a wallet against the aggregator spender. You can optionally pass a `spender` address to check against a custom target.

```
const approvals = await swapClient.checkApprovals({
  chainIndex: "1",
  address: "0xYourWallet",
  tokenAddress: "USDC",
});
```


---

# 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/read-methods.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.
