> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CoinJoin Queues (Dash)

> Real-time CoinJoin mixing queue activity on the Dash network

## Overview

`/leokit/coinjoin/queues` exposes live CoinJoin mixing-queue activity on the Dash network. Data comes from a persistent background scanner that maintains TCP connections to Dash masternodes and collects `dsq` broadcasts as they happen.

Use this to display real-time mixing-queue state in privacy wallets, or to audit CoinJoin liquidity across denominations.

## Endpoint

```
GET /leokit/coinjoin/queues
```

## Request

### Authentication

This endpoint is **public** — no `Api-Key` required.

### Query Parameters

| Parameter | Type    | Required | Description                                                         |
| --------- | ------- | -------- | ------------------------------------------------------------------- |
| `detail`  | boolean | No       | If `true`, include the full per-entry list. Default: summaries only |

## Response

### Success (200) — summary mode

```json theme={null}
{
  "data": {
    "queues": [
      { "denomination": "0.1 DASH",    "ready": 3,  "total_seen": 47 },
      { "denomination": "0.01 DASH",   "ready": 1,  "total_seen": 22 },
      { "denomination": "0.001 DASH",  "ready": 0,  "total_seen": 9 }
    ],
    "scanner": {
      "connected_masternodes": 12,
      "running_since": "2026-04-28T08:00:00.000Z",
      "last_dsq_at": "2026-04-28T12:01:14.000Z"
    }
  },
  "status": 200
}
```

### Success (200) — detail mode (`?detail=true`)

```json theme={null}
{
  "data": {
    "queues": [ /* ... same as above ... */ ],
    "scanner": { /* ... */ },
    "entries": [
      {
        "denomination": "0.1 DASH",
        "masternode": "<masternode-id>",
        "received_at": "2026-04-28T12:00:55.000Z",
        "ready": true
      }
    ]
  }
}
```

### Field Reference

#### Queue Summary

| Field          | Description                                           |
| -------------- | ----------------------------------------------------- |
| `denomination` | Mixing denomination label (e.g. `0.1 DASH`)           |
| `ready`        | Count of ready (joinable) queues at this denomination |
| `total_seen`   | Lifetime count of `dsq` broadcasts seen since startup |

#### Scanner Status

| Field                   | Description                                           |
| ----------------------- | ----------------------------------------------------- |
| `connected_masternodes` | Number of masternodes currently TCP-connected         |
| `running_since`         | When the scanner started (ISO-8601)                   |
| `last_dsq_at`           | Timestamp of the most recent `dsq` broadcast received |

## Examples

### Summaries only

```bash theme={null}
curl https://api.leokit.dev/leokit/coinjoin/queues
```

### Full entry list

```bash theme={null}
curl "https://api.leokit.dev/leokit/coinjoin/queues?detail=true"
```

## Notes

* Data resets when the scanner restarts. `total_seen` is a counter from process start, not a long-term cumulative.
* The scanner only listens for `dsq` broadcasts; it does not participate in mixing itself.
* For a deeper integration (push instead of poll), reach out via the [Dashboard](https://dash.leokit.dev) — there is no streaming variant of this endpoint yet.


## OpenAPI

````yaml /api-reference/openapi.json GET /coinjoin/queues
openapi: 3.0.3
info:
  title: Leokit API
  version: 1.0.0
  description: API reference for Leokit
servers:
  - url: https://api.leokit.dev
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /coinjoin/queues:
    get:
      summary: Live Dash CoinJoin queue activity
      description: >-
        Real-time mixing-queue summaries collected from a persistent Dash
        masternode scanner. Public — no Api-Key required.
      parameters:
        - name: detail
          in: query
          required: false
          schema:
            type: boolean
          description: If true, include the full per-entry list.
      responses:
        '200':
          description: Queue summaries and scanner status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinJoinQueuesResponse'
      security:
        - {}
components:
  schemas:
    CoinJoinQueuesResponse:
      type: object
      required:
        - data
        - status
      properties:
        status:
          type: integer
        data:
          type: object
          required:
            - queues
            - scanner
          properties:
            queues:
              type: array
              items:
                $ref: '#/components/schemas/CoinJoinQueueSummary'
            scanner:
              type: object
              properties:
                connected_masternodes:
                  type: integer
                running_since:
                  type: string
                  format: date-time
                last_dsq_at:
                  type: string
                  format: date-time
            entries:
              type: array
              description: Only present when ?detail=true.
              items:
                type: object
                additionalProperties: true
    CoinJoinQueueSummary:
      type: object
      required:
        - denomination
        - ready
        - total_seen
      properties:
        denomination:
          type: string
        ready:
          type: integer
        total_seen:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Api-Key
      description: 'Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4'

````