Buy cycles and switch the address on
Buys a given number of delegation cycles for an address and activates Host Mode. If the address is not in Host Mode yet, the order registers it too.
Ordering cycles does not charge you upfront. Each cycle is billed at the moment its energy is delegated: the first delegation of an activation costs 4 TRX, every next one costs 2 TRX if your previous transfer consumed 65,000 energy or less, and 4 TRX if it consumed more. The amount in the response is an estimate (cycles × reference price), not the final total.
The balance is checked before the order is accepted: if it does not cover the order, the order is rejected with code -2.
Only one open order per address is allowed at a time. Purchased cycles are consumed one per delegation; when they run out, the address stops itself.
Authorizations
API key from the dashboard. Some Host Mode endpoints also accept the key as an api_key field in the request body — this is stated in the schema of the particular operation.
Request Body
Responses
Success is code: 0. Errors also arrive with HTTP 200: -1 — authentication, address format, cycles below one, or a temporary database error; -2 — insufficient balance; -6 — the address already has an open order, including an infinity one. application/json: schema: { $ref: '#/components/schemas/HostEnvelope' } examples: ok: summary: 'Cycles purchased, address activated' value: code: 0 msg: Cycles purchased and host mode activated successfully data: order_id: 5426 address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE cycles: 10 amount: 23.5 status: active timestamp: '2026-07-13T05:30:15.123456' insufficient: summary: 'Insufficient balance' value: code: -2 msg: 'Insufficient balance. Required: 23.5 TRX, Available: 10.0 TRX' data: null