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/stopAuthentication
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key (or X-API-KEY header). |
| address | string | Yes | TRON (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/orderor/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
| Field | Type | Description |
|---|---|---|
| code | integer | 0 = success, negative = error |
| msg | string | Human-readable message |
| data.address | string | The address that was stopped |
| data.orders_closed | integer | Number of open orders that were closed |
| data.status | string | "inactive" |
| data.timestamp | string | ISO timestamp |
Error Responses
| code | msg | Cause |
|---|---|---|
| -1 | API key required in X-API-KEY header or request body | No API key provided |
| -1 | Invalid API key or IP not in whitelist | Authentication failed |
| -1 | Invalid TRC-20 address format | Bad address format |
| -1 | Database error stopping host mode | Temporary server-side error — retry |
| -1 | Internal server error | Unexpected error — retry or contact support |
| -4 | Address not found | Address is not in Host Mode under your account |
| -7 | Host mode is already inactive | The 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:
| HTTP | Body | Cause |
|---|---|---|
| 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
| Stop | Delete | |
|---|---|---|
| Host Mode registration | Kept | Removed |
| Open orders | Closed | Must be none |
| Re-activation | order / infinitystart | Must add again |
| Callback URL | Kept | Removed |
Related Endpoints
- POST /apiv2/time/infinitystart — re-activate the address (infinity)
- POST /apiv2/time/order — re-activate with a fixed number of cycles
- POST /apiv2/time/status — check status
- POST /apiv2/time/delete — remove the address entirely
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.