Get Tokens
Retrieve a list of all tokens for a merchant, including supply allocations and price.
GETapi.metal.build/merchant/all-tokens
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.
- 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
Available supply for rewards.
- Name
remainingRewardSupply
- Type
- number
- Description
Remaining supply for rewards.
- Name
merchantSupply
- Type
- number
- Description
The amount allocated to the merchant.
- Name
merchantAddress
- Type
- string
- Description
The address of the merchant.
- Name
price
- Type
- number
- Description
Current price of the token in USD.
Request
GET
api.metal.build/merchant/all-tokenscurl https://api.metal.build/merchant/all-tokens \
-H "x-api-key: YOUR-API-KEY"
Response
{
[
{
id: "0x1234567890abcdef1234567890abcdef12345678",
address: "0x1234567890abcdef1234567890abcdef12345678",
name: "Test Token",
symbol: "TEST",
totalSupply: 1000000000,
startingRewardSupply: 100000000,
remainingRewardSupply: 99999000,
merchantSupply: 100000000,
merchantAddress: "0x1234567890abcdef1234567890abcdef12345678",
price: 0.015,
},
{
id: "0x9876543210fedcba9876543210fedcba98765432",
address: "0x9876543210fedcba9876543210fedcba98765432",
name: "Test Token 2",
symbol: "TEST2",
totalSupply: 1000000000,
startingRewardSupply: 200000000,
remainingRewardSupply: 199999000,
merchantSupply: 200000000,
merchantAddress: "0x9876543210fedcba9876543210fedcba98765432",
price: 0.025,
}
],
}