Skip to content

POST /apiv2/time/order

为TRON地址(主机模式)购买特定的能量委托周期。

概述

时间顺序端点允许您为已处于主机模式的地址购买特定数量的能量委托周期。每个周期提供 131,000 个能量,持续 24 小时。此端点非常适合精确控制能量分配和预算管理,允许您仅购买操作所需数量的周期。

端点 URL

POST https://netts.io/apiv2/time/order

身份验证

此端点使用JSON主体身份验证(而非标头)。您的API密钥、目标地址和所需的循环计数都将提供在请求主体中。

身份验证流程

  1. API Key Validation: System verifies the API key exists and is active
  2. IP Whitelist Check: Request IP must match configured whitelist
  3. Ownership Verification: API key must own the specified address
  4. Balance Check: Account must have sufficient balance for the cycles
  5. Status Verification: Address must be in Host Mode and not in infinity mode

请求头

HeaderRequiredDescription
Content-TypeYesapplication/json

请求体

json
{
    "api_key": "your_api_key",
    "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
    "cycles": 10
}

参数

ParameterTypeRequiredValidationDescription
api_keystringYesMust exist in systemYour API key for authentication and billing
addressstringYesTRC-20 formatTRON address to purchase cycles for (must start with 'T' and be 34 characters)
cyclesintegerYes1-1000Number of 24-hour energy cycles to purchase

参数验证

  • api_key:

    • Must be a valid 32-character hexadecimal string
    • Must be associated with an active account
    • Must have ownership of the specified address
    • Account must not be suspended or restricted
    • Balance must cover cycle cost
  • address:

    • Must match TRC-20 format ^T[1-9A-HJ-NP-Za-km-z]{33}$
    • Must be currently in Host Mode under your account
    • Cannot be in infinity mode (use standard mode only)
    • Cannot have pending cycle orders
    • Must have completed initial activation
  • cycles:

    • Must be a positive integer between 1 and 1000
    • Total cycles (existing + new) cannot exceed 10,000
    • Minimum order: 1 cycle
    • Maximum single order: 1000 cycles
    • Bulk orders >1000 require special approval
  • IP Address:

    • Your request IP must be in the whitelist associated with your API key
    • Maximum 5 IP addresses per API key
    • IPv4 and IPv6 supported

示例请求

cURL

bash
curl -X POST https://netts.io/apiv2/time/order \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY_HERE",
    "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
    "cycles": 10
  }'

Python

python
import requests
import json
from typing import Dict, Optional

def order_cycles(api_key: str, address: str, cycles: int) -> Dict:
    """
    Purchase energy delegation cycles for a TRON address in Host Mode.
    
    Args:
        api_key: Your API authentication key
        address: TRON address to purchase cycles for
        cycles: Number of cycles to purchase (1-1000)
        
    Returns:
        API response dictionary
    """
    url = "https://netts.io/apiv2/time/order"
    
    # Validate address format
    if not address.startswith('T') or len(address) != 34:
        raise ValueError(f"Invalid TRON address format: {address}")
    
    # Validate cycle count
    if not 1 <= cycles <= 1000:
        raise ValueError(f"Invalid cycle count: {cycles}. Must be between 1 and 1000")
    
    data = {
        "api_key": api_key,
        "address": address,
        "cycles": cycles
    }
    
    try:
        response = requests.post(url, json=data, verify=True, timeout=30)
        response.raise_for_status()
        
        result = response.json()
        
        if result['code'] == 0:
            print(f"✅ Successfully purchased {result['data']['cycles_purchased']} cycles")
            print(f"Address: {result['data']['address']}")
            print(f"Total cycles: {result['data']['total_cycles']}")
            print(f"Total cost: {result['data']['total_cost']} TRX")
            print(f"Next delegation: {result['data'].get('next_delegation_time', 'N/A')}")
        else:
            print(f"❌ Error: {result['msg']}")
            
        return result
        
    except requests.exceptions.RequestException as e:
        print(f"❌ Request failed: {str(e)}")
        raise
    except json.JSONDecodeError as e:
        print(f"❌ Invalid JSON response: {str(e)}")
        raise

# Example usage
if __name__ == "__main__":
    API_KEY = "YOUR_API_KEY_HERE"
    ADDRESS = "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
    CYCLES = 10
    
    result = order_cycles(API_KEY, ADDRESS, CYCLES)

Node.js

javascript
const axios = require('axios');

/**
 * Purchase energy delegation cycles for a TRON address in Host Mode
 * @param {string} apiKey - Your API authentication key
 * @param {string} address - TRON address to purchase cycles for
 * @param {number} cycles - Number of cycles to purchase (1-1000)
 * @returns {Promise<Object>} API response
 */
async function orderCycles(apiKey, address, cycles) {
    const url = 'https://netts.io/apiv2/time/order';
    
    // Validate address format
    if (!address.startsWith('T') || address.length !== 34) {
        throw new Error(`Invalid TRON address format: ${address}`);
    }
    
    // Validate cycle count
    if (!Number.isInteger(cycles) || cycles < 1 || cycles > 1000) {
        throw new Error(`Invalid cycle count: ${cycles}. Must be between 1 and 1000`);
    }
    
    const data = {
        api_key: apiKey,
        address: address,
        cycles: cycles
    };
    
    try {
        const response = await axios.post(url, data, {
            headers: {
                'Content-Type': 'application/json'
            },
            timeout: 30000
        });
        
        const result = response.data;
        
        if (result.code === 0) {
            console.log(`✅ Successfully purchased ${result.data.cycles_purchased} cycles`);
            console.log(`Address: ${result.data.address}`);
            console.log(`Total cycles: ${result.data.total_cycles}`);
            console.log(`Total cost: ${result.data.total_cost} TRX`);
            console.log(`Next delegation: ${result.data.next_delegation_time || 'N/A'}`);
        } else {
            console.error(`❌ Error: ${result.msg}`);
        }
        
        return result;
        
    } catch (error) {
        if (error.response) {
            console.error(`❌ API Error: ${error.response.status} - ${error.response.data?.msg || error.message}`);
        } else if (error.request) {
            console.error('❌ No response from server');
        } else {
            console.error(`❌ Request failed: ${error.message}`);
        }
        throw error;
    }
}

// Example usage
(async () => {
    const API_KEY = 'YOUR_API_KEY_HERE';
    const ADDRESS = 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE';
    const CYCLES = 10;
    
    try {
        const result = await orderCycles(API_KEY, ADDRESS, CYCLES);
        console.log('Result:', result);
    } catch (error) {
        console.error('Failed to order cycles:', error.message);
    }
})();

PHP

php
<?php

/**
 * Purchase energy delegation cycles for a TRON address in Host Mode
 * 
 * @param string $apiKey Your API authentication key
 * @param string $address TRON address to purchase cycles for
 * @param int $cycles Number of cycles to purchase (1-1000)
 * @return array API response
 */
function orderCycles($apiKey, $address, $cycles) {
    $url = 'https://netts.io/apiv2/time/order';
    
    // Validate address format
    if (!preg_match('/^T[1-9A-HJ-NP-Za-km-z]{33}$/', $address)) {
        throw new InvalidArgumentException("Invalid TRON address format: $address");
    }
    
    // Validate cycle count
    if (!is_int($cycles) || $cycles < 1 || $cycles > 1000) {
        throw new InvalidArgumentException("Invalid cycle count: $cycles. Must be between 1 and 1000");
    }
    
    $data = [
        'api_key' => $apiKey,
        'address' => $address,
        'cycles' => $cycles
    ];
    
    $options = [
        'http' => [
            'header' => "Content-Type: application/json\r\n",
            'method' => 'POST',
            'content' => json_encode($data),
            'timeout' => 30
        ]
    ];
    
    $context = stream_context_create($options);
    $response = @file_get_contents($url, false, $context);
    
    if ($response === false) {
        $error = error_get_last();
        throw new RuntimeException('Request failed: ' . $error['message']);
    }
    
    $result = json_decode($response, true);
    
    if ($result['code'] == 0) {
        echo "✅ Successfully purchased {$result['data']['cycles_purchased']} cycles\n";
        echo "Address: {$result['data']['address']}\n";
        echo "Total cycles: {$result['data']['total_cycles']}\n";
        echo "Total cost: {$result['data']['total_cost']} TRX\n";
    } else {
        echo "❌ Error: {$result['msg']}\n";
    }
    
    return $result;
}

// Example usage
$API_KEY = 'YOUR_API_KEY_HERE';
$ADDRESS = 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE';
$CYCLES = 10;

try {
    $result = orderCycles($API_KEY, $ADDRESS, $CYCLES);
    print_r($result);
} catch (Exception $e) {
    echo "Failed to order cycles: " . $e->getMessage() . "\n";
}
?>

Go

go
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
    "time"
)

// OrderRequest represents the API request structure
type OrderRequest struct {
    APIKey  string `json:"api_key"`
    Address string `json:"address"`
    Cycles  int    `json:"cycles"`
}

// OrderResponse represents the API response structure
type OrderResponse struct {
    Code int    `json:"code"`
    Msg  string `json:"msg"`
    Data struct {
        Address          string  `json:"address"`
        CyclesPurchased  int     `json:"cycles_purchased"`
        TotalCycles      int     `json:"total_cycles"`
        TotalCost        float64 `json:"total_cost"`
        PricePerCycle    float64 `json:"price_per_cycle"`
        OrderID          string  `json:"order_id"`
        TransactionHash  string  `json:"transaction_hash"`
        NextDelegation   int64   `json:"next_delegation_time"`
    } `json:"data"`
}

// OrderCycles purchases energy delegation cycles for a TRON address
func OrderCycles(apiKey, address string, cycles int) (*OrderResponse, error) {
    url := "https://netts.io/apiv2/time/order"
    
    // Validate address format
    if len(address) != 34 || address[0] != 'T' {
        return nil, fmt.Errorf("invalid TRON address format: %s", address)
    }
    
    // Validate cycle count
    if cycles < 1 || cycles > 1000 {
        return nil, fmt.Errorf("invalid cycle count: %d. Must be between 1 and 1000", cycles)
    }
    
    // Create request
    reqData := OrderRequest{
        APIKey:  apiKey,
        Address: address,
        Cycles:  cycles,
    }
    
    jsonData, err := json.Marshal(reqData)
    if err != nil {
        return nil, err
    }
    
    // Make HTTP request
    client := &http.Client{Timeout: 30 * time.Second}
    req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    if err != nil {
        return nil, err
    }
    
    req.Header.Set("Content-Type", "application/json")
    
    resp, err := client.Do(req)
    if err != nil {
        return nil, err
    }
    defer resp.Body.Close()
    
    // Read response
    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        return nil, err
    }
    
    // Parse response
    var result OrderResponse
    if err := json.Unmarshal(body, &result); err != nil {
        return nil, err
    }
    
    if result.Code == 0 {
        fmt.Printf("✅ Successfully purchased %d cycles\n", result.Data.CyclesPurchased)
        fmt.Printf("Address: %s\n", result.Data.Address)
        fmt.Printf("Total cycles: %d\n", result.Data.TotalCycles)
        fmt.Printf("Total cost: %.2f TRX\n", result.Data.TotalCost)
    } else {
        fmt.Printf("❌ Error: %s\n", result.Msg)
    }
    
    return &result, nil
}

func main() {
    apiKey := "YOUR_API_KEY_HERE"
    address := "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
    cycles := 10
    
    result, err := OrderCycles(apiKey, address, cycles)
    if err != nil {
        fmt.Printf("Failed to order cycles: %v\n", err)
        return
    }
    
    fmt.Printf("Order ID: %s\n", result.Data.OrderID)
}

响应

成功响应 (200 OK)

json
{
    "code": 0,
    "msg": "Cycles successfully purchased",
    "data": {
        "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "cycles_purchased": 10,
        "total_cycles": 25,
        "previous_cycles": 15,
        "total_cost": 30.0,
        "price_per_cycle": 3.0,
        "discount_applied": 0,
        "order_id": "ORD-20231109-A7C9F2B3",
        "transaction_hash": "b8d4f1a2c7e9b3d5f8a1c4e7b9d2f5a8c1e4f8b2d5f8c1e4b7d2f5a8c1e4f8b2",
        "payment_method": "account_balance",
        "balance_after": 470.0,
        "next_delegation_time": 1699615200,
        "expiry_time": 1701475200,
        "status": "confirmed"
    }
}

响应字段

FieldTypeDescription
codeintegerStatus code (0 for success, -1 for error)
msgstringHuman-readable status message
dataobjectResponse data object
data.addressstringThe TRON address cycles were purchased for
data.cycles_purchasedintegerNumber of cycles purchased in this order
data.total_cyclesintegerTotal cycles now available for the address
data.previous_cyclesintegerNumber of cycles before this purchase
data.total_costnumberTotal cost in TRX for this order
data.price_per_cyclenumberPrice per cycle in TRX
data.discount_appliednumberDiscount amount applied (if any)
data.order_idstringUnique order identifier for tracking
data.transaction_hashstringTRON blockchain transaction hash
data.payment_methodstringPayment method used ("account_balance", "card", "crypto")
data.balance_afternumberAccount balance after purchase
data.next_delegation_timeintegerUnix timestamp for next energy delegation
data.expiry_timeintegerUnix timestamp when last cycle expires
data.statusstringOrder status ("confirmed", "pending", "processing")

错误响应

身份验证错误 (401)

json
{
    "code": -1,
    "msg": "Invalid API key",
    "data": null
}

Causes:

  • Invalid or expired API key
  • API key not found in system
  • Account suspended or terminated

Resolution:

  • Verify API key is correct
  • Check account status in dashboard
  • Contact support if key should be valid

地址未找到 (404)

json
{
    "code": -1,
    "msg": "Address not found in Host Mode",
    "data": {
        "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "suggestion": "Use /time/add to add this address to Host Mode first"
    }
}

Causes:

  • Address not in Host Mode
  • Address was deleted from Host Mode
  • Address belongs to different API key

Resolution:

  • Add address to Host Mode using /time/add first
  • Verify address ownership
  • Check address status with /time/status

余额不足 (402)

json
{
    "code": -1,
    "msg": "Insufficient balance to purchase cycles",
    "data": {
        "required_amount": 30.0,
        "current_balance": 10.0,
        "deficit": 20.0,
        "cycles_requested": 10,
        "price_per_cycle": 3.0
    }
}

Causes:

  • Account balance too low for purchase
  • Credit limit exceeded
  • Payment method declined

Resolution:

  • Add funds to your account
  • Reduce number of cycles requested
  • Check payment method status
  • Contact support for credit increase

无效循环计数 (400)

json
{
    "code": -1,
    "msg": "Invalid cycle count",
    "data": {
        "requested": 1500,
        "minimum": 1,
        "maximum": 1000,
        "suggestion": "For bulk orders over 1000 cycles, contact support"
    }
}

Causes:

  • Cycles less than 1 or greater than 1000
  • Non-integer value provided
  • Exceeds account limits

Resolution:

  • Ensure cycles between 1 and 1000
  • Use integer values only
  • Contact support for bulk orders
  • Check account cycle limits

Infinity模式下的地址 (409)

json
{
    "code": -1,
    "msg": "Cannot purchase cycles for address in infinity mode",
    "data": {
        "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "mode": "infinity",
        "suggestion": "Infinity mode provides unlimited cycles automatically"
    }
}

Causes:

  • Address has infinity mode enabled
  • Infinity mode incompatible with cycle purchases
  • Mode conflict detected

Resolution:

  • No action needed - infinity mode provides unlimited cycles
  • Disable infinity mode if you prefer manual cycle purchases
  • Use /time/status to check current mode

最大循环次数已超过 (409)

json
{
    "code": -1,
    "msg": "Maximum cycle limit exceeded",
    "data": {
        "current_cycles": 9500,
        "requested_cycles": 600,
        "total_would_be": 10100,
        "maximum_allowed": 10000,
        "available_to_purchase": 500
    }
}

Causes:

  • Total cycles would exceed 10,000 limit
  • Account has cycle cap restrictions
  • Safety limit reached

Resolution:

  • Purchase fewer cycles (max available shown)
  • Use existing cycles before purchasing more
  • Consider infinity mode for unlimited cycles
  • Contact support to increase limits

存在未完成订单 (409)

json
{
    "code": -1,
    "msg": "Pending order already exists for this address",
    "data": {
        "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "pending_order_id": "ORD-20231109-X3D5F7A9",
        "status": "processing",
        "retry_after": 60
    }
}

Causes:

  • Previous order still processing
  • Duplicate order attempt
  • Transaction not yet confirmed

Resolution:

  • Wait for pending order to complete
  • Check order status with order ID
  • Retry after specified time
  • Contact support if order stuck

速率限制

PeriodLimitDescription
1 minute6 requestsMaximum 6 requests per minute per API key
1 hour100 requestsMaximum 100 requests per hour per API key
1 day1000 requestsMaximum 1000 requests per day per API key

速率限制报头

http
X-RateLimit-Limit-Minute: 6
X-RateLimit-Remaining-Minute: 5
X-RateLimit-Reset-Minute: 1699528860

X-RateLimit-Limit-Hour: 100
X-RateLimit-Remaining-Hour: 98
X-RateLimit-Reset-Hour: 1699532400

X-RateLimit-Limit-Day: 1000
X-RateLimit-Remaining-Day: 995
X-RateLimit-Reset-Day: 1699574400

速率限制超出响应 (429)

json
{
    "code": -1,
    "msg": "API rate limit exceeded",
    "data": {
        "retry_after": 45,
        "limit": "6 per minute",
        "reset_at": 1699528860
    }
}

理解周期

什么是周期?

一个周期代表 24 小时能量委托期,提供:

  • Energy Amount: 131,000 energy units
  • Duration: 24 hours from activation
  • Auto-activation: Next cycle starts automatically when current expires
  • Stackable: Multiple cycles queue sequentially

周期生命周期

  1. Purchase: Cycles added to address queue
  2. Activation: First cycle starts immediately or when current expires
  3. Delegation: Energy delegated to address on blockchain
  4. Usage: Address can use energy for transactions
  5. Expiration: After 24 hours, cycle ends
  6. Next Cycle: If available, next cycle auto-starts

周期定价

QuantityPrice per CycleTotal CostDiscount
1-93.0 TRXQty × 3.00%
10-492.8 TRXQty × 2.87%
50-992.6 TRXQty × 2.613%
100-4992.4 TRXQty × 2.420%
500-9992.2 TRXQty × 2.227%
1000+Contact SupportCustom30%+

周期管理

  • Queue System: Cycles queue in order of purchase
  • No Overlap: Cycles don't run simultaneously
  • No Waste: Unused energy doesn't carry over
  • Refills: Can purchase more cycles anytime
  • Maximum: 10,000 cycles per address

主机模式影响

主机模式下的循环工作原理

  1. Automatic Management: Host Mode handles cycle activation
  2. Sequential Processing: Cycles activate one after another
  3. No Manual Intervention: System manages everything
  4. Energy Guarantee: 131,000 energy per cycle guaranteed
  5. Continuous Operation: No gaps between cycles

周期模式与无限模式

FeatureCycle ModeInfinity Mode
Purchase MethodBuy specific quantityUnlimited auto-renew
BillingPrepaid per cycleDaily subscription
FlexibilityFull controlSet and forget
Best ForVariable usageConstant usage
Minimum Commitment1 cycleDaily billing
Price PredictabilityFixed prepaidFixed daily rate

计费和支付

支付流程

  1. Calculation: System calculates total cost with discounts
  2. Balance Check: Verifies sufficient account balance
  3. Deduction: Amount deducted from account
  4. Confirmation: Order confirmed and cycles added
  5. Receipt: Email receipt sent with details

支付方式

  • Account Balance: Primary payment method
  • Auto-recharge: Automatic top-up when low
  • Credit Card: Stored cards for quick payment
  • Cryptocurrency: Bitcoin, Ethereum, USDT accepted
  • Wire Transfer: For enterprise accounts

计费详情

  • Immediate Charge: Payment processed instantly
  • No Recurring: One-time payment per order
  • Volume Discounts: Automatic for larger orders
  • Tax Included: Prices include applicable taxes
  • Invoicing: Available for business accounts

安全注意事项

身份验证安全

  • API Key Storage: Never expose API keys in client-side code
  • HTTPS Only: All requests must use HTTPS
  • IP Whitelist: Configure IP whitelist for production use
  • Key Rotation: Rotate API keys regularly

订单安全

  1. Duplicate Prevention: System prevents duplicate orders
  2. Idempotency: Same request won't create multiple orders
  3. Transaction Verification: Blockchain confirmation required
  4. Audit Trail: All orders logged with details

验证检查

  1. API 密钥验证

    • Key exists and is active
    • Account has sufficient balance
    • Not exceeded rate limits
  2. 地址验证

    • Address in Host Mode
    • Owned by API key account
    • Not in infinity mode
  3. 循环验证

    • Valid integer range
    • Within account limits
    • Total doesn't exceed maximum
  4. 请求完整性

    • Valid JSON format
    • Required fields present
    • No injection attempts

技术架构

服务组件

  1. API 网关

    • Request validation and routing
    • Rate limiting enforcement
    • IP whitelist checking
  2. 订单处理服务

    • Order validation and creation
    • Pricing calculation
    • Discount application
  3. 支付服务

    • Balance verification
    • Payment processing
    • Receipt generation
  4. 周期管理服务

    • Cycle queue management
    • Activation scheduling
    • Expiry tracking
  5. 区块链服务

    • Energy delegation execution
    • Transaction confirmation
    • On-chain verification
  6. 数据库层

    • PostgreSQL for order data
    • Redis for caching and queues
    • Time-series for usage tracking

请求流程

  1. Client sends POST request with API key, address, and cycles
  2. API Gateway validates request format and rate limits
  3. Authentication Service verifies API key and permissions
  4. Order Processing Service calculates pricing with discounts
  5. Payment Service processes payment from account balance
  6. Cycle Management Service adds cycles to address queue
  7. Blockchain Service prepares delegation transactions
  8. Response sent to client with order details

订单处理流程

  1. 验证阶段

    • Input validation
    • Business rule checks
    • Fraud detection
  2. 定价阶段

    • Base price calculation
    • Discount application
    • Tax calculation
  3. 支付阶段

    • Balance verification
    • Payment execution
    • Transaction recording
  4. 履行阶段

    • Cycle allocation
    • Queue update
    • Notification dispatch

相关端点

最佳实践

何时订购周期

  • Regular Usage: Order weekly/monthly batches
  • Project-Based: Order cycles for project duration
  • Testing: Start with small quantities
  • Production: Maintain buffer of cycles

最佳订单数量

  1. Small Projects: 10-50 cycles
  2. Medium Usage: 100-500 cycles
  3. High Usage: 500-1000 cycles
  4. Enterprise: Custom bulk orders

成本优化

  • Bulk Purchases: Take advantage of volume discounts
  • Plan Ahead: Order larger quantities for better rates
  • Monitor Usage: Track consumption patterns
  • Consider Infinity: For constant usage, infinity mode may be cheaper

订单管理

  1. Track Orders: Save order IDs for reference
  2. Monitor Balance: Ensure sufficient funds
  3. Set Alerts: Configure low cycle warnings
  4. Review Usage: Analyze cycle consumption

故障排除

常见问题

“余额不足”

问题: 余额不足以购买所需周期

Solutions:

  • Check account balance in dashboard
  • Add funds to account
  • Reduce number of cycles
  • Check for pending charges

“地址未处于主机模式”

问题: 尝试为非主机模式地址订购周期

Solutions:

  • Add address using /time/add endpoint first
  • Verify address status with /time/status
  • Check using correct API key
  • Ensure address format is correct

“最大循环次数已超过”

问题: 订单将超过10,000个周期的限制

Solutions:

  • Check current cycle count with /time/status
  • Calculate available capacity
  • Use some cycles before ordering more
  • Consider infinity mode for unlimited

“无效循环计数”

问题: 循环参数超出有效范围

Solutions:

  • Ensure cycles between 1 and 1000
  • Use integer values only
  • Check for typos in request
  • Validate input before sending

订单问题

订单处理卡住

症状: 订单状态保持“处理中”

Solutions:

  • Wait up to 5 minutes for confirmation
  • Check blockchain transaction status
  • Verify network isn't congested
  • Contact support with order ID

周期未显示

症状: 已购买周期未显示在状态中

Solutions:

  • Allow 1-2 minutes for update
  • Check order confirmation response
  • Verify correct address was used
  • Use /time/status to refresh

支付失败

症状: 订单因支付问题被拒绝

Solutions:

  • Verify account balance sufficient
  • Check payment method valid
  • Ensure no account restrictions
  • Contact support for payment help

获取帮助

如果您遇到此处未涵盖的问题:

  1. Check Documentation: Review this guide and related endpoints
  2. API Status: Check https://status.netts.io for service status
  3. Order History: Review orders in dashboard
  4. Support Ticket: Submit ticket with order ID
  5. Emergency: Use emergency contact for urgent issues

Webhook

可用的Webhook事件

  • order.created: New order placed
  • order.confirmed: Order payment confirmed
  • order.fulfilled: Cycles added to address
  • order.failed: Order failed to process
  • cycle.activated: New cycle started
  • cycle.expiring: Cycle about to expire
  • cycles.low: Running low on cycles

Webhook 配置

json
{
    "url": "https://your-server.com/webhooks",
    "events": ["order.confirmed", "cycles.low"],
    "secret": "your_webhook_secret"
}

Webhook有效负载示例

json
{
    "event": "order.confirmed",
    "timestamp": 1699528800,
    "data": {
        "order_id": "ORD-20231109-A7C9F2B3",
        "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "cycles": 10,
        "total_cost": 30.0,
        "api_key_id": "key_123***"
    },
    "signature": "sha256=abc123..."
}

备注

  • Prerequisites: Address must be in Host Mode via /time/add first
  • Immediate Processing: Orders are processed instantly upon payment
  • No Cancellation: Purchased cycles cannot be cancelled or refunded
  • Transferability: Cycles cannot be transferred between addresses
  • Expiry: Unused cycles don't expire but remain queued
  • Stacking: Multiple orders stack sequentially, not concurrently
  • Price Changes: Prices locked at time of purchase
  • Bulk Orders: Contact support for orders over 1000 cycles
  • API Versioning: This is v2 API; v1 uses different pricing
  • Maintenance: Orders continue processing during maintenance
  • Network Issues: Orders retry automatically if network issues occur
  • Order History: Full order history available in dashboard
  • Tax Invoices: Available for business accounts on request
  • Discounts: Volume discounts applied automatically
  • Monitoring: Real-time cycle usage monitoring in dashboard