# Contracts

### Tokens

## Get the details of all the tokens listed on Plentyswap

<mark style="color:blue;">`GET`</mark> `https://api.plenty.network/config/tokens`

This endpoints returns an array of objects where each contains information about a token, like its symbol, name, contract address, FA standard, decimals, icon and chain of origin.

{% tabs %}
{% tab title="200: OK Successfully return list of tokens" %}

```typescript
[
  {
    id: number; // Internal database id of the token
    name: string; 
    symbol: string; // Metadata symbol
    decimals: number; 
    standard: string; // FA Standard
    address: string | null; // Tezos address of the token contract
    thumbnailUri: string | null; // TZIP-12 specified format
    originChain: string; // TEZOS, ETHEREUM or POLYGON
  }
]
```

{% endtab %}
{% endtabs %}

### Pools

## Get the details of all the v2 pools on Plentyswap

<mark style="color:blue;">`GET`</mark> `https://api.plenty.network/config/pools/v2`

This endpoint returns an array of objects where each object contains information about a v2 pool on Plenty, like its Tezos contract address, both the tokens in the pool, its trading fee value and associated VE bribe and gauge contract addresses.

{% tabs %}
{% tab title="200: OK Successfully returned list of v2 pools" %}

```typescript
[
 // key represents the pool contract address
 [key: string]: {
    address: string;
    token1: {
      id: number;
      name: string;
      symbol: string;
      decimals: number;
      standard: string;
      address: string | null;
      tokenId: number | null;
      thumbnailUri: string | null;
      originChain: string;
    };
    token2: {
      id: number;
      name: string;
      symbol: string;
      decimals: number;
      standard: string;
      address: string | null;
      tokenId: number | null;
      thumbnailUri: string | null;
      originChain: string;
    };
    lpToken: {
      address: string;
      decimals: string;
    }
    fees: string; // To get the fee percentage, divide 100 by this value
    type: string;
    gauge: string | null; // Tezos contract address
    bribe: string | null; // Tezos contract address
  }
]
```

{% endtab %}
{% endtabs %}

## Get the details of all the v3 pools on Plentyswap

<mark style="color:blue;">`GET`</mark> `https://api.plenty.network/config/pools/v3`

This endpoint returns an array of objects where each object contains information about a v3 pool on Plenty, like its Tezos contract address, both the tokens in the pool, its trading fee value and associated VE bribe and gauge contract addresses.

{% tabs %}
{% tab title="200: OK Successfully returned list of v3 pools" %}

```typescript
[
 // key represents the pool contract address
 [key: string]: {
    address: string;
    token1: {
      id: number;
      name: string;
      symbol: string;
      decimals: number;
      standard: string;
      address: string | null;
      tokenId: number | null;
      thumbnailUri: string | null;
      originChain: string;
    };
    token2: {
      id: number;
      name: string;
      symbol: string;
      decimals: number;
      standard: string;
      address: string | null;
      tokenId: number | null;
      thumbnailUri: string | null;
      originChain: string;
    };
    feeBps: string; // Basis points
    type: string;
    gauge: string | null; // Tezos contract address
    bribe: string | null; // Tezos contract address
  }
]
```

{% endtab %}
{% endtabs %}


---

# 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://docs.api.plenty.network/endpoints/contracts.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.
