Create Token

Create tokens with configurable parameters like name, symbol, and airdrop/reward functionality.


POSTapi.metal.build/merchant/tokens

Create a token

This endpoint allows you to create a new token with optional airdrop 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
    canAirdrop
    Type
    boolean
    Description

    Enable airdrop functionality for this token.

  • Name
    canReward
    Type
    boolean
    Description

    Enable reward functionality for this token.

  • Name
    merchantPercentage
    Type
    number
    Description

    The amount of tokens to allocate to the merchant (max 5)

  • Name
    merchantAddress
    Type
    string
    Description

    The address to receive the merchant token allocation.

Request

POST
api.metal.build/merchant/tokens
curl https://api.metal.build/merchant/tokens\
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR-API-KEY" \
  -d '{
    "name": "Test Token",
    "symbol": "TEST",
    "canAirdrop": true,
    "canReward": true,
    "merchantAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "merchantPercentage": 5
  }'

Response

{
  "jobId": "e20b21ec-10ca-5756-938c-855e78add351",
  "status": "pending"
}

GETapi.metal.build/merchant/tokens/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/tokens/status/jobId
curl -G https://api.metal.build/merchant/tokens/status \
  -H 'x-api-key': 'YOUR-API-KEY' \
  -d '{"id":"token_1234567890"}'

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": "100000000000000000000000000",
    "airdropSupply": "1000000000000000000000000",
    "rewardSupply": "1000000000000000000000000",
    "merchantSupply": "1000000000000000000000000",
    "merchantAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "price": null,
  }
}

Was this page helpful?