> For the complete documentation index, see [llms.txt](https://docs.nusa.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nusa.io/about/api-references/get-api-quote.md).

# GET /api/quote

## Request <a href="#request" id="request"></a>

| Query Param | Description                                                                                                                                                                                                                         | Example                                                               |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `sellToken` | The token contract address or symbol of the token that you want to sell. Token symbols such as `BNB` or `NUSA` can be provided as a valid `sellToken`. If the provided value is not supported, try using the token address instead. | `sellToken=BNB, sellToken=0xe11F1D5EEE6BE945BeE3fa20dBF46FeBBC9F4A19` |
| `buyToken`  | The token contract address or symbol of the token that you want to buy. Token symbols such as `BNB` or `NUSA` can be provided as a valid `buyToken`. If the provided value is not supported, try using the token address instead.   | `buyToken=BNB, buyToken=0xe11F1D5EEE6BE945BeE3fa20dBF46FeBBC9F4A19`   |
| `network`   | The blockchain network. Acceptable values are `bsc`, `eth`, `polygon`.                                                                                                                                                              | `network=bsc`                                                         |

## Response <a href="#response" id="response"></a>

Result is returned in the `result` field, and if there's any error message, it will be returned in the `error` field. `result` contents are defined as follows:

| Field        | Description                                                                                                                                                                                            |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `network`    | The selected blockchain network.                                                                                                                                                                       |
| `sell_token` | Token metadata for the selected sell token. Example: `"sell_token": { "name": "Binance-Peg BTCB Token", "symbol": "BTCB", "decimals": "18", "address": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c" }` |
| `buy_token`  | Token metadata for the selected buy token. Example: "`buy_token": { "name": "Binance-Peg BUSD Token", "symbol": "BUSD", "decimals": "18", "address": "0xe9e7cea3dedca5984780bafc599bd69add087d56" }`   |
| `price`      | The current price. The amount of `buy_token` that you will receive for 1 `sell_token`.                                                                                                                 |

## Example

Request: GET

```
https://api.nusa.finance/api/quote?sellToken=BTCB&buyToken=0xe9e7cea3dedca5984780bafc599bd69add087d56
```

Response

```
{
    "result": {
        "network": "bsc",
        "sell_token": {
            "name": "Binance-Peg BTCB Token",
            "symbol": "BTCB",
            "decimals": "18",
            "address": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"
        },
        "buy_token": {
            "name": "Binance-Peg BUSD Token",
            "symbol": "BUSD",
            "decimals": "18",
            "address": "0xe9e7cea3dedca5984780bafc599bd69add087d56"
        },
        "price": "22868.882110165316"
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.nusa.io/about/api-references/get-api-quote.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
