Create Token
Create tokens with configurable parameters like name, symbol, liquidity, and reward functionality.
POSTapi.metal.build/merchant/create-token
Create a token
This endpoint allows you to create a new token with optional liquidity and reward capabilities.
Required attributes
- Name
name
- Type
- string
- Description
The name for your token (e.g., "Test Token").
- Name
symbol
- Type
- string
- Description
The ticker symbol for your token (e.g., "TEST").
Optional attributes
- Name
canReward
- Type
- boolean
- Description
Enable reward functionality for this token.
- Name
canLP
- Type
- boolean
- Description
Enable liquidity pool creation for this token.
- Name
merchantAddress
- Type
- string
- Description
The address to receive the merchant token allocation. If a merchant address is provided, the merchant allocation will be fixed at 5% of the total supply.
Request
POST
api.metal.build/merchant/create-tokencurl https://api.metal.build/merchant/create-token\
-H "Content-Type: application/json" \
-H "x-api-key: YOUR-API-KEY" \
-d '{
"name": "Test Token",
"symbol": "TEST",
"merchantAddress": "0x1234567890abcdef1234567890abcdef12345678",
"canReward": true,
"canLP": true
}'
Response
{ jobId: "48384e4e-0da0-5932-8fd7-b95e84b45530" }
GETapi.metal.build/merchant/create-token/status/:jobId
Status
This endpoint will return the status of your token creation.
Required attributes
- Name
jobId
- Type
- string
- Description
Job ID of the token creation.
Request
GET
api.metal.build/merchant/create-token/status/jobIdcurl -X GET https://api.metal.build/merchant/create-token/status/0c675f83-dbd4-595a-a8cc-560e923b7328 \
-H "x-api-key: YOUR_METAL_API_KEY"
Pending Response
{
jobId: "e20b21ec-10ca-5756-938c-855e78add351",
status: "pending",
data: {}
}
Successful Response
{
jobId: "e20b21ec-10ca-5756-938c-855e78add351",
status: "success",
data: {
id: "0x1234567890abcdef1234567890abcdef12345678",
address: "0x1234567890abcdef1234567890abcdef12345678",
name: "Test Token",
symbol: "TEST",
totalSupply: 1000000000,
startingRewardSupply: 100000000,
remainingRewardSupply: 100000000,
merchantSupply: 50000000,
merchantAddress: "0x1234567890abcdef1234567890abcdef12345678",
price: null,
}
}