# 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 %}
