POST /apiv2/time/delete
Remove a TRON address from Host Mode entirely. By default the address must already be inactive (stopped) and have no open orders; pass "stop": true to stop it and delete it in one call.
Endpoint URL
POST https://netts.io/apiv2/time/deleteAuthentication
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
{
"api_key": "your_api_key",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"stop": true
}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 belong to your account. |
| stop | boolean | No | true — stop Host Mode on the address before deleting it, instead of refusing the call. Saves a separate request to /apiv2/time/stop. Defaults to false. |
Behaviour
- Without
stop, the address must be inactive — stop it first with/apiv2/time/stopif it is active — and must have no open orders. Otherwise the call is refused with the errors below and nothing is changed. - On success, the address is removed from Host Mode and its registered callback URL (if any) is deleted.
- The same address can be added again later with
/apiv2/time/add.
stop
With "stop": true an active address is stopped and deleted in one call — the same result as calling /apiv2/time/stop and then /apiv2/time/delete, and exactly the same actions: all open orders for the address are closed, Host Mode is switched off, the cycle counter is reset, and the stop is written to your action history. Only then is the address deleted.
Both steps run in one transaction: either the address is stopped and deleted, or nothing changes at all. There is no state where the address ends up stopped but still registered.
The flag only matters when there is something to stop. On an address that is already inactive and has no open orders it changes nothing — the call behaves exactly as without it, and the response is the plain delete response.
Billing is unaffected: stopping does not refund anything and deleting does not charge anything. Cycles already delegated stay charged, and energy currently delegated to the address is reclaimed on its normal schedule. See Host Mode → Cycles and Pricing.
Example Requests
cURL
curl -X POST https://netts.io/apiv2/time/delete \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY_HERE",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
}'Stop and delete in one call:
curl -X POST https://netts.io/apiv2/time/delete \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY_HERE",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"stop": true
}'Python
import requests
resp = requests.post(
"https://netts.io/apiv2/time/delete",
json={
"api_key": "YOUR_API_KEY_HERE",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
# "stop": True, # optional: stop Host Mode on the address instead of failing
},
timeout=30,
)
result = resp.json()
if result["code"] == 0:
print("Deleted:", result["data"]["address"])
else:
print("Error:", result["msg"])Node.js
const axios = require('axios');
axios.post('https://netts.io/apiv2/time/delete', {
api_key: 'YOUR_API_KEY_HERE',
address: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
// stop: true, // optional: stop Host Mode on the address instead of failing
}).then(({ data: result }) => {
if (result.code === 0) console.log('Deleted:', result.data.address);
else console.error('Error:', result.msg);
}).catch(err => console.error('Request failed:', err.response?.data || err.message));Response
Success (200 OK)
{
"code": 0,
"msg": "Address deleted from Host Mode successfully",
"data": {
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"timestamp": "2026-07-13T05:30:15.123456"
}
}Success when the address was stopped first ("stop": true)
{
"code": 0,
"msg": "Address stopped and deleted from Host Mode successfully",
"data": {
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"stopped": true,
"orders_closed": 1,
"timestamp": "2026-07-13T05:30:15.123456"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | 0 = success, negative = error |
| msg | string | Human-readable message. Address stopped and deleted from Host Mode successfully when the address was stopped as part of the call |
| data.address | string | The address that was removed |
| data.stopped | boolean | Present only when Host Mode was stopped as part of this call. Absent on a plain delete |
| data.orders_closed | integer | Number of open orders closed by that stop. Present only alongside stopped |
| data.timestamp | string | ISO timestamp |
Error Responses
All errors use code = -1:
| msg | Cause |
|---|---|
API key required in X-API-KEY header or request body | No API key provided |
Invalid API key or IP not in whitelist | Authentication failed |
Invalid TRC-20 address format | Bad address format |
Address not found or does not belong to you | Address is not registered under your account |
Cannot delete an active address. Stop Host mode first | Address is active and stop was not set — call /apiv2/time/stop first, or repeat with "stop": true |
Cannot delete address with active orders | The address still has open orders and stop was not set — repeat with "stop": true |
Failed to delete address | The address could not be removed — retry |
Database error deleting address | Temporary server-side error — retry |
Internal server error | Unexpected error — retry or contact support |
{ "code": -1, "msg": "Cannot delete an active address. Stop Host mode first", "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 |
Deleting an address is always available regardless of your account balance.
Related Endpoints
- POST /apiv2/time/stop — stop the address before deleting
- POST /apiv2/time/status — check status and open orders
- POST /apiv2/time/add — add the address again later
Notes
- Deleting also removes the address's callback URL.
- Delete is only allowed for inactive addresses with no open orders — stop it first with
/apiv2/time/stop, or pass"stop": truehere to have it stopped for you. - The same address can be re-added at any time.