---
title: "The order line"
method: GET
path: "/agent/swap/queue"
tags: ["agent", "swap"]
---

# The order line

`GET /agent/swap/queue`

## Request

- Base URL: `https://xmrtousdc.xyz/api/v1`
- URL: `https://xmrtousdc.xyz/api/v1/agent/swap/queue`
- Auth: none declared

The provider caps new orders per minute and open orders at once. Past either, POST /agent/swap/create answers 202 state queued (data.queue: position, etaSec, pollAfterSec) and the create waits its turn; send the same create again (same idempotency-key) to get the order. This shows the provider's room now (data.capacity), the line (length, etaForNewSec) and, with ?idempotencyKey=, that create's place (data.entry).

## Query parameters

- `idempotencyKey` string

## Response `200`

Capacity and line

- QueueResponse
  - `ok` true
  - `operation` 'swap.queue'
  - `data` object
    - `enabled` boolean
    - `length` integer
    - `waiting` integer
    - `running` integer
    - `etaForNewSec` integer, nullable: Estimated wait for a create that joined now.
    - `maxLength` integer: Beyond it a create gets 429 queue_full.
    - `maxWaitSec` integer
    - `capacity` object: The provider's room right now (new orders per minute, open orders), as Swapper last read it.
    - `entry` QueueView: A create's place in the order line (apps/bff/src/create-queue.js).
      - `queueId` string
      - `state` 'waiting' | 'running' | 'requote_needed' | 'done' | 'failed' | 'expired'
      - `position` integer, nullable: 1 = next in line; null once out of the line.
      - `ahead` integer, nullable
      - `length` integer
      - `etaSec` integer, nullable: Estimated wait (an estimate).
      - `etaMaxSec` integer, nullable: At most this long if no open order is funded or closed before its window ends.
      - `estimatedAt` string, date-time, nullable
      - `reason` 'provider_rate_limit' | 'provider_open_orders': Which provider limit was reached (new orders per minute, or open orders at once).
      - `enqueuedAt` string, date-time
      - `waitedSec` integer
      - `maxWaitSec` integer: After this the create is dropped from the line (503 queue_timeout).
      - `pollAfterSec` integer: Send the same create again after this many seconds (also the Retry-After header).
      - `quoteId` string, nullable
      - `requotes` integer: How many times the quote was renewed while waiting.
      - `note` string
    - `note` string

---

[API](https://skmtc.dev/xmrtousdc/apis/swapper-agent-api.md) · [All operations](https://skmtc.dev/xmrtousdc/apis/swapper-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xmrtousdc/apis/swapper-agent-api/revisions/9f4252126907?raw)
