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_checkRequest Headers
| Header | Required | Description |
|---|---|---|
| X-API-KEY | Yes | Your API key from Netts dashboard |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Order ID in format 1H{hash} (e.g., 1Ha1b2c3d4e5) |
Example Requests
cURL
curl -X GET "https://netts.io/apiv2/order_check?order_id=1Ha1b2c3d4e5" \
-H "X-API-KEY: your_api_key"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)
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)
{
"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:
{
"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:
{
"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
| Field | Type | Description |
|---|---|---|
| success | boolean | true if request was successful |
| code | integer | 10000 for successful requests |
| order | object | Order details |
| activation | object | null | Activation details (if address was activated) |
| subuser_payout | object | null | Subuser markup details (only for parent users) |
Order Object
| Field | Type | Description |
|---|---|---|
| id | string | Order ID in format 1H{hash} |
| cost | number | Total cost paid by user (TRX) |
| target_address | string | Address that received energy |
| energy | integer | Energy amount delegated |
| duration | string | Delegation duration (always "1 hour") |
| tx_hashes | array | List of delegation transaction hashes |
| timestamp | string | Order creation time (ISO 8601 format) |
| rate_sun | number | Energy rate in sun per energy unit |
| comments | string | null | Additional information (e.g., activation notice) |
Activation Object
| Field | Type | Description |
|---|---|---|
| cost | number | Activation cost (TRX) |
| tx_hash | string | Activation 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.
| Field | Type | Description |
|---|---|---|
| parent_id | integer | Parent user ID |
| gross_cost | number | Total cost paid by subuser (TRX) |
| energy_markup | number | Energy markup amount (TRX) |
| activation_markup | number | Activation markup amount (TRX) |
| total_markup | number | Total markup (energy + activation) |
| net_cost | number | Cost minus markup (parent's actual cost) |
| subuser_rate_sun | number | Rate paid by subuser (sun/energy) |
| parent_rate_sun | number | Actual rate without markup (sun/energy) |
Error Responses
Missing Order ID (400)
{
"success": false,
"code": -2,
"msg": "order_id parameter required"
}Authentication Error (401)
{
"success": false,
"code": -1,
"msg": "API key not provided"
}{
"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:
{
"success": false,
"code": -4,
"msg": "Order does not belong to this user"
}Order Not Found (404)
{
"success": false,
"code": -3,
"msg": "Order not found"
}Internal Server Error (500)
{
"success": false,
"msg": "Internal server error"
}Error Code Reference
| Code | Description | HTTP Status |
|---|---|---|
10000 | Success | 200 |
-1 | Authentication failed | 401 |
-2 | Missing order_id parameter | 400 |
-3 | Order not found | 404 |
-4 | Access denied (not your order) | 403 |
Rate Limits
The following rate limits apply to this endpoint (per IP address):
| Period | Limit | Description |
|---|---|---|
| 1 second | 50 requests | Maximum 50 requests per second |
Rate Limit Headers
RateLimit-Limit: 50
RateLimit-Remaining: 49
RateLimit-Reset: 1
X-RateLimit-Limit-Second: 50
X-RateLimit-Remaining-Second: 49Rate Limit Exceeded (429)
{
"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_idfrom order with user's Google ID - Telegram users: Matches
tg_user_idfrom order with user's Telegram ID
Parent-Subuser Access
Parent users can view orders created by their subusers. In this case:
- The
subuser_payoutfield 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_payoutfield 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:
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:
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_sunfield shows the effective rate per energy unit in sun - Activation cost is included in total
costwhen applicable - The
commentsfield provides additional context (e.g., activation notice) - This endpoint only returns 1-hour orders created via
/apiv2/order1h