Page cover image

Contracts

API endpoints for Token and Pool contracts on Plenty

Tokens

Get the details of all the tokens listed on Plentyswap

GET 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.

[
  {
    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
  }
]

Pools

Get the details of all the v2 pools on Plentyswap

GET 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.

[
 // 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
  }
]

Get the details of all the v3 pools on Plentyswap

GET 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.

[
 // 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
  }
]

Last updated