Skip to content

GET /apiv2/order_check

Retrieve detailed information about a specific 1-hour energy order, including cost breakdown, activation details, and subuser markup information.

Endpoint URL

GET https://netts.io/apiv2/order_check

Request Headers

HeaderRequiredDescription
X-API-KEYYesYour API key from Netts dashboard

Query Parameters

ParameterTypeRequiredDescription
order_idstringYesOrder ID in format 1H{hash} (e.g., 1Ha1b2c3d4e5)

Example Requests

cURL

bash
curl -X GET "https://netts.io/apiv2/order_check?order_id=1Ha1b2c3d4e5" \
  -H "X-API-KEY: your_api_key"

Python

python
import requests

url = "https://netts.io/apiv2/order_check"
headers = {
    "X-API-KEY": "your_api_key"
}
params = {
    "order_id": "1Ha1b2c3d4e5"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

if data.get("success"):
    order = data.get("order", {})
    print(f"Order ID: {order.get('id')}")
    print(f"Total Cost: {order.get('cost')} TRX")
    print(f"Energy: {order.get('energy')}")
    print(f"Rate: {order.get('rate_sun')} sun/energy")
    print(f"Target Address: {order.get('target_address')}")

    # Check if activation was performed
    activation = data.get("activation")
    if activation:
        print(f"Activation Cost: {activation.get('cost')} TRX")
        print(f"Activation Hash: {activation.get('tx_hash')}")
else:
    print(f"Error: {data.get('msg')}")

JavaScript (Node.js)

javascript
const axios = require('axios');

const url = 'https://netts.io/apiv2/order_check';
const headers = {
    'X-API-KEY': 'your_api_key'
};
const params = {
    order_id: '1Ha1b2c3d4e5'
};

axios.get(url, { headers, params })
    .then(response => {
        const data = response.data;
        if (data.success) {
            console.log('Order:', data.order);
            console.log('Activation:', data.activation);
        } else {
            console.log('Error:', data.msg);
        }
    })
    .catch(error => console.error('Request failed:', error));

Response

Success Response (200 OK)

json
{
    "success": true,
    "code": 10000,
    "order": {
        "id": "1Ha1b2c3d4e5",
        "cost": 2.535,
        "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "energy": 65000,
        "duration": "1 hour",
        "tx_hashes": ["a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678"],
        "timestamp": "2025-12-03T15:21:34.182127",
        "rate_sun": 39.0,
        "comments": null
    },
    "activation": null,
    "subuser_payout": null
}

Success Response with Activation (200 OK)

When the target address required activation:

json
{
    "success": true,
    "code": 10000,
    "order": {
        "id": "1Ha1b2c3d4e5",
        "cost": 3.635,
        "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "energy": 65000,
        "duration": "1 hour",
        "tx_hashes": ["a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678"],
        "timestamp": "2025-12-03T15:21:34.182127",
        "rate_sun": 39.0,
        "comments": "Includes activation: 1.1 TRX"
    },
    "activation": {
        "cost": 1.1,
        "tx_hash": "b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456789a"
    },
    "subuser_payout": null
}

Success Response with Subuser Payout (200 OK)

For parent users viewing subuser orders:

json
{
    "success": true,
    "code": 10000,
    "order": {
        "id": "1Ha1b2c3d4e5",
        "cost": 3.93,
        "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "energy": 65000,
        "duration": "1 hour",
        "tx_hashes": ["c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456789abc"],
        "timestamp": "2025-12-03T16:55:16.525118",
        "rate_sun": 60.5,
        "comments": "Includes activation: 1.1 TRX"
    },
    "activation": {
        "cost": 1.1,
        "tx_hash": "b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456789a"
    },
    "subuser_payout": {
        "parent_id": 12,
        "gross_cost": 3.93,
        "energy_markup": 0.195,
        "activation_markup": 0.1,
        "total_markup": 0.295,
        "net_cost": 3.635,
        "subuser_rate_sun": 43.5,
        "parent_rate_sun": 39.0
    }
}

Response Fields

Main Response

FieldTypeDescription
successbooleantrue if request was successful
codeinteger10000 for successful requests
orderobjectOrder details
activationobject | nullActivation details (if address was activated)
subuser_payoutobject | nullSubuser markup details (only for parent users)

Order Object

FieldTypeDescription
idstringOrder ID in format 1H{hash}
costnumberTotal cost paid by user (TRX)
target_addressstringAddress that received energy
energyintegerEnergy amount delegated
durationstringDelegation duration (always "1 hour")
tx_hashesarrayList of delegation transaction hashes
timestampstringOrder creation time (ISO 8601 format)
rate_sunnumberEnergy rate in sun per energy unit
commentsstring | nullAdditional information (e.g., activation notice)

Activation Object

FieldTypeDescription
costnumberActivation cost (TRX)
tx_hashstringActivation transaction hash

Subuser Payout Object

Parent Users Only

The subuser_payout field is only included for parent users viewing their subusers' orders. Subusers (mock users) will not see this field.

FieldTypeDescription
parent_idintegerParent user ID
gross_costnumberTotal cost paid by subuser (TRX)
energy_markupnumberEnergy markup amount (TRX)
activation_markupnumberActivation markup amount (TRX)
total_markupnumberTotal markup (energy + activation)
net_costnumberCost minus markup (parent's actual cost)
subuser_rate_sunnumberRate paid by subuser (sun/energy)
parent_rate_sunnumberActual rate without markup (sun/energy)

Error Responses

Missing Order ID (400)

json
{
    "success": false,
    "code": -2,
    "msg": "order_id parameter required"
}

Authentication Error (401)

json
{
    "success": false,
    "code": -1,
    "msg": "API key not provided"
}
json
{
    "success": false,
    "code": -1,
    "msg": "Invalid API key or IP not in whitelist"
}

Access Denied (403)

When trying to view an order that belongs to another user:

json
{
    "success": false,
    "code": -4,
    "msg": "Order does not belong to this user"
}

Order Not Found (404)

json
{
    "success": false,
    "code": -3,
    "msg": "Order not found"
}

Internal Server Error (500)

json
{
    "success": false,
    "msg": "Internal server error"
}

Error Code Reference

CodeDescriptionHTTP Status
10000Success200
-1Authentication failed401
-2Missing order_id parameter400
-3Order not found404
-4Access denied (not your order)403

Rate Limits

The following rate limits apply to this endpoint (per IP address):

PeriodLimitDescription
1 second50 requestsMaximum 50 requests per second

Rate Limit Headers

http
RateLimit-Limit: 50
RateLimit-Remaining: 49
RateLimit-Reset: 1
X-RateLimit-Limit-Second: 50
X-RateLimit-Remaining-Second: 49

Rate Limit Exceeded (429)

json
{
    "message": "API rate limit exceeded"
}

Access Control

Order Ownership

Users can only view their own orders. The API checks ownership based on:

  • Google users: Matches google_user_id from order with user's Google ID
  • Telegram users: Matches tg_user_id from order with user's Telegram ID

Parent-Subuser Access

Parent users can view orders created by their subusers. In this case:

  • The subuser_payout field is included in the response
  • Parent can see markup breakdown and their actual cost

Subuser (Mock) Access

Subusers viewing their own orders will see:

  • Their actual cost (including markup) in order.cost
  • Their rate (including markup) in order.rate_sun
  • The subuser_payout field is not included

Use Cases

1. Verify Order Completion

After placing an order with /apiv2/order1h, use this endpoint to verify:

  • Order was processed successfully
  • Energy was delegated to correct address
  • Correct amount was charged

2. Get Transaction Hash

Retrieve the delegation transaction hash for blockchain verification:

python
response = requests.get(
    "https://netts.io/apiv2/order_check",
    headers={"X-API-KEY": "your_api_key"},
    params={"order_id": "1Ha1b2c3d4e5"}
)

data = response.json()
if data["success"]:
    tx_hashes = data["order"]["tx_hashes"]
    if tx_hashes:
        print(f"Verify on Tronscan: https://tronscan.org/#/transaction/{tx_hashes[0]}")

3. Track Subuser Costs (Parent Users)

Parent users can monitor their subusers' orders and markup earnings:

python
response = requests.get(
    "https://netts.io/apiv2/order_check",
    headers={"X-API-KEY": "parent_api_key"},
    params={"order_id": "1Ha1b2c3d4e5"}
)

data = response.json()
if data["success"] and data.get("subuser_payout"):
    payout = data["subuser_payout"]
    print(f"Subuser paid: {payout['gross_cost']} TRX")
    print(f"Your markup: {payout['total_markup']} TRX")
    print(f"Your actual cost: {payout['net_cost']} TRX")

Notes

  • Orders can be queried immediately after creation
  • Transaction hashes may be empty if the provider doesn't return them
  • The rate_sun field shows the effective rate per energy unit in sun
  • Activation cost is included in total cost when applicable
  • The comments field provides additional context (e.g., activation notice)
  • This endpoint only returns 1-hour orders created via /apiv2/order1h