Poll to a terminal status
An action’sstatus and each of its transactions[]’ status are two different enums; poll the one you need. Transaction status gates sequencing within a single action (see Enter and exit flows); action status tells you when the whole thing is done:
GET /v1/transactions/{id} works the same way for a single transaction. See Actions for the full status tables.
Recover from FAILED and STALE
FAILEDis final. A transaction in the sequence failed or reverted. Do not resubmit a hash or modify the failed transaction. Request a brand new action (enter,exit, ormanage, matching the original intent) instead.STALEmeans no progress for 30 minutes, but it is not final: a transaction that was broadcast late can still confirm and complete the action. Before requesting a replacement, check the stale action’stransactions. If none was ever broadcast, request a new action. If one was broadcast, confirm it on-chain (or withGET /v1/transactions/{id}) first, so a late confirmation doesn’t leave the user with two positions.
List an address’s action history
GET /v1/actions returns an address’s past and in-flight actions, paginated with offset / limit (default 20, max 100):
By default, with no
status or statuses filter, GET /v1/actions hides STALE actions that never broadcast a single transaction: a stale action with at least one broadcast attempt still appears. Pass statuses=STALE (or another explicit filter) to see everything, including stale actions that never left the ground.
cURL
Watch balances for new pending actions
A position’s next required step, such as a claim once a cooldown ends or rewards becomingclaimable, appears as a new entry in that balance’s pendingActions[] the next time you fetch it. Poll the portfolio endpoint on an interval that fits your product, and diff against what you saw last time:
Watch yield health before offering entry
A yield can stop accepting new deposits between the time you last cached its metadata and the time a user tries to enter it. Re-check before offering entry rather than relying on a value fetched earlier in the session:
Treat any of the three as a reason to hide or disable the entry action. See Discover yields for the rest of a yield’s fields.
Rate limits
Every request against a project’s API key counts against that project’s plan tier, and a sustained polling loop (action status, transaction status, balances) is a common source of avoidable request volume. Back off on429 responses using the retry-after header, and see Rate limits for your plan’s limits and response headers.
Webhooks as an alternative to polling
Yield.xyz also emits two webhook events:transaction.status_changed when a transaction is broadcast, confirms, or fails, and position.status_changed when an action settles on chain as SUCCESS or FAILED. An action that fails because its submit was rejected only produces the transaction.status_changed FAILED event. Intermediate transaction statuses such as PENDING are not pushed, and yield availability changes (the status and metadata fields above) have no webhook today, so keep polling for those. See Receive webhooks to set up an endpoint and verify deliveries, and Webhooks for the event model. Polling remains the fallback: use it for anything a webhook subscription doesn’t cover, and to reconcile after a missed or delayed delivery.
Next steps
Tracking balances
Fetch, group, and act on a user’s positions and pending actions.
Enter and exit flows
The sign, submit, and poll loop a fresh action needs after you request it.
Webhooks
Configure endpoints and subscriptions for status-change events.
Rate limits
Plan limits, response headers, and backoff for 429 responses.

