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

# Payout queue and no-price closes

> The payout queue in totals, how long the oldest unpaid settlement has waited, and the closes made when a market had no price, by day. All time. Poll no more than once every 10 seconds.



## OpenAPI

````yaml /openapi/data-api.json get /v0/capital
openapi: 3.1.0
info:
  title: Rekt data API
  version: '0'
  summary: Read-only HTTP API for settled trades and ended positions.
  description: >-
    `https://data.rekt.trading` serves settled trades and ended positions. It is
    read-only and it needs no account. It sets no cookies and accepts no
    credentials. Responses carry `Access-Control-Allow-Origin: *`. Start at `GET
    /v0/health`.


    The program is the ground of truth. This API is a lagging mirror of it. Read
    live state from the chain through the SDK.


    Rules:


    - Every route answers `GET`, `HEAD` and `OPTIONS`. Any other method gets
    `405`.

    - A request URL is at most 2,048 characters. A longer one gets `414`.

    - Requests are rate-limited for each client address. `GET /v0/health` states
    the limit under `access`. A request over it gets `429` and a `Retry-After`
    header. Wait that long, then retry.

    - This API ignores a parameter that it does not know. A filter that this API
    refuses gets `400`.

    - Money amounts are decimal strings of base units of USDC (6 decimals).
    Addresses are 64 hex characters unless a field says base58. Transaction
    signatures are base58.

    - A response can hold fields that this description does not list. Ignore a
    field that you do not know.
servers:
  - url: https://data.rekt.trading
    description: The data API.
security: []
tags:
  - name: Health
    description: Freshness and limits.
  - name: Aggregates
    description: All-time totals and day series.
  - name: Trades
    description: Settled trades of the last 48 hours.
  - name: Positions
    description: Ended positions of the last 48 hours.
  - name: Minute
    description: Minute rounds of the last 48 hours.
paths:
  /v0/capital:
    get:
      tags:
        - Aggregates
      summary: Payout queue and no-price closes
      description: >-
        The payout queue in totals, how long the oldest unpaid settlement has
        waited, and the closes made when a market had no price, by day. All
        time. Poll no more than once every 10 seconds.
      operationId: getCapital
      responses:
        '200':
          description: The payout queue and the no-price closes.
          headers:
            Cache-Control:
              description: '`public, max-age=10, stale-while-revalidate=30`.'
              schema:
                type: string
            Warning:
              description: >-
                Present only when `asOf.stale` is true. It states that the
                archive is stale.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CapitalResponse'
        '414':
          $ref: '#/components/responses/UriTooLong'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    CapitalResponse:
      type: object
      description: >-
        The payout queue in totals, and the closes made when a market had no
        price, for all time.
      properties:
        asOf:
          $ref: '#/components/schemas/AsOf'
        era:
          $ref: '#/components/schemas/Era'
        units:
          type: string
          description: The units of the money fields, in words.
        dayCells:
          $ref: '#/components/schemas/DayCells'
        queue:
          type: object
          description: The payout queue, in totals.
          properties:
            settles:
              type: integer
              description: >-
                The number of settlements that the queue fold holds. Unit:
                settlements.
            queuedSettles:
              type: integer
              description: >-
                The number of settlements that queued part of a win. Unit:
                settlements.
            queued:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum that went into the queue. Unit: base units of USDC (6
                decimals), as a decimal string.
            delivered:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum that payments delivered from the queue. Unit: base units
                of USDC (6 decimals), as a decimal string.
            escrowed:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum that payments set aside because the program could not
                deliver it. Unit: base units of USDC (6 decimals), as a decimal
                string.
            outstanding:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum that is still owed from the queue. Unit: base units of
                USDC (6 decimals), as a decimal string.
            unfunded:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum that holds a place in the queue and that the pool has
                not yet set aside. Unit: base units of USDC (6 decimals), as a
                decimal string.
            status:
              type: object
              description: >-
                The number of settlements in each queue status (see `status` on
                a trade row `queue` block). Unit: settlements.
              additionalProperties:
                type: integer
            oldestOutstandingAt:
              type:
                - integer
                - 'null'
              description: >-
                The settle time of the oldest settlement that is still owed
                money. Unit: Unix seconds. Null when nothing is owed.
            oldestOutstandingAgeSeconds:
              type:
                - integer
                - 'null'
              description: >-
                How long the oldest settlement that is still owed money has
                waited. Unit: seconds. Null when nothing is owed.
            waitSeconds:
              type: object
              description: Waits of the settlements that are paid in full.
              properties:
                maxS:
                  type: integer
                  description: >-
                    The longest time from a settlement to the payment that
                    cleared it. Unit: seconds.
        dark:
          type: object
          description: The closes made when a market had no price.
          properties:
            closes:
              type: integer
              description: 'The number of these closes. Unit: closes.'
            collateral:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum of the collateral of these closes. Unit: base units of
                USDC (6 decimals), as a decimal string.
            traderPaid:
              type: string
              pattern: ^[0-9]+$
              description: >-
                The sum that these closes paid to traders. Unit: base units of
                USDC (6 decimals), as a decimal string.
            byDay:
              type: object
              description: >-
                The same figures for each UTC day. The key is the day as
                `YYYY-MM-DD`. The API merges thin days: see `dayCells`.
              additionalProperties:
                type: object
                description: The figures of one day.
                properties:
                  closes:
                    type: integer
                    description: 'The number of closes. Unit: closes.'
                  collateral:
                    type: string
                    pattern: ^[0-9]+$
                    description: >-
                      The sum of the collateral. Unit: base units of USDC (6
                      decimals), as a decimal string.
                  traderPaid:
                    type: string
                    pattern: ^[0-9]+$
                    description: >-
                      The sum paid to traders. Unit: base units of USDC (6
                      decimals), as a decimal string.
      required:
        - asOf
        - era
        - units
        - queue
        - dark
    AsOf:
      type: object
      description: How fresh the archive is at the time of this response.
      properties:
        generatedAt:
          type: string
          description: The time the server made this response, in UTC (ISO 8601).
          format: date-time
        archiveTailSlot:
          type:
            - integer
            - 'null'
          description: >-
            The slot of the newest transaction in the archive. Unit: slots. Null
            when the archive is empty.
        archiveTailAt:
          type:
            - string
            - 'null'
          description: >-
            The block time of the newest transaction in the archive, in UTC (ISO
            8601). Null when the archive is empty.
          format: date-time
        stale:
          type: boolean
          description: >-
            True when the archive has not moved for longer than its freshness
            limit. The server still sends a stale response, with a `Warning`
            header.
        staleReason:
          type:
            - string
            - 'null'
          description: Why the archive is stale, in words. Null when `stale` is false.
        entryFeeBasis:
          type: string
          description: >-
            How the entry fees in the rows were found. `observed` means each fee
            is the fee that the trade paid. Only the routes whose rows carry an
            entry fee send this field.
          enum:
            - observed
      required:
        - generatedAt
        - archiveTailSlot
        - archiveTailAt
        - stale
        - staleReason
    Era:
      type: object
      description: The first slot that this API counts.
      properties:
        firstSlot:
          type: integer
          description: >-
            Settlements before this slot belong to a different program id. No
            route counts them. Unit: slots.
      required:
        - firstSlot
    DayCells:
      type: object
      description: The rule for the day series.
      properties:
        minTrades:
          type: integer
          description: >-
            A UTC day with fewer settlements than this number is merged into the
            day after it. Unit: settlements.
        rule:
          type: string
          description: The merge rule, in words.
      required:
        - minTrades
        - rule
    Error:
      type: object
      description: A refused request.
      properties:
        error:
          type: string
          description: What is wrong, in words.
        retryAfterSeconds:
          type: integer
          description: 'On `429` only: wait this long, then retry. Unit: seconds.'
        routes:
          type: array
          items:
            type: string
          description: 'On `404` for an unknown route only: the routes that this API serves.'
      required:
        - error
  responses:
    UriTooLong:
      description: The request URL is longer than 2,048 characters. Shorten it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: >-
        Too many requests. Wait `Retry-After` seconds, then retry. `GET
        /v0/health` states the limit under `access`.
      headers:
        Retry-After:
          description: 'Wait this long before you retry. Unit: seconds.'
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: The server could not answer. Retry later.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.