Queue mode: energy for payouts sent one at a time
A queue session keeps a level of unspent energy on one sending wallet while a run of USDT payouts leaves the wallet one transfer at a time. You name the wallet and the payments, as a list or a count, and press Start. We refill the level with the cheapest five-minute energy as your transfers spend it, and charge for each packet once its delivery is visible on chain. The other three ways to keep a payout wallet in energy are a stake, an order per transfer and an Auto-refill rule.
What a session keeps on the wallet
The level is target_units, 1,000,000 units by default: about fifteen transfers to addresses already holding USDT, at 65,000 units each, or seven to addresses that hold none, at 131,000. The lowest target accepted is 65,000, one transfer to an address holding USDT. The session never holds more than the next transfers in the queue need, so the level shrinks near the end of a list and nothing is bought for an empty one.
A packet costs the five-minute tariff when we buy it. When the vendor's charge to us plus our minimum margin is above the tariff, the packet costs the lowest whole number of sun per unit that covers the vendor's charge plus that margin, and we do not buy above a fixed multiple of the tariff. Start reserves hold_trx, the target at today's five-minute price times a safety multiplier. We charge each packet against the reserve and top the reserve up from your available balance; the rest returns when the session ends.
Creating a session and pressing Start
The sending wallet, from, has to be activated, cannot be a contract or sit on the USDT blacklist, and holds the USDT you pay out plus a little TRX for bandwidth. The payments are items, each a to and an amount_usdt, in sending order; the list can start empty and grow through POST /v1/queue-sessions/{session_id}/items, up to 500 items a request.
POST /v1/queue-sessions requires an Idempotency-Key, as an append does, and answers 201 with the session in created, nothing reserved or bought. POST /v1/queue-sessions/{session_id}/start moves it to running, places the reserve, returns its amount in hold_trx and sends queue.started. Start also claims the wallet, which one account at a time can keep in queue mode.
After Start
A pass every few seconds buys back what your transfers spent, and a packet about to expire is replaced a minute ahead so that the level does not dip.
You send USDT in list order. We match each transfer seen on chain to an item by recipient, in queue order, and the item turns sent with your transfer's hash in sent_txid; GET /v1/queue-sessions/{session_id} shows the status, its reason, next_item and the counters. An item at the head of the queue that we do not see sent for half an hour turns skipped and does not come back; the half hour starts when the item becomes the head (at Start, for the first item) and again when a pause ends. Append it again if the payment is still going out.
What is charged, and when to press Stop
You pay for every packet delivered to your wallet, spent or not, since we cannot take delivered energy back. A running session that nobody sends from keeps buying up to the level, and every packet it delivers is charged.
On the network, when a packet arrives while an almost spent packet is still on the wallet, part of the energy the old packet used is counted against the new one, so we buy each replacement with a margin for the remaining transfers. At the tail of a session, this margin makes the replacement two to four and a half times what the remaining transfers need. After your last transfer the margin expires unused, and you have paid for it.
If the session still expects a transfer you will not make, press Stop as soon as your last real transfer has gone; until you do, the level is replaced every five minutes, and you pay for each replacement. Keep the target near what the wallet sends in five minutes: a wallet that sends three transfers to addresses holding USDT in that time wants 200,000.
Why a session pauses, and how it resumes
When the wallet's USDT is below the next payment's amount, the session pauses with insufficient_balance (the pause reason shares its name with the 402 code, which is about your balance with us) and resumes with balance_restored after you send enough USDT to the wallet. If your available balance with us cannot cover even the next packet, the session pauses with hold_exhausted, and a deposit that covers the difference resumes it with hold_restored. While we are not taking orders, sessions wait with service_paused until service_resumed. Each pause sends queue.paused, each resume queue.resumed, and resuming needs no call from you.
How a session ends
A session completes once its list is used up, or its count reached, and the last delivered packet has expired; it then turns completed, reason queue_exhausted, and queue.completed carries the final counters. A payment that comes due after that needs a new session.
Stop is POST /v1/queue-sessions/{session_id}/stop or the button in the cabinet, from created, running or paused. Buying stops with the call. Packets bought seconds before the Stop still settle, each with a queue.packet_delivered that can arrive after queue.stopped, and the reserve returns after the last of them. Starting or appending to a stopped or completed session, or stopping a completed one, answers 409 queue_session_closed.
A session with no list
A session can take expected_transfers, the number of transfers coming, in place of items. Every outgoing USDT transfer from the wallet after Start counts as one, and we read neither recipients nor amounts. We size the energy for each transfer by the energy the wallet's recent USDT transfers used, or as one to an address holding no USDT until there is such a history. There is no USDT-balance pause, and an append answers 422 invalid_request, reason session_without_items.
Refusals and their codes
A target_units or expected_transfers outside its bounds is 400 invalid_request with the bounds in details. An inactive, contract or blacklisted sender is 422 invalid_address, reason inactive_wallet, contract_wallet or blacklisted_wallet; a blacklisted recipient is 422 blacklisted_recipient with its position in details.index. A second live session of yours on the wallet is 409 queue_session_active on create. A wallet kept by another account's session is 409 wallet_busy on create and on Start, and the answer does not say whose session it is.
Create, and an append to a session still in created, answer 402 insufficient_balance when your available balance cannot pay for one transfer's energy at the five-minute price, and Start answers it when the balance cannot cover the reserve; required_trx and available_trx say what is needed and what you have. The other codes are 422 invalid_request with sessions_limit_reached (session limit) or items_limit_reached (item ceiling), 400 invalid_request with items_or_expected_transfers (both forms in one body), 409 idempotency_conflict (a key reused with another body), 429 rate_limited (node budget spent), and 404 not_found on every path while queue mode is off for your account.
Events and the ledger
Every queue.* event carries session_id and counters. queue.started comes first, then one queue.packet_delivered per delivered packet, with units, price_sun, that packet's charged_trx and the reserve left in hold_trx. The session closes with queue.completed or queue.stopped. Only queue.packet_delivered moves money, one charge per packet, and its price_sun can be above the tariff. The running total is counters.charged_trx: final in queue.completed, and after queue.stopped it is the one in the last queue.packet_delivered. Each reserve, charge and return is a line in GET /v1/ledger with the session's id in queue_session_id; a session creates no orders.
Batch order, Auto-refill rule or queue session
| Batch order | Auto-refill rule | Queue session | |
|---|---|---|---|
| What you hand over | The whole run, up to 500 transfers, in one POST /v1/orders | A wallet address and a daily_budget_trx | The sending wallet, a target_units, and the payments as a list or a count |
| When energy is bought | Once the order is placed, about a second a position, one send_before for all; on the five-minute lease a batch is cut short past about 269 transfers | When the rule starts, then after each transfer the wallet makes, back to about 131,000 units | From Start, up to the level; again after transfers spend it, and a minute before each packet expires |
| What you pay for unused energy | A position whose window closes before you send ends expired and is charged | Each top-up once it is on the wallet. The top-up after a run's last transfer waits on the wallet for the next one; deleting the rule before its top-ups cover what we prepaid for the wallet costs the uncovered part | Every packet delivered to the wallet, including those that settle after Stop and the margin of the last replacement |
| When to choose it (our reading) | The whole run is known before it starts and goes out within one lease | The wallet sends all day with quiet stretches, under a daily spending ceiling | A run from one wallet that you can count in advance and send one payment at a time |
On the hour lease a batch can wait for approvals (choosing a lease, batch payouts). With a session you pay for the level while it runs; with a rule you pay for a first top-up and then one after each transfer, so in our reading a session fits a run that keeps the wallet busy.
We have not measured how long a packet takes to reach the wallet, how many packets a session buys, or what one run costs as a session, as a batch and under a rule.
Open a session for your next run, give it the payments as a list or a count, and nothing is reserved until you press Start: POST /v1/queue-sessions in the API reference →