Skip to content

POST /apiv2/userinfo

Retrieve user information, including balance and usage statistics.

Endpoint URL

POST https://netts.io/apiv2/userinfo

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-API-KEYYesYour API key
X-Real-IPYesIP address from whitelist

Request Body

json
{}

Request does not require parameters in the body.

Example Requests

cURL

bash
curl -X POST https://netts.io/apiv2/userinfo \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key" \
  -H "X-Real-IP: your_whitelisted_ip" \
  -d '{}'

Python

python
import requests

url = "https://netts.io/apiv2/userinfo"
headers = {
    "Content-Type": "application/json",
    "X-API-KEY": "your_api_key",
    "X-Real-IP": "your_whitelisted_ip"
}

response = requests.post(url, headers=headers, json={})
data = response.json()

if response.status_code == 200:
    user_info = data.get('data', {})
    print(f"User ID: {user_info.get('user_id')}")
    print(f"Balance: {user_info.get('balance')} TRX")
    print(f"Total orders: {user_info.get('total_orders')}")
else:
    print(f"Error: {data.get('msg')}")

Response

Success Response (200 OK)

json
{
    "code": 0,
    "msg": "Success",
    "data": {
        "user_id": 12345,
        "username": "example_user",
        "balance": "150.50",
        "total_orders": 25,
        "active_rentals": 2,
        "api_calls_today": 45,
        "api_limit": 1000
    }
}

Notes

  • All balance values are in TRX
  • API calls are limited to 1000 per day per API key
  • Active rentals shows current ongoing energy delegations