API Reference

Integrate TRC20 token creation into your applications with our powerful API

Want API Access? Contact us at api@createtrontoken.com to purchase API access and get your authentication credentials.

API Overview

The CreateTronToken.com API allows developers to programmatically create TRC20 tokens on the Tron blockchain. Our RESTful API provides endpoints for token creation, management, and querying token information.

Base URL:https://api.createtrontoken.com/v1
Protocol:HTTPS only
Format:JSON

Authentication

API Key Authentication

All API requests require authentication using an API key. Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

Getting Your API Key

To obtain an API key, contact our sales team at api@createtrontoken.com. We offer flexible pricing plans based on your usage needs.

Example Request

curl -X POST https://api.createtrontoken.com/v1/tokens \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Token",
    "symbol": "MTK",
    "totalSupply": "1000000",
    "decimals": 18
  }'

API Endpoints

POST/tokens

Create a new TRC20 token on the Tron blockchain. This endpoint deploys a smart contract with your specified parameters.

Request Body

{
  "name": "string",              // Token name (required)
  "symbol": "string",            // Token symbol (required)
  "totalSupply": "string",       // Total supply (required)
  "decimals": number,            // Decimals 0-18 (required)
  "description": "string",       // Token description (optional)
  "website": "string",           // Project website (optional)
  "twitter": "string",           // Twitter handle (optional)
  "telegram": "string",          // Telegram group (optional)
  "features": {
    "mintable": boolean,         // Enable minting (optional)
    "burnable": boolean,         // Enable burning (optional)
    "pausable": boolean,         // Enable pausing (optional)
    "blacklist": boolean         // Enable blacklist (optional)
  }
}

Response

{
  "success": true,
  "data": {
    "tokenId": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "name": "My Token",
    "symbol": "MTK",
    "totalSupply": "1000000",
    "decimals": 18,
    "owner": "TYour_Wallet_Address",
    "transactionId": "abc123...",
    "createdAt": "2025-01-15T10:30:00Z",
    "status": "deployed"
  }
}
GET/tokens/:tokenId

Retrieve information about a specific token created through CreateTronToken.com.

Response

{
  "success": true,
  "data": {
    "tokenId": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "name": "My Token",
    "symbol": "MTK",
    "totalSupply": "1000000",
    "decimals": 18,
    "owner": "TYour_Wallet_Address",
    "holders": 150,
    "transfers": 1250,
    "createdAt": "2025-01-15T10:30:00Z"
  }
}
GET/tokens

List all tokens created by your account. Supports pagination and filtering.

Query Parameters

page- Page number (default: 1)
limit- Results per page (default: 20, max: 100)
sort- Sort by: createdAt, name, symbol (default: createdAt)

Response

{
  "success": true,
  "data": {
    "tokens": [
      {
        "tokenId": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
        "name": "My Token",
        "symbol": "MTK",
        "createdAt": "2025-01-15T10:30:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 45,
      "pages": 3
    }
  }
}
PATCH/tokens/:tokenId

Update metadata for your token (description, social links, etc.). Note: Blockchain parameters cannot be changed.

Request Body

{
  "description": "Updated description",
  "website": "https://mytoken.com",
  "twitter": "@mytoken",
  "telegram": "mytokengroup"
}

Error Codes

The API uses standard HTTP status codes and returns detailed error messages in JSON format.

400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong

Error Response Format

{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "Token symbol must be 3-5 characters",
    "field": "symbol"
  }
}

Rate Limits

API rate limits vary by plan. Contact api@createtrontoken.com for custom rate limits.

Starter Plan:100 requests/hour
Professional Plan:1,000 requests/hour
Enterprise Plan:Custom limits

Rate limit information is included in response headers: X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset

Code Examples

JavaScript / Node.js

const axios = require('axios');

const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.createtrontoken.com/v1';

async function createToken() {
  try {
    const response = await axios.post(
      `${BASE_URL}/tokens`,
      {
        name: 'My Awesome Token',
        symbol: 'MAT',
        totalSupply: '1000000',
        decimals: 18,
        features: {
          mintable: true,
          burnable: true
        }
      },
      {
        headers: {
          'Authorization': `Bearer ${API_KEY}`,
          'Content-Type': 'application/json'
        }
      }
    );
    
    console.log('Token created:', response.data);
    return response.data;
  } catch (error) {
    console.error('Error:', error.response.data);
  }
}

createToken();

Python

import requests

API_KEY = 'your_api_key_here'
BASE_URL = 'https://api.createtrontoken.com/v1'

def create_token():
    headers = {
        'Authorization': f'Bearer {API_KEY}',
        'Content-Type': 'application/json'
    }
    
    data = {
        'name': 'My Awesome Token',
        'symbol': 'MAT',
        'totalSupply': '1000000',
        'decimals': 18,
        'features': {
            'mintable': True,
            'burnable': True
        }
    }
    
    response = requests.post(
        f'{BASE_URL}/tokens',
        json=data,
        headers=headers
    )
    
    if response.status_code == 200:
        print('Token created:', response.json())
        return response.json()
    else:
        print('Error:', response.json())

create_token()

PHP

<?php

$apiKey = 'your_api_key_here';
$baseUrl = 'https://api.createtrontoken.com/v1';

$data = [
    'name' => 'My Awesome Token',
    'symbol' => 'MAT',
    'totalSupply' => '1000000',
    'decimals' => 18,
    'features' => [
        'mintable' => true,
        'burnable' => true
    ]
];

$ch = curl_init($baseUrl . '/tokens');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $apiKey,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    echo 'Token created: ' . $response;
} else {
    echo 'Error: ' . $response;
}

?>

Webhooks

Receive real-time notifications when events occur with your tokens. Configure webhook URLs in your API dashboard.

Available Events

token.created- Token successfully deployed
token.transfer- Token transferred between addresses
token.minted- New tokens minted
token.burned- Tokens burned

API Support

Need help with the API? Our technical team is here to assist you.

Sales & Pricing:

api@createtrontoken.com

Technical Support:

support@createtrontoken.com

Documentation:

Visit our documentation for more guides

Ready to Get Started?

Contact us today to purchase API access and start creating tokens programmatically.

Contact Sales