# Swap API Reference

Fanbase.io supports three types of decentralized exchange protocols - a powerful cryptocurrency exchange protocol (ERC20-ERC20) called *Fanbase Aggregate Swap API* which aggregates and compares diverse swap contracts to find you the best decentralized price; a cryptocurrency exchange protocol (ERC20-ERC20) called *Fanbase Pure Swap API* which only searches and compares Fanbase Swap liquidity pools; and an NFT exchange (ERC1155-ERC20) called *Fanbase NFT Swap API* which allows for the swapping, buying and selling of NFTs from your own website, app, extension or dApp.&#x20;

## Aggregate Swap API

The *Fanbase Aggregate Swap API* connects to the Fanbase Swap protocol (Fanbase Factory & Fanbase Router) as well as Uniswap (v2, v3), Sushiswap, Pancakeswap and 1inch API (which aggregates about 90 other contracts), in order to provide powerful exchange functionalities and fetch you the best price possible on the decentralized web.

{% content-ref url="/pages/Jsae1G2syYErgaj0gMEW" %}
[Aggregate Swap API](/docs/reference/swap-api-reference/aggregate-swap-api.md)
{% endcontent-ref %}

## Pure Swap API

The *Fanbase Pure Swap API* connects to the Fanbase Swap protocol (Fanbase Factory & Fanbase Router) in order to provide decentralized exchange functionalities for any tokens which have provided liquidity on Fanbase Swap liquidity pools.

{% content-ref url="/pages/TUXRG8psCT7PGtGdC27g" %}
[Pure Swap API](/docs/reference/swap-api-reference/pure-swap-api.md)
{% endcontent-ref %}

## NFT Swap API

The *Fanbase NFT Swap API* connects you to the Fanbase NFT Swap protocol and provides advanced exchange functionalities between ERC20 fungible tokens (cryptocurrency) and ERC1155 non-fungible tokens (multiple standard).

{% content-ref url="/pages/UHjpl9icVu33FjULfsbB" %}
[NFT Swap API](/docs/reference/swap-api-reference/nft-swap-api.md)
{% endcontent-ref %}


---

# 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://fanbase-io.gitbook.io/docs/reference/swap-api-reference.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.
