Create a New Token
How to Create a New Token
Creating your own cryptocurrency token is simple and straightforward with our platform. To get started, you'll need to send a POST request with the necessary token details. Below is a guide on how to do this, along with information on generating a signature to secure your token creation.
[POST] api.blls.me/billing/tokens1. Send a POST Request
To create a new token, send a POST request to our server with the following body:
{
"name": "string", // Token name
"symbol": "string", // Token symbol
"address": "string", // Wallet address that will control the token
"emission": 1000000000, // Total emission (token supply)
"signature": "string", // Signature generated using the private key
"idempotencyKey": "string" // Optional: unique key to prevent duplicates (1-64 chars)
}Idempotency Key (Recommended)
For safe token creation, especially in production environments, include an idempotencyKey field in the request body to prevent duplicate token creation:
{
"name": "MyToken",
"symbol": "MTK",
"address": "0x12345abcdef",
"emission": 1000000000,
"signature": "your-generated-signature",
"idempotencyKey": "create-token-f47ac10b-58cc-4372"
}Learn more about Idempotency Keys for safe API operations.
Example Request:
To create a token called "MyToken" with the symbol "MTK" and an emission of 1 billion tokens, controlled by a wallet at address 0x12345abcdef, your request body would look something like this:description: How to Create a New Token links: doc: https://www.npmjs.com/package/ethers
Creating your own cryptocurrency token is simple and straightforward with our platform. To get started, you'll need to send a POST request with the necessary token details. Below is a guide on how to do this, along with information on generating a signature to secure your token creation.
[POST] api.blls.me/billing/tokens1. Send a POST Request
To create a new token, send a POST request to our server with the following body:
{
"name": "string", // Token name
"symbol": "string", // Token symbol
"address": "string", // Wallet address that will control the token
"emission": 1000000000, // Total emission (token supply)
"signature": "string" // Signature generated using the private key
}Example Request:
To create a token called “MyToken” with the symbol “MTK” and an emission of 1 billion tokens, controlled by a wallet at address 0x12345abcdef, your request body would look something like this:
{
"name": "MyToken",
"symbol": "MTK",
"address": "0x12345abcdef",
"emission": 1000000000,
"signature": "your-generated-signature"
}You can read how to sign the token here
2. API Responses
Success Response [200]:
If your request is successful, the server will return a 200 status code with a response like this:
{
"_id": "string", // Unique ID of the token
"name": "string", // Token name
"timestamp": "2024-10-15T18:02:52.726Z", // Creation timestamp
"address": "string", // Wallet address
"symbol": "string" // Token symbol
}Error Response [409]:
If there’s a validation error, you will receive a 409 status code, indicating a conflict. The response will look like this:
{
"url": "/forgot-password",
"statusCode": 409,
"statusMessage": "Validation Error",
"message": "Validation Error"
}This typically occurs if there’s an issue with the input data, such as a missing or incorrect field.
3. Summary
To create a new token:
- Prepare a POST request with the token name, symbol, wallet address, emission, and a generated signature.
- Use the ethers library or a similar tool to generate the signature.
- Make sure to validate your data to avoid errors and successfully create your new token!