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

# Feed readiness

> Whether each feed can be quoted now, and its market session. A closed session signs no price.



## OpenAPI

````yaml /openapi/prices.json get /v1/readiness
openapi: 3.1.0
info:
  title: Rekt price service
  version: '1'
  summary: Signed price quotes for the instructions that read a price.
  description: >-
    Quotes come from `https://prices.rekt.trading`. There is no other address.
    Use TLS everywhere.


    Only the instructions that read a price need a quote: `settle`,
    `stamp_book`, `set_take_profit` and `prove_price`. The Knockout program
    verifies the signatures on chain. Nothing that the service returns outside
    the signed bytes is authoritative.


    Rules:


    - Call the service from a server, not from a browser. It sends no CORS
    headers.

    - Public use needs no sign-up. If you have a token, send it as
    `Authorization: Bearer <token>`. Keep a token out of URLs.

    - Public use is rate-limited for each client address. A limited request gets
    `429` with `retry_after_ms` and a `Retry-After` header. A limit says nothing
    about whether a feed is healthy.

    - Back off with jitter on `429` and `503`, and obey `retry_after_ms`.

    - For the latest price, use the stream
    (`wss://prices.rekt.trading/v1/stream`), not polling. Keep one stream
    connection per process.

    - A response can hold fields that this description does not list. Ignore a
    field that you do not know.


    For higher limits, write to support@asymmetra.xyz.
servers:
  - url: https://prices.rekt.trading
    description: The price service.
security:
  - {}
  - bearerAuth: []
tags:
  - name: Quotes
    description: Signed quotes.
  - name: Feeds
    description: Feeds, signer keys and readiness.
  - name: Health
    description: Process health.
paths:
  /v1/readiness:
    get:
      tags:
        - Feeds
      summary: Feed readiness
      description: >-
        Whether each feed can be quoted now, and its market session. A closed
        session signs no price.
      operationId: getReadiness
      responses:
        '200':
          description: The readiness of each feed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadinessResponse'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    ReadinessResponse:
      type: object
      description: Whether each feed can be quoted now, and its market session.
      properties:
        tradable:
          type: boolean
          description: True when every feed can be quoted now.
        current_slot:
          type: integer
          description: 'The slot of the service when it answered. Unit: slots.'
        feeds:
          type: object
          description: The readiness of each feed. The key is the feed symbol.
          additionalProperties:
            $ref: '#/components/schemas/FeedReadiness'
        instance_id:
          type: string
          description: The service instance that answered.
        server_time_ms:
          type: integer
          description: >-
            The service clock when it answered. Unit: milliseconds since the
            Unix epoch.
      required:
        - feeds
    FeedReadiness:
      type: object
      description: Whether one feed can be quoted now.
      properties:
        tradable:
          type: boolean
          description: True when the feed can be quoted now.
        halted:
          type: boolean
          description: True when the service has halted the feed.
        session:
          type: string
          description: The market session of the feed, for example `open`.
        seconds_to_close:
          type: integer
          description: >-
            The time to the end of the session. 65535 means the session does not
            close. Unit: seconds.
        session_closes_in_ms:
          type:
            - integer
            - 'null'
          description: >-
            The time to the end of the session. Null when the session does not
            close. Unit: milliseconds.
        session_reopens_in_ms:
          type:
            - integer
            - 'null'
          description: >-
            The time to the next session. Null when the session is open. Unit:
            milliseconds.
    Refusal:
      type: object
      description: A refused request. A failure is never a price.
      properties:
        status:
          type: string
          description: >-
            The refusal class, as a short code, for example `not_ready` or
            `invalid_request`.
        reason:
          type: string
          description: >-
            Why the service refused, as a short code in snake_case, for example
            `session_closed`. The list of codes can grow. Route an unknown code
            by its HTTP status.
        error:
          type: string
          description: >-
            The error code of an invalid request, for example
            `idempotency_key_reuse`.
        detail:
          type: string
          description: The refusal, in words.
        retry_after_ms:
          type: integer
          description: >-
            Wait this long before you retry. Only a retryable refusal carries
            it. Unit: milliseconds.
        retryable:
          type: boolean
          description: False when a retry cannot succeed.
  responses:
    TooManyRequests:
      description: >-
        The rate limit for your client address applies. Clients behind one
        address share a limit. Retry after `retry_after_ms`, with backoff and
        jitter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
      headers:
        Retry-After:
          description: 'Wait this long before you retry. Unit: seconds.'
          schema:
            type: integer
    Unavailable:
      description: The service cannot answer now. Retry later, with backoff and jitter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Optional. A token for callers that have one. Public use needs no token.

````

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