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

# Get market results

> Read stored HIP-4 settlement results for up to 100 live or departed outcome IDs without calling Hyperliquid.

No API key required.



## OpenAPI

````yaml /hyperliquid/openapi.json get /v1/market-results
openapi: 3.1.1
info:
  title: Totalis Hyperliquid API
  description: >-
    REST API for Totalis singles and parlays on Hyperliquid HIP-4 outcome
    markets, for client integrations and external market makers.


    There are three ways in, each sent as `Authorization: Bearer <credential>`:


    - **Scoped API key** (`ttk_`), for servers, bots and market makers. The
    account owner creates it in the Totalis app, or a wallet-session user
    creates one with `POST /v1/me/api-keys` and a fresh wallet signature (see
    API keys). It acts for one account, yours or a maker's, with only the scopes
    it holds, and needs no `Origin`.

    - **Wallet session**, for users who bring their own wallet to a partner's
    web page. The page signs the wallet in with `POST
    /v1/auth/wallet-challenges` and `POST /v1/auth/wallet-sessions`; the session
    is bound to the page's registered `Origin` and must be sent from it. Pages
    may also label their traffic with their publishable browser key in
    `X-Totalis-Partner: tpb_...`.

    - **Partner server key** (`tpk_`), only for `POST
    /v1/partner/wallet-admissions`, which lets a new wallet open its account
    during the invite-only launch, `GET /v1/partner/report`, your fees, terms
    and payouts, `GET /v1/partner/fills`, each fee event on your users'
    positions, `GET /v1/partner/webhook-events`, the webhook events Totalis
    queued for you, and `GET /v1/partner/accounts/{wallet}/account-value`, the
    value of an account you admitted. Server to server, never in a browser, and
    never with an `Origin`.


    Public market reads need no credential. A credential only authenticates:
    every bet, cash-out and withdrawal also carries the wallet or maker
    signature the HyperEVM contract verifies. An external wallet sends `POST
    /v1/core-exits` to move its vault cash to HyperCore before a HyperCore
    order.


    For access, partner credentials (origins, browser and server keys), builder
    codes or staging, email
    [founders@totalis.trade](mailto:founders@totalis.trade).


    Amounts are base-10 strings in native USDC atomic units, large identifiers
    are decimal strings, and every command `POST` requires an `Idempotency-Key`
    header.


    Every error is `{error: {code, message, retry, request_id,
    field_violations}}`. `code` is stable; each operation lists the codes it
    returns per status. `retry` is `NEVER` (stop), `BACKOFF` (resend the same
    request with the same `Idempotency-Key` after `Retry-After` seconds) or
    `REFRESH` (re-read state, then send a new request with a new key).
    `field_violations` names invalid inputs by JSON pointer, such as
    `/legs/0/side`.
  version: 279.0.0-no-market-history
servers:
  - url: https://hip4-api.totalis.trade
    description: Production public edge
  - url: https://hip4-api-staging.totalis.trade
    description: Staging and chain-998 public edge
security: []
tags:
  - name: Markets
    description: >-
      HIP-4 questions and markets, their sides, results and charts. No API key
      needed.
  - name: RFQs & Quotes
    description: >-
      RFQs and the quotes that answer them: what a taker calls, then what a
      maker calls.
  - name: Positions
    description: Positions the account holds, or its maker backs.
  - name: Account
    description: >-
      The account a key acts for: identity, balances, activity, operations,
      withdrawals, deposits and HyperCore exits.
  - name: Makers
    description: >-
      The rest of a maker's setup after Making: admission, quote history,
      capital and collateral.
  - name: Partners & wallet sign-in
    description: >-
      A partner admits its users' own wallets, which sign in from the partner's
      pages, and reads its own report, fills, webhook events and its users'
      account values.
  - name: API keys
    description: >-
      Issue, rotate and revoke scoped keys from a wallet session. An API key
      cannot manage keys.
  - name: Deployment
    description: The contract deployment every signature is made against.
  - name: WebSocket
    description: The authenticated WebSocket for account and maker updates.
paths:
  /v1/market-results:
    get:
      tags:
        - Markets
      summary: Get market results
      description: >-
        Read stored HIP-4 settlement results for up to 100 live or departed
        outcome IDs without calling Hyperliquid.


        No API key required.
      operationId: getMarketResults
      parameters:
        - $ref: '#/components/parameters/OutcomeIds'
      responses:
        '200':
          description: >-
            Exactly one item per requested outcome, in request order, including
            outcomes with no known result.
          headers:
            Cache-Control:
              description: >-
                A day only when every item is final; otherwise five seconds.
                Errors are never stored.
              schema:
                type: string
                enum:
                  - public, max-age=86400
                  - public, max-age=5
            ETag:
              description: >-
                Strong validator of the whole answer; send it as `If-None-Match`
                to get 304 when unchanged.
              schema:
                type: string
                pattern: ^"[0-9a-f]{32}"$
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketResults'
              example:
                items:
                  - outcome_id: '35280'
                    state: SETTLED
                    yes_fraction: '0.625'
                    settlement_price: '76876.90'
                    source: LENS
                    final: true
                  - outcome_id: '36412'
                    state: PENDING
                    yes_fraction: null
                    settlement_price: null
                    source: null
                    final: false
        '304':
          description: The answer matches the `If-None-Match` ETag.
        '400':
          description: >-
            - `INVALID_QUERY` (retry `NEVER`): A query parameter is malformed,
            out of range or not accepted by this operation. `field_violations`
            names it.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        description: The error this operation returns with this status.
                        properties:
                          code:
                            description: >-
                              One of the registered codes listed in this
                              response's description.
                            enum:
                              - INVALID_QUERY
                          retry:
                            description: >-
                              The retry rule the registry fixes for the returned
                              code.
                            enum:
                              - NEVER
        '500':
          description: >-
            - `INTERNAL_ERROR` (retry `BACKOFF`): Something failed on Totalis's
            side that no dependency or input explains, such as a bug or a broken
            invariant; it is logged with its cause under `request_id`. Retry
            after Retry-After with the same idempotency key; if it persists,
            report the `request_id`.
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        description: The error this operation returns with this status.
                        properties:
                          code:
                            description: >-
                              One of the registered codes listed in this
                              response's description.
                            enum:
                              - INTERNAL_ERROR
                          retry:
                            description: >-
                              The retry rule the registry fixes for the returned
                              code.
                            enum:
                              - BACKOFF
        '503':
          description: >-
            - `MARKET_DATA_UNAVAILABLE` (retry `BACKOFF`): No complete market
            catalog is available.
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        description: The error this operation returns with this status.
                        properties:
                          code:
                            description: >-
                              One of the registered codes listed in this
                              response's description.
                            enum:
                              - MARKET_DATA_UNAVAILABLE
                          retry:
                            description: >-
                              The retry rule the registry fixes for the returned
                              code.
                            enum:
                              - BACKOFF
      security:
        - {}
components:
  parameters:
    OutcomeIds:
      name: outcome_ids
      in: query
      required: true
      schema:
        type: string
        pattern: ^(0|[1-9][0-9]{0,9})(,(0|[1-9][0-9]{0,9})){0,99}$
      description: >-
        1 to 100 HIP-4 outcome IDs as decimal strings, comma-separated, strictly
        ascending, so one set of outcomes is always one URL. Any other order, a
        repeat or an ID above 4294967295 is 400 INVALID_QUERY.
      example: 35280,36412
  schemas:
    MarketResults:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/MarketResult'
          description: One result per requested outcome in request order.
    Error:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: The one error this request failed with.
      required:
        - error
      type: object
    MarketResult:
      type: object
      required:
        - outcome_id
        - state
        - yes_fraction
        - settlement_price
        - source
        - final
      properties:
        outcome_id:
          $ref: '#/components/schemas/UInt32String'
          description: Hyperliquid outcome ID.
        state:
          type: string
          enum:
            - SETTLED
            - NONNUMERIC
            - PENDING
            - UNKNOWN
          description: >-
            SETTLED: a YES fraction is known. NONNUMERIC: the lens recorded a
            recognized nonnumeric result and no numeric result is held. PENDING:
            listed in the current catalog, with no result. UNKNOWN: not listed
            now and no result is held.
        yes_fraction:
          type:
            - string
            - 'null'
          pattern: ^(0(\.[0-9]+)?|1(\.0+)?)$
          description: >-
            Exact payout per YES share in [0, 1], or null unless SETTLED. NO
            pays one minus this value. A numeric lens result takes precedence
            over the stored Hyperliquid answer.
        settlement_price:
          type:
            - string
            - 'null'
          pattern: ^[0-9]+(\.[0-9]+)?$
          description: >-
            Settlement price exactly as written in a stored `price:<decimal>`
            detail for a recurring price round; otherwise null.
        source:
          enum:
            - LENS
            - HYPERLIQUID_NODE
            - HYPERLIQUID_API
            - null
          description: >-
            Where the YES fraction came from: the native lens, Totalis's
            Hyperliquid node, or Hyperliquid's public API. Null when no fraction
            is held.
        final:
          type: boolean
          description: >-
            True when no further settlement evidence is expected for this item:
            SETTLED with the lens result and the stored Hyperliquid answer
            agreeing, or SETTLED or NONNUMERIC for an outcome whose catalog
            replaced it more than 15 days ago (or that no catalog listed):
            market-data records results only for outcomes that left within 14
            days, and a day covers any write already started. Only a correction
            of the catalog's outcome identity can still change a final item.
            Read again an item that is not final; stop once it is.
    ErrorDetail:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: Stable registered code; branch on this, not on message or status.
        field_violations:
          description: >-
            Each invalid input by JSON pointer; empty when the error is not
            about a specific input.
          items:
            $ref: '#/components/schemas/FieldViolation'
          type: array
        message:
          description: Human-readable; may change without notice.
          minLength: 1
          type: string
        request_id:
          description: >-
            UUIDv7 of this request, also returned in the X-Request-ID header.
            Quote it when reporting a problem.
          format: uuid
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        retry:
          $ref: '#/components/schemas/Retry'
          description: What the caller should do next; fixed by the registry for each code.
      required:
        - code
        - message
        - retry
        - request_id
        - field_violations
      type: object
    UInt32String:
      type: string
      pattern: >-
        ^(0|[1-9][0-9]{0,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[0-1][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])$
      maxLength: 10
    ErrorCode:
      description: >-
        Stable HTTP error code. Each code has one HTTP status and one retry
        value.
      enum:
        - INVALID_REQUEST
        - INVALID_QUERY
        - INVALID_CURSOR
        - INVALID_IDEMPOTENCY_KEY
        - ORIGIN_REQUIRED
        - SUBPROTOCOL_REQUIRED
        - UNSUPPORTED_BROWSE_CONTRACT
        - UNAUTHENTICATED
        - FORBIDDEN
        - ORIGIN_NOT_ALLOWED
        - ACCESS_REQUIRED
        - PICTURE_UPLOADS_BLOCKED
        - SIGN_IN_REQUIRED
        - NOT_FOUND
        - IDENTITY_NOT_FOUND
        - QUOTE_NOT_FOUND
        - INVITE_CODE_NOT_FOUND
        - IDEMPOTENCY_KEY_REUSED
        - STATE_CONFLICT
        - INVITE_CODE_EXHAUSTED
        - STALE_CURSOR
        - CURSOR_EXPIRED
        - CURSOR_RESET
        - RECURRING_DEFINITION_CONFLICT
        - EMBEDDED_WALLET_CONFLICT
        - SECRET_UNAVAILABLE
        - ROTATION_IN_PROGRESS
        - TELEMETRY_CONFLICT
        - RFQ_NOT_CANCELLABLE
        - RFQ_NOT_OPEN
        - RFQ_GENERATION_STALE
        - RFQ_GENERATION_IN_FLIGHT
        - QUOTE_EXPIRED
        - QUOTE_CANCELLED
        - QUOTE_REPLACED
        - QUOTE_SIGNER_CHANGED
        - QUOTE_CAPACITY_EXCEEDED
        - CORE_ACCOUNT_NOT_READY
        - CORE_ACCOUNT_ACTIVATION_REQUIRED
        - CORE_EXIT_ABANDONED
        - INSUFFICIENT_WALLET_BALANCE
        - CORE_MOVE_IN_FLIGHT
        - ACCEPTANCE_IN_FLIGHT
        - USERNAME_TAKEN
        - USERNAME_ALREADY_SET
        - PICTURE_REMOVED
        - USERNAME_REQUIRED
        - GOLDEN_TICKET_NONE
        - GOLDEN_TICKET_USED
        - GOLDEN_TICKET_EXPIRED
        - GOLDEN_PLACEMENT_IN_FLIGHT
        - GOLDEN_PROMO_BUSY
        - GOLDEN_CASHOUT_REFUSED
        - GOLDEN_OFFER_BELOW_FLOOR
        - GOLDEN_GIFT_TERMS_EXPIRED
        - GOLDEN_UNLOCK_REQUIRED
        - GOLDEN_GIVEN_OUT
        - GOLDEN_CODE_DISABLED
        - GOLDEN_TICKET_HELD
        - GOLDEN_LINK_SIGN_UP_ONLY
        - GOLDEN_LINK_CLAIMED
        - X_REQUIRED
        - X_ALREADY_CLAIMED
        - X_TOO_NEW
        - GOLDEN_NOT_ELIGIBLE
        - INVALID_SIGNATURE
        - WALLET_CONTRACT_UNSUPPORTED
        - WRONG_AUTHORITY
        - KEY_LIMIT_REACHED
        - USERNAME_NOT_ALLOWED
        - PICTURE_TOO_LARGE
        - PICTURE_UNREADABLE
        - PICTURE_TOO_MANY_PIXELS
        - FOLLOW_SELF
        - FOLLOW_LIMIT_REACHED
        - COPY_SELF
        - COPY_NOT_MATCHED
        - GOLDEN_LEG_COUNT
        - GOLDEN_LEG_NOT_ELIGIBLE
        - GOLDEN_QUOTE_NOT_HOUSE
        - RATE_LIMITED
        - CONNECTION_LIMIT
        - RFQ_INTENT_LIMIT
        - QUOTE_EXPOSURE_LIMIT
        - INTERNAL_ERROR
        - DEPENDENCY_STALE
        - AUTHORIZATION_UNAVAILABLE
        - SOURCE_UNAVAILABLE
        - CONTRACT_UNAVAILABLE
        - MARKET_DATA_UNAVAILABLE
        - BROWSE_UNAVAILABLE
        - FINANCIAL_ACTIONS_DISABLED
        - CORE_EXIT_UNAVAILABLE
        - COLLATERAL_REDUCTION_UNAVAILABLE
        - SPONSORSHIP_UNAVAILABLE
        - CONTRACT_SIGNATURE_OVERLOADED
        - QUOTE_EXPOSURE_STALE
        - COMBO_AUTOMATIC_DISABLED
        - GAS_PRICE_ABOVE_CEILING
        - EXECUTION_BACKLOG_FULL
        - EMBEDDED_WALLET_UNAVAILABLE
        - GOLDEN_PROMO_FUNDS_LOW
        - X_VERIFICATION_UNAVAILABLE
        - CONNECTION_DRAIN
      type: string
    FieldViolation:
      properties:
        code:
          description: >-
            REQUIRED: the input is missing. INVALID: it is present but malformed
            or out of range. UNEXPECTED: the input is not accepted here.
          enum:
            - REQUIRED
            - INVALID
            - UNEXPECTED
          type: string
        field:
          description: >-
            JSON pointer into the body, or into the query parameters as one flat
            object for requests without a body, for example /legs/0/stake or
            /limit.
          pattern: ^(/([^~/]|~[01])*)+$
          type: string
      required:
        - field
        - code
      type: object
    Retry:
      description: >-
        NEVER: stop. BACKOFF: resend the same request with the same
        Idempotency-Key after Retry-After. REFRESH: re-read state, then send a
        new request with a new Idempotency-Key.
      enum:
        - NEVER
        - BACKOFF
        - REFRESH
      type: string
  headers:
    RetryAfter:
      description: Seconds to wait before resending the same request
      schema:
        type: integer
        minimum: 1

````

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