Skip to content

POST /apiv2/time/stop

Stop Host Mode for a TRON address: close its open orders and deactivate it. The address stays registered in Host Mode and can be re-activated later.

Endpoint URL

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

Authentication

Provide your API key in the request body (api_key) or the X-API-KEY header. The request IP must be in the whitelist configured for your API key.

Request Body

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

Parameters

ParameterTypeRequiredDescription
api_keystringYesAPI key (or X-API-KEY header).
addressstringYesTRON (TRC-20) address, ^T[1-9A-HJ-NP-Za-km-z]{33}$. Must be in Host Mode and currently active.

Behaviour

Stopping an address:

  • Closes all of its open orders.
  • Sets Host Mode to inactive (status = 0, cycle_set = 0).
  • Resets the used-cycle counter for the address.
  • No new energy is delegated until you re-activate it (with /apiv2/time/order or /apiv2/time/infinitystart).

The address itself stays in Host Mode; to remove it entirely use /apiv2/time/delete.

Example Requests

cURL

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

Python

python
import requests

resp = requests.post(
    "https://netts.io/apiv2/time/stop",
    json={"api_key": "YOUR_API_KEY_HERE", "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"},
    timeout=30,
)
result = resp.json()

if result["code"] == 0:
    print("Stopped. Orders closed:", result["data"]["orders_closed"])
else:
    print("Error:", result["msg"])

Node.js

javascript
const axios = require('axios');

axios.post('https://netts.io/apiv2/time/stop', {
    api_key: 'YOUR_API_KEY_HERE',
    address: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
}).then(({ data: result }) => {
    if (result.code === 0) console.log('Stopped. Orders closed:', result.data.orders_closed);
    else console.error('Error:', result.msg);
}).catch(err => console.error('Request failed:', err.response?.data || err.message));

Response

Success (200 OK)

json
{
    "code": 0,
    "msg": "Host mode stopped successfully, closed 1 order(s)",
    "data": {
        "address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
        "orders_closed": 1,
        "status": "inactive",
        "timestamp": "2026-07-13T05:30:15.123456"
    }
}

Response Fields

FieldTypeDescription
codeinteger0 = success, negative = error
msgstringHuman-readable message
data.addressstringThe address that was stopped
data.orders_closedintegerNumber of open orders that were closed
data.statusstring"inactive"
data.timestampstringISO timestamp

Error Responses

codemsgCause
-1API key required in X-API-KEY header or request bodyNo API key provided
-1Invalid API key or IP not in whitelistAuthentication failed
-1Invalid TRC-20 address formatBad address format
-1Database error stopping host modeTemporary server-side error — retry
-1Internal server errorUnexpected error — retry or contact support
-4Address not foundAddress is not in Host Mode under your account
-7Host mode is already inactiveThe address is already stopped
json
{ "code": -7, "msg": "Host mode is already inactive", "data": null }

HTTP status codes

Endpoint errors are returned with HTTP 200 and a negative code — check code, not the HTTP status. Error bodies always include "data": null.

Some errors are returned before the request reaches the endpoint. They use a non-200 status and a different body shape:

HTTPBodyCause
403{"detail": {"code": 1005, "msg": "API key is blocked. Contact support."}}The API key is blocked — contact support
422{"detail": [ … ]}Request body failed validation: a required field is missing or has the wrong type. Note there is no code field in this response

Stopping an address is always available regardless of your account balance.

Stop vs Delete

StopDelete
Host Mode registrationKeptRemoved
Open ordersClosedMust be none
Re-activationorder / infinitystartMust add again
Callback URLKeptRemoved

Notes

  • Stopping keeps the address in Host Mode; it can be re-activated at any time.
  • Remaining ordered cycles are not carried over — the used-cycle counter is reset on stop.