{
  "version": "1",
  "generated_at": "2026-09-29T09:39:56.820Z",
  "brand": {
    "name": "TEnergy",
    "domain": "tenergy.me",
    "support": "https://tenergy.me/contact"
  },
  "api": {
    "base_url": "https://api.tenergy.me/v1",
    "testnet_base_url": "https://api-nile.tenergy.me/v1",
    "testnet": {
      "network": "nile",
      "separate_account_and_keys": true,
      "identical_to_mainnet": false,
      "differences": [
        "provider execution available through ITRX only",
        "small fixed supply inventory",
        "max delegate lock 5 days (mainnet 30), unfreeze delay 1 day (mainnet 14)",
        "the unstake pipeline cannot be exercised here"
      ],
      "faucet": "https://nileex.io/join/getJoinPage"
    },
    "openapi": "https://tenergy.me/openapi.yaml",
    "auth": {
      "type": "hmac",
      "headers": [
        "X-API-KEY",
        "X-API-TIMESTAMP",
        "X-API-SIGN"
      ],
      "signature": "base64(HMAC-SHA256(secret, timestamp + method + path + query + body))",
      "clock_skew_seconds": 5
    },
    "idempotency": {
      "order_field": "client_order_id",
      "header": "Idempotency-Key"
    },
    "rate_limits_url": "https://tenergy.me/docs/errors.md#rate-limits"
  },
  "units": {
    "money": "SUN (1 TRX = 1_000_000 SUN), integers only",
    "energy": "units of TRON energy",
    "time": "RFC 3339 UTC"
  },
  "steps": [
    {
      "id": "create_account",
      "human_required": true,
      "human_action": "sign the returned message with the wallet you control",
      "requests": [
        {
          "method": "POST",
          "path": "/accounts/challenge",
          "body": {
            "address": "T...",
            "purpose": "signup"
          }
        },
        {
          "method": "POST",
          "path": "/accounts/challenge/verify",
          "body": {
            "address": "T...",
            "nonce": "...",
            "signature": "..."
          }
        },
        {
          "method": "POST",
          "path": "/accounts",
          "auth": "Bearer bootstrap_token",
          "body": {
            "address": "T..."
          }
        }
      ],
      "returns": [
        "bootstrap_token",
        "account_id",
        "deposit_addresses",
        "status"
      ],
      "next_on": {
        "status=unfunded": "create_api_key"
      }
    },
    {
      "id": "create_api_key",
      "human_required": true,
      "human_action": "choose the permissions this key carries — there is no default set and none may be assumed",
      "requests": [
        {
          "method": "POST",
          "path": "/api-keys",
          "auth": "Bearer bootstrap_token",
          "body": {
            "label": "...",
            "scopes": [
              "<chosen by the customer>"
            ]
          }
        }
      ],
      "scopes_vocabulary": "https://tenergy.me/openapi.yaml#/components/schemas/ApiKeyScope",
      "returns": [
        "key",
        "secret"
      ],
      "warning": "secret is returned once; store it before continuing"
    },
    {
      "id": "deposit",
      "human_required": true,
      "human_action": "send TRX or USDT to the deposit address",
      "requests": [
        {
          "method": "GET",
          "path": "/accounts/deposit-address",
          "auth": "Bearer bootstrap_token"
        }
      ],
      "poll": {
        "method": "GET",
        "path": "/account",
        "auth": "api_key",
        "until": "status == 'active'",
        "note": "credited after 19 confirmations, about a minute"
      }
    },
    {
      "id": "estimate",
      "human_required": false,
      "binding": false,
      "requests": [
        {
          "method": "GET",
          "path": "/estimate",
          "query": {
            "resource": "energy",
            "amount": 65000,
            "tier": "1h",
            "receiver": "T..."
          }
        }
      ],
      "returns": [
        "price_sun_per_unit",
        "total_amount_sun",
        "as_of"
      ]
    },
    {
      "id": "quote",
      "human_required": false,
      "optional": true,
      "binding": true,
      "requests": [
        {
          "method": "POST",
          "path": "/quotes",
          "body": {
            "resource": "energy",
            "amount": 65000,
            "tier": "1h",
            "receiver": "T..."
          }
        }
      ],
      "returns": [
        "id",
        "total_amount_sun",
        "expires_at"
      ],
      "note": "quote TTL is 120 s; read expires_at"
    },
    {
      "id": "order",
      "human_required": true,
      "human_action": "approve the spend",
      "requests": [
        {
          "method": "POST",
          "path": "/orders",
          "body": {
            "quote_id": "...",
            "client_order_id": "..."
          }
        }
      ],
      "returns": [
        "id",
        "status"
      ]
    },
    {
      "id": "confirm",
      "human_required": false,
      "poll": {
        "method": "GET",
        "path": "/orders/{orderId}",
        "until": "status in [confirmed, active]"
      },
      "check": "partial == false, else delivered_amount is below amount and the difference was refunded",
      "verify_on_chain": "the receiver's energy limit increases by the ordered amount"
    },
    {
      "id": "webhook",
      "human_required": false,
      "optional": true,
      "requests": [
        {
          "method": "POST",
          "path": "/webhooks",
          "body": {
            "url": "https://...",
            "events": [
              "order.confirmed",
              "order.failed",
              "order.expired",
              "order.refunded",
              "balance.credited"
            ]
          }
        }
      ],
      "returns": [
        "id",
        "secret"
      ],
      "note": "we issue the signing secret and return it once; you do not supply one"
    }
  ],
  "safety": {
    "never_required": [
      "private key",
      "seed phrase",
      "mnemonic",
      "wallet password",
      "token approval",
      "transaction signature for payment"
    ],
    "note": "Energy is delegated to a public address. If anything asks you for a key while renting energy, it is an attack."
  },
  "limits": {
    "documented_at": "https://tenergy.me/docs/errors.md#rate-limits"
  },
  "prompt": "https://tenergy.me/docs/agent-quickstart",
  "mcp": {
    "npm": "@tenergy/mcp",
    "command": "npx -y @tenergy/mcp",
    "docs": "https://tenergy.me/docs/mcp"
  },
  "errors": "https://tenergy.me/docs/errors"
}
