Swing Points Program is Live 🚀 Learn More →

How to add a custom token

By default, we pull tokens into our token list from those listed by our integrated liquidity sources. This means that if your project's token has already been aggregated by any of our integrated liquidity sources, we will pull that token into Swing.

In cases where your token is not listed on Swing, Swing gives you the option to add that token to your project's tokens list.

Before adding a custom token, please ensure that the token being added has sufficient liquidity from at-least one of our integrated liquidity sources. To see a list of our integrated liquidy sources, please check out our Chain, Bridges and Liqudity page

Making a Request

GET: https://platform.swing.xyz/api/v1/projects/:projectId/tokens

Route Parameters:

KeyExampleDescription
symbolreplugYour project's ID

Body Parameters:

KeyExampleDescription
address0x000000000000000000Token's contract address
chainethereumChain slug on which the target token is deployed to
symbolMINEToken's symbol
logohttps://raw.githubusercontent.com/swing-xyz/../coin/logo.pngToken's logo url
decimals18Token's decimal precision points

The reference guide for adding a custom token can be found here.

Sample Request

const PROJECT_ID = 'your-project-id';
 
const payload = {
  address: '0x000000000000000000',
  chain: 'ethereum',
  symbol: 'MINE',
  logo: 'https://raw.githubusercontent.com/swing-xyz/../coin/logo.png',
  decimals: 18,
};
 
const result = await fetch(
  `https://platform.swing.xyz/api/v1/projects/${PROJECT_ID}/tokens`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(payload),
  },
);