Quick Start
Complete your first API call in 10 minutes
1. Create an API Key
Create your first API Key in the dashboard
- Go to Account Settings → API Keys
- Click the "Create API Key" button
- Enter a key name (e.g., Production)
- Copy and save the generated API Key (shown only once)
⚠️ API Keys are shown only once at creation. Please save it securely.
2. Send Your First Request
Test API connection using curl
Get Wallet Balance
BASE_URL=... # Actual production domain
API_KEY=ak_live_...
curl -H "Authorization: ApiKey $API_KEY" "$BASE_URL/v1/wallet/balance" Response Example
{
"data": {
"balanceSun": 1000000,
"frozenSun": 0,
"totalSun": 1000000
}
}
// For unit and type explanations, see <a href="/en/docs/endpoints" class="text-blue-600 hover:underline">API Endpoints</a> 3. Create an Energy Order
Rent energy for a specified address
Create Order
curl -X POST "$BASE_URL/v1/energy/orders" \
-H "Authorization: ApiKey $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "manual",
"data": {
"tronAddress": "TYour1Address2Here3...",
"energyValue": 65000,
"durationHours": 1
}
}'
// tronAddress: 34 characters, starts with T
// durationHours: 1, 24, 72, 168, 336, 720 (hours) Response Example
{
"data": {
"id": 1234567890,
"status": "processing",
"priceSun": 3000000,
"createdAt": "2025-01-15T10:30:00Z"
}
} 4. Check Order Status
Verify if the order is completed
Query Order
curl -H "Authorization: ApiKey $API_KEY" "$BASE_URL/v1/energy/orders/1234567890" Response Example
{
"data": {
"id": 1234567890,
"status": "completed",
"txid": "abc123...",
"completedAt": "2025-01-15T10:30:05Z"
}
}