Get Tokens
Retrieve a list of all tokens for a merchant, including supply allocations and price.
List all tokens
This endpoint returns an array of all tokens associated with your merchant account.
Response attributes
- Name
id
- Type
- string
- Description
The id of the token. This is usually the same as
address
.
- Name
address
- Type
- string
- Description
The contract address of the token.
- Name
name
- Type
- string
- Description
The name of the token.
- Name
symbol
- Type
- string
- Description
The ticker symbol of the token.
- Name
totalSupply
- Type
- number
- Description
Total token supply.
- Name
startingRewardSupply
- Type
- number
- Description
Amount of tokens the Reward Allocation started with. This is 0 if you did not toggle on the Reward Allocation.
- Name
remainingRewardSupply
- Type
- number
- Description
Remaining supply for distribution.
- Name
merchantSupply
- Type
- number
- Description
Amount of tokens transferred to the merchant at the time of token creation. This is 0 if you did not provide a merchant wallet address to transfer token to.
- Name
merchantAddress
- Type
- string
- Description
The address of the merchant.
- Name
price
- Type
- number
- Description
Current price of the token in USD.
- Name
lpInfo
- Type
- object
- Description
Information about the token's liquidity pool (LP). There will only be LP information if you used Create Liquidity. Contains:
- Name
nftId
- Type
- string
- Description
- The ID of the NFT associated with the liquidity pool
- Name
liquidityPoolAddress
- Type
- string
- Description
- The address of the liquidity pool contract
This field will be an empty object if the token has no liquidity pool.
- Name
createdAt
- Type
- string
- Description
The timestamp when the token was created.
Request
const response = await fetch(
'https://api.metal.build/merchant/all-tokens',
{
headers: {
'x-api-key': 'YOUR_SECRET_API_KEY',
},
})
const tokens = await response.json()
Response
{
[
{
id: "0x1234567890abcdef1234567890abcdef12345678",
address: "0x1234567890abcdef1234567890abcdef12345678",
name: "Test Token",
symbol: "TEST",
totalSupply: 1000000000,
startingRewardSupply: 100000000,
remainingRewardSupply: 99999000,
merchantSupply: 100000000,
merchantAddress: "0x1234567890abcdef1234567890abcdef12345678",
price: 0.015,
lpInfo: {
nftId: "2234135",
liquidityPoolAddress: "0x46D4702D9A0dD7602b0a4f6571347751D456A86e"
},
createdAt: "2025-02-24T21:00:03.520Z"
},
{
id: "0x9876543210fedcba9876543210fedcba98765432",
address: "0x9876543210fedcba9876543210fedcba98765432",
name: "Test Token 2",
symbol: "TEST2",
totalSupply: 1000000000,
startingRewardSupply: 200000000,
remainingRewardSupply: 199999000,
merchantSupply: 200000000,
merchantAddress: "0x9876543210fedcba9876543210fedcba98765432",
price: 0.025,
lpInfo: {},
createdAt: "2025-04-07T16:53:56.018Z"
}
],
}