API

.mdOpenAPI

Guide

Order lifecycle

Every order moves forward only. status is the exact state; stage folds it into the steps a person sees.

Statuses
created → awaiting_payment → paid → delegating → delivered
                │                       │
                └→ expired              └→ failed → refunded

stage (for a progress bar):
  waiting → seen → ready      or      failed / refunded
statusstageMeaning
createdwaitingThe order exists; a deposit address is reserved.
awaiting_paymentwaitingPay the exact amount before expiresAt. An underpayment can be topped up until then.
paidseenThe payment is confirmed on chain (or debited from the balance).
delegatingseenThe Router buys the energy from the cheapest vetted source that can deliver it.
deliveredreadyEnergy is on the address. delivery.txId is the delegation on Tronscan.
expiredwaitingNo payment in time. A payment that arrives later is refunded.
failedfailedNo provider delivered. The full payment is refunded automatically.
refundedrefundedThe money went back to the address that paid (or to the balance).

Tracking an order

Poll Retrieve an order every 2 to 3 seconds while stage is waiting or seen. Each call checks the chain for that order, so you see the payment and the delivery within seconds; stop at ready, failed or refunded. Orders nobody polls are finished by a background job every minute.