> For the complete documentation index, see [llms.txt](https://docs.clipper.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clipper.exchange/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/overview.md).

# Overview

## Endpoints

Learn more about the different endpoints of Swap API:

* [GET /rfq/pool](/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/pool.md) - Get information about a blockchain network supported by clipper.
* [POST /rfq/quote](/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/quote.md) - Generate potential asset swap quotes. Obtain pricing and essential details for informed decision-making&#x20;
* [POST /rfq/sign](/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/sign.md) - Facilitates blockchain transaction preparation and security by returning the required signature and data. Use it for efficient and secure asset swaps

## Authorization

In order to prevent abuse on the API we implement rate limits on the requests, to overcome these limits as an aggregator get in contact with the support team to get API credentials (user and password) [here](mailto:aggregators@shipyardsoftware.org).

These credentials will be used to authorize every request made in the following endpoints: <mark style="color:orange;">`/rfq/pool`</mark> , <mark style="color:orange;">`/rfq/quote`</mark> and <mark style="color:orange;">`/rfq/sign`</mark>

The API uses the Basic authentication method. You have to include the credentials (<mark style="color:orange;">`username:password`</mark>) in the headers in <mark style="color:orange;">`base64`</mark> format.

Example: If your password is username is <mark style="color:orange;">`clipper`</mark> and your password is <mark style="color:orange;">clipperdocs</mark>

the base64 of <mark style="color:orange;">`clipper:clipperdocs`</mark> is <mark style="color:orange;">`Y2xpcHBlcjpjbGlwcGVyZG9jcw==`</mark>

<mark style="color:orange;">`Authorization`</mark> → <mark style="color:orange;">`Basic Y2xpcHBlcjpjbGlwcGVyZG9jcw==`</mark>

### Errors

#### Common Error Codes

<table><thead><tr><th width="118">Code</th><th>Reason</th></tr></thead><tbody><tr><td>400</td><td>Bad Request - Invalid data in the request</td></tr><tr><td>401</td><td>Unauthorized</td></tr><tr><td>403</td><td>Forbidden Error</td></tr><tr><td>500</td><td>Internal Server Error</td></tr><tr><td>503</td><td>External Service Error</td></tr></tbody></table>

#### Error Format

```json
{
    "errorMessage": "Description of the error",
    "errorType": "Type of the error",
    "errorCode": 422,  // it is returned only when we have a clipper code for the error
    "data": []  // is is returned only when the input data is invalid
}
```

{% hint style="warning" %} <mark style="color:orange;">`error_code`</mark> and <mark style="color:orange;">`data`</mark> are not always present
{% endhint %}

*Examples*&#x20;

1. If we make a request to [quote](/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/quote.md) endpoint and the body does not have the field <mark style="color:orange;">`chain_id`</mark> (required param), the API response will look like similar to this:

```json
{
    "errorMessage": "Invalid input data",
    "errorType": "BadData",
    "errorCode": 422,
    "data": [
        {
            "type": "missing",
            "loc": [
                "chain_id"
            ],
            "msg": "Field required",
            "input": {
                "input_amount": "18000",
                "input_asset_symbol": "ETH",
                "output_asset_symbol": "WBTC",
                "time_in_seconds": 60
            },
            "url": "https://errors.pydantic.dev/2.1/v/missing"
        }
    ]
}
```

2. If we make a request to [quote](/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/quote.md) endpoint and we send an <mark style="color:orange;">`input_asset_symbol`</mark> that clipper does not support, the API response will look like similar to this

```json
{
    "errorMessage": "input_asset_symbol: INVALIDASSET is not supported",
    "errorType": "BadData"
}
```

3. If we make a request to [quote](/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/quote.md) endpoint and we send invalid credentials

```json
{
    "errorMessage": "Auth: Access is forbidden",
    "errorType": "Forbidden"
}
```

#### Clipper Error Codes

These codes appear in the field <mark style="color:orange;">`errorCode`</mark>

<table><thead><tr><th width="112">Code</th><th>Reason</th></tr></thead><tbody><tr><td>422</td><td>Invalid input data</td></tr><tr><td>409</td><td>Quote problems</td></tr></tbody></table>


---

# 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.clipper.exchange/~/changes/Pe3DAbObJ7vk3hibsPW0/disclaimers-and-technical/integrating-with-clipper-rfq/api-reference/overview.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.
