> ## 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.

# Duel rounds

> Duel rounds of the last 48 hours, newest first. A round that is still live is dated by its start. Each entry is a position on Knockout, and shows how Knockout settled it. A page holds at most 100 rounds.



## OpenAPI

````yaml /openapi/data-api.json get /v0/duel/rounds
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.
  - name: Duel
    description: Duel rounds of the last 48 hours.
paths:
  /v0/duel/rounds:
    get:
      tags:
        - Duel
      summary: Duel rounds
      description: >-
        Duel rounds of the last 48 hours, newest first. A round that is still
        live is dated by its start. Each entry is a position on Knockout, and
        shows how Knockout settled it. A page holds at most 100 rounds.
      operationId: listDuelRounds
      parameters:
        - $ref: '#/components/parameters/owner'
        - $ref: '#/components/parameters/matchup'
        - $ref: '#/components/parameters/duelStatus'
        - $ref: '#/components/parameters/sinceSlot'
        - $ref: '#/components/parameters/roundsBeforeSlot'
        - $ref: '#/components/parameters/limit100'
      responses:
        '200':
          description: A page of Duel rounds.
          headers:
            Cache-Control:
              description: '`public, max-age=5`.'
              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/DuelRoundsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '414':
          $ref: '#/components/responses/UriTooLong'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    owner:
      name: owner
      in: query
      required: false
      description: >-
        Return only the rows of this wallet. Give the wallet as base58 or as 64
        hex characters. Any other value matches nothing: the page is empty and
        `filters.owner` repeats the value.
      schema:
        type: string
    matchup:
      name: matchup
      in: query
      required: false
      description: >-
        Return only the rounds of this Duel matchup account, as 64 hex
        characters.
      schema:
        type: string
    duelStatus:
      name: status
      in: query
      required: false
      description: Return only the rounds with this status.
      schema:
        type: string
        enum:
          - live
          - settled
    sinceSlot:
      name: sinceSlot
      in: query
      required: false
      description: 'Return only the rounds that opened at or after this slot. Unit: slots.'
      schema:
        type: integer
        minimum: 0
    roundsBeforeSlot:
      name: beforeSlot
      in: query
      required: false
      description: >-
        Return only the rounds that opened before this slot. To get the next
        page, send `nextBeforeSlot` from the previous page. Unit: slots.
      schema:
        type: integer
        minimum: 0
    limit100:
      name: limit
      in: query
      required: false
      description: >-
        The number of rounds in the page. The server reads a value above 100 as
        100.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 100
  schemas:
    DuelRoundsResponse:
      type: object
      description: A page of Duel rounds, newest first.
      properties:
        asOf:
          $ref: '#/components/schemas/AsOf'
        tier:
          type: string
          description: >-
            The access tier that answered. It is `public` for a caller without a
            key.
          enum:
            - public
        window:
          $ref: '#/components/schemas/Window'
        units:
          type: string
          description: The units of the money, price and time fields, in words.
        filters:
          type: object
          description: The filters of this request, as sent.
          properties:
            owner:
              type:
                - string
                - 'null'
              description: The `owner` filter. Null when it was not sent.
            matchup:
              type: string
              description: The `matchup` filter. Present only when it was sent.
            status:
              type: string
              description: The `status` filter. Present only when it was sent.
            sinceSlot:
              type: string
              description: The `sinceSlot` filter, as sent. Present only when it was sent.
            beforeSlot:
              type: string
              description: The `beforeSlot` filter, as sent. Present only when it was sent.
            limit:
              type: integer
              description: 'The page size that applied. Unit: rounds.'
        matched:
          type: integer
          description: >-
            The number of rounds in the window that match the filters. Unit:
            rounds.
        sampleSize:
          type: integer
          description: 'The number of rounds in this page. Unit: rounds.'
        nextBeforeSlot:
          type:
            - integer
            - 'null'
          description: >-
            Send this value as `beforeSlot` to get the next page. Null when this
            page is the last. A page never splits a slot. Unit: slots.
        totalInArchive:
          type: integer
          description: 'The number of rounds in the archive, for all time. Unit: rounds.'
        summary:
          type: object
          description: Round and entry counts, for all time.
          properties:
            rounds:
              type: integer
              description: 'The number of rounds. Unit: rounds.'
            live:
              type: integer
              description: 'The number of live rounds. Unit: rounds.'
            settled:
              type: integer
              description: 'The number of settled rounds. Unit: rounds.'
            entries:
              type: integer
              description: 'The number of entries. Unit: entries.'
            voided:
              type: integer
              description: 'The number of entries Knockout returned. Unit: entries.'
        rounds:
          type: array
          description: The rounds, newest first.
          items:
            $ref: '#/components/schemas/DuelRoundRow'
      required:
        - asOf
        - tier
        - window
        - filters
        - matched
        - sampleSize
        - nextBeforeSlot
        - totalInArchive
        - rounds
    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
    Window:
      type: object
      description: The time window of a per-transaction route.
      properties:
        hours:
          type: integer
          description: 'The length of the window. Unit: hours.'
          examples:
            - 48
        since:
          type: string
          description: >-
            The start of the window, in UTC (ISO 8601). The route does not send
            rows before this time.
          format: date-time
        rule:
          type: string
          description: The window rule, in words.
      required:
        - hours
        - since
        - rule
    DuelRoundRow:
      type: object
      description: 'One Duel round: a matchup and its start time.'
      properties:
        matchup:
          type: string
          description: The Duel matchup account, as 64 hex characters.
          pattern: ^[0-9a-f]{64}$
        market:
          type:
            - string
            - 'null'
          description: The Knockout market of the matchup, as 64 hex characters.
          pattern: ^[0-9a-f]{64}$
        anchorS:
          type: integer
          description: 'The start of the round. Unit: Unix seconds.'
        roundLenS:
          type:
            - integer
            - 'null'
          description: 'The length of the round. Unit: seconds.'
        bellUnix:
          type:
            - integer
            - 'null'
          description: 'The end of the round: the start plus the length. Unit: Unix seconds.'
        openedSlot:
          type: integer
          description: >-
            The slot of the first entry of the round. The rounds are in this
            order, and `sinceSlot` and `beforeSlot` filter on it. Unit: slots.
        status:
          type: string
          description: >-
            `settled`: every entry ended. `live`: one or more entries did not
            end.
          enum:
            - live
            - settled
        endedAtUnix:
          type:
            - integer
            - 'null'
          description: >-
            The time the last entry ended. Null while the round is live. Unit:
            Unix seconds.
        entries:
          type: array
          description: >-
            The entries of the round, in the order they landed. With `owner`,
            only the entries of that wallet.
          items:
            $ref: '#/components/schemas/DuelEntry'
        sides:
          type: object
          description: The entries of the round on each side, for all wallets.
          properties:
            long:
              type: object
              description: The entries on one side of the round.
              properties:
                entries:
                  type: integer
                  description: 'The number of entries on the side. Unit: entries.'
                stake:
                  type: string
                  description: >-
                    The sum of the stakes on the side in this round. Unit: USDC
                    base units, as a decimal string.
            short:
              type: object
              description: The entries on one side of the round.
              properties:
                entries:
                  type: integer
                  description: 'The number of entries on the side. Unit: entries.'
                stake:
                  type: string
                  description: >-
                    The sum of the stakes on the side in this round. Unit: USDC
                    base units, as a decimal string.
        outcome:
          type:
            - object
            - 'null'
          description: >-
            The price move of the round, from its bell settles. Null until a
            bell settle is recorded.
          properties:
            entryPrice:
              type: string
              description: >-
                The price at the start of the round. Unit: venue oracle scale,
                as a decimal string.
            exitPrice:
              type: string
              description: >-
                The price at the bell. Unit: venue oracle scale, as a decimal
                string.
            move:
              type: string
              description: >-
                `up`: the top coin gained on the bottom coin. `down`: it lost
                ground. `flat`: no change.
              enum:
                - up
                - down
                - flat
            winningSide:
              type:
                - string
                - 'null'
              description: >-
                The side of the move: `long` for `up`, `short` for `down`, null
                for `flat`.
              enum:
                - long
                - short
                - null
        payout:
          type: string
          description: >-
            The sum of the payouts of the ended entries of the round. Unit: USDC
            base units, as a decimal string.
        streakBonus:
          type: string
          description: >-
            The sum of the streak bonuses the round credited. Unit: USDC base
            units, as a decimal string.
      required:
        - matchup
        - anchorS
        - openedSlot
        - status
        - entries
        - sides
        - payout
        - streakBonus
    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
    DuelEntry:
      type: object
      description: >-
        One entry of a Duel round: a position on Knockout. Knockout prices,
        settles and pays the entry.
      properties:
        wallet:
          type: string
          description: The wallet that entered, as 64 hex characters.
          pattern: ^[0-9a-f]{64}$
        player:
          type:
            - string
            - 'null'
          description: >-
            The Duel Player account of the wallet, as 64 hex characters. It owns
            the Knockout position.
          pattern: ^[0-9a-f]{64}$
        side:
          type:
            - string
            - 'null'
          description: >-
            The side of the entry. `long`: the top coin of the matchup gains on
            the bottom coin. `short`: it loses ground.
          enum:
            - long
            - short
            - null
        stake:
          type: string
          description: 'The stake. Unit: USDC base units (6 decimals), as a decimal string.'
          pattern: ^-?[0-9]+$
        seq:
          type: string
          description: The Knockout sequence number of the position, as a decimal string.
          pattern: ^-?[0-9]+$
        autoplay:
          type: boolean
          description: True when an autoplay order made the entry.
        enterSignature:
          type: string
          description: The signature of the entry transaction.
        enteredSlot:
          type: integer
          description: 'The slot of the entry transaction. Unit: slots.'
        enteredAtUnix:
          type:
            - integer
            - 'null'
          description: 'The block time of the entry transaction. Unit: Unix seconds.'
        phase:
          type:
            - string
            - 'null'
          description: >-
            The phase of the Knockout position, as the archive last saw it. Null
            when the archive has no Knockout record of it.
        entryPrice:
          type:
            - string
            - 'null'
          description: >-
            The entry price of the position: the price at the start of the
            round. Unit: venue oracle scale, as a decimal string.
          pattern: ^-?[0-9]+$
        exitPrice:
          type:
            - string
            - 'null'
          description: >-
            The exit price of the position. Unit: venue oracle scale, as a
            decimal string. Null until it settled.
          pattern: ^-?[0-9]+$
        settleReason:
          type:
            - string
            - 'null'
          description: >-
            The close reason. `userExpiry`: the bell. `knockout`: the barrier.
            Null until it settled.
        payout:
          type:
            - string
            - 'null'
          description: >-
            The amount Knockout paid to the Player's winnings account. Unit:
            USDC base units, as a decimal string. Null until it settled.
          pattern: ^-?[0-9]+$
        net:
          type:
            - string
            - 'null'
          description: >-
            The payout minus the stake. Unit: USDC base units, as a signed
            decimal string. Null until it settled.
          pattern: ^-?[0-9]+$
        result:
          type:
            - string
            - 'null'
          description: >-
            `profit`: the payout is more than the stake. `loss`: it is less.
            `even`: it is equal. `voided`: Knockout returned the entry. Null
            until the entry ended.
          enum:
            - profit
            - loss
            - even
            - voided
            - null
        settleSignature:
          type:
            - string
            - 'null'
          description: The signature of the settle transaction. Null until it settled.
        settledSlot:
          type:
            - integer
            - 'null'
          description: 'The slot of the settle. Unit: slots.'
        settledAtUnix:
          type:
            - integer
            - 'null'
          description: 'The settle time. Unit: Unix seconds.'
        voided:
          type:
            - object
            - 'null'
          description: >-
            The return of the entry by Knockout. Null when Knockout did not
            return it.
          properties:
            reason:
              type: string
              description: Why Knockout returned the entry, in words.
            refundTotal:
              type: string
              description: 'The amount returned. Unit: USDC base units, as a decimal string.'
            signature:
              type: string
              description: The signature of the return transaction.
            slot:
              type: integer
              description: 'The slot of the return. Unit: slots.'
        swept:
          type:
            - object
            - 'null'
          description: >-
            The sweep of the winnings to the wallet in the settle transaction.
            Null when that transaction has no sweep for this entry alone.
          properties:
            amount:
              type: string
              description: >-
                The amount swept to the wallet. Unit: USDC base units, as a
                decimal string.
            signature:
              type: string
              description: The signature of the sweep transaction.
        streak:
          type:
            - object
            - 'null'
          description: >-
            The streak credit of this wallet for this round. Null when the round
            did not credit the streak.
          properties:
            streak:
              type: integer
              description: 'The streak after this round. Unit: wins.'
            bonus:
              type: string
              description: >-
                The streak bonus this round credited. Unit: USDC base units, as
                a decimal string.
            signature:
              type: string
              description: The signature of the credit transaction.
            slot:
              type: integer
              description: 'The slot of the credit. Unit: slots.'
            bonusPaid:
              type:
                - object
                - 'null'
              description: >-
                The payment of the bonus. Null while it is owed, and for a bonus
                of zero.
              properties:
                amount:
                  type: string
                  description: 'The amount paid. Unit: USDC base units, as a decimal string.'
                signature:
                  type: string
                  description: The signature of the payment transaction.
                slot:
                  type: integer
                  description: 'The slot of the payment. Unit: slots.'
                paidAtUnix:
                  type:
                    - integer
                    - 'null'
                  description: 'The payment time. Unit: Unix seconds.'
        streakEnded:
          type:
            - object
            - 'null'
          description: >-
            The end of the wallet's streak at this round. Null when the round
            did not end it.
          properties:
            reason:
              type: string
              description: >-
                Why the streak ended: `Loss`, `BothSides`, `Expired`, `Tainted`,
                `RingFull`, `LogReplaced` or `LogWrapped`.
            streakBefore:
              type: integer
              description: 'The streak before this round. Unit: wins.'
            signature:
              type: string
              description: The signature of the transaction.
            slot:
              type: integer
              description: 'The slot of the transaction. Unit: slots.'
        streakRestored:
          type:
            - object
            - 'null'
          description: >-
            The restore of the wallet's streak at this round. Null when the
            round did not restore it.
          properties:
            wins:
              type: integer
              description: 'The wins counted. Unit: wins.'
            streak:
              type: integer
              description: 'The streak after the restore. Unit: wins.'
            signature:
              type: string
              description: The signature of the transaction.
            slot:
              type: integer
              description: 'The slot of the transaction. Unit: slots.'
      required:
        - wallet
        - side
        - stake
        - seq
        - enterSignature
        - enteredSlot
        - result
  responses:
    BadRequest:
      description: >-
        The request used a filter that this API refuses, or the path, the
        signature or `phase` is not valid. Fix the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    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.