agent
swap

Get normalized order status

state: waiting_for_funding | deposit_detected | swap_processing | refunding | completed | terminal_failure | unknown. Top-level outcome (completed | refunded | failed | expired | null) and mayChange (failed/expired can still change, e.g. a late deposit). data.payable and data.payableReason (read them before showing a deposit again), data.origin, data.destination, data.order (order.status action_required: the provider needs an action, agent state unknown), data.deposit (payment non-null only while payable is true), data.evidence (transaction hashes the provider reports), data.received and data.receivedDetail, data.attention, data.trackUrl and data.next {action, statusPath, statusUrl, pollIntervalSec, maxPollIntervalSec, recheckAfterSec, terminal}. next.action contact_support: the provider needs an action Swapper cannot take (data.attention); requote_and_create_new_order: reconfirm_required, this order can never be funded through Swapper. A completed order with evidence.payout null has no payout transaction reported yet (data.attention payout_unconfirmed): check the destination wallet. Long-poll: with waitSec (1-25) the response comes as soon as the state differs from sinceState (default: the current state) or when the wait ends, with data.waited {requestedSec, elapsedMs, changed, limited?}. The server re-checks every 15 s while waiting_for_funding or deposit_detected and every 10 s otherwise; limited=true means it answered early because too many long-polls were open or the shared provider budget was spent. A long-poll counts as one request for rate limits. Without waitSec, poll every data.next.pollIntervalSec until terminal=true; on 429/5xx honor Retry-After. Confirmation requirements are provider-defined; XMR deposits commonly need about 10 Monero confirmations. During a provider outage the error carries details.lastKnown {status, state, observedAt}: the order is unaffected; do not create another order or send again. A completed order adds data.afterSwap {feedback: {optional: true, tool: submit_feedback, path: /api/v1/agent/feedback, arguments: {orderId, rating: null}}}: an optional rating, nothing more.

get/agent/swap/status/{orderId}

Request

  • Base URL: https://xmrtousdc.xyz/api/v1
  • URL: https://xmrtousdc.xyz/api/v1/agent/swap/status/{orderId}
  • Auth: none declared

Path parameters

orderIdstring required

Query parameters

verifystring

Optional extra check: the order's destination address. A different value returns 403 verification_failed.

waitSecinteger

Long-poll: wait up to this many seconds for the state to differ from sinceState. 0 (default) answers immediately.

sinceState'waiting_for_funding' | 'deposit_detected' | 'swap_processing' | 'refunding' | 'completed' | 'terminal_failure' | 'unknown'

The state from your previous call. Default: the current state.

Response

Status response

okboolean
operationstring
state'waiting_for_funding' | 'deposit_detected' | 'swap_processing' | 'refunding' | 'completed' | 'terminal_failure' | 'unknown'
terminalboolean
outcome'completed' | 'refunded' | 'failed' | 'expired' | 'null' nullable
mayChangeboolean

Example response

{
  "operation": "swap.status",
  "data": {
    "deposit": {
      "payment": {
        "uri": "monero:<deposit address>?tx_amount=0.5",
        "gas": {
          "symbol": "ETH",
          "chain": "Arbitrum One"
        }
      }
    },
    "afterSwap": {
      "feedback": {
        "path": "/api/v1/agent/feedback"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.