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

# Spot quote

> One normalized quote for one size, off OceanX's own router. Costs 1 against the 300/min quote budget.

Read `priceImpactPct` as a PERCENT, check `impactMeasurable` before showing it, and check `clamped` before treating `outAmount` as proceeds.



## OpenAPI

````yaml https://www.oceanx.trade/api/v1/openapi.json get /api/v1/spot/quote
openapi: 3.1.0
info:
  title: OceanX Developer API
  version: 1.0.0
  description: >-
    Public API for the OceanX trading platform. Currently in beta and free to
    use while in beta.


    This spec covers the **spot quote** domain. The wallet **tracker** and
    **perps** domains are documented at https://docs.oceanx.trade/api/overview
    and are not yet described here.
  contact:
    url: https://docs.oceanx.trade
  termsOfService: https://www.oceanx.trade/legal/terms
  license:
    name: Proprietary
    url: https://www.oceanx.trade/legal/terms
servers:
  - url: https://www.oceanx.trade
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Read-only OceanX market context sourced and cached by VM producers.
  - name: Spot
    description: >-
      Executable Solana swap quotes off OceanX's own router, and the exit
      checker that reports whether a whole position can be sold.
  - name: Callouts
    description: >-
      Public token callouts — user-posted token calls with live click/volume
      attribution stats. Read-only.
paths:
  /api/v1/spot/quote:
    get:
      tags:
        - Spot
      summary: Spot quote
      description: >-
        One normalized quote for one size, off OceanX's own router. Costs 1
        against the 300/min quote budget.


        Read `priceImpactPct` as a PERCENT, check `impactMeasurable` before
        showing it, and check `clamped` before treating `outAmount` as proceeds.
      operationId: getSpotQuote
      parameters:
        - name: inputMint
          in: query
          required: true
          schema:
            type: string
            pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
            description: Base58 Solana mint address.
        - name: outputMint
          in: query
          required: true
          schema:
            type: string
            pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
            description: Base58 Solana mint address.
        - name: amount
          in: query
          schema:
            type: string
            pattern: ^\d+$
            description: >-
              Atomic (base-unit) amount as a decimal integer string. A string,
              not a number, because a large 9-decimal balance exceeds
              Number.MAX_SAFE_INTEGER and would be corrupted by JSON float
              parsing.
            example: '1000000000'
          description: Required unless you pass `uiAmount` + `inputDecimals`.
        - name: uiAmount
          in: query
          schema:
            type: number
            exclusiveMinimum: 0
          description: Human units. Requires `inputDecimals`.
        - name: inputDecimals
          in: query
          schema:
            type: integer
            minimum: 0
            maximum: 18
        - name: outputDecimals
          in: query
          schema:
            type: integer
            minimum: 0
            maximum: 18
          description: Adds `outUiAmount` and `minOutUiAmount` to the response.
        - name: slippageBps
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 50
        - name: dexes
          in: query
          schema:
            type: string
          description: Comma-separated venue labels to restrict routing to.
        - name: pools
          in: query
          schema:
            type: string
          description: Comma-separated pool addresses to restrict routing to.
        - name: maxHops
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 4
        - name: onlyDirectRoutes
          in: query
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: A quote.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Requests allowed per window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests left.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix seconds when the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '400':
          description: Failed validation before reaching the engine.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key is valid but lacks the required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No route exists for this pair and size. A routing outcome, not an
            outage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. Honour `Retry-After`.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Requests allowed per window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests left.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix seconds when the window resets.
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The routing engine is unreachable or timed out. Retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Quote:
      type: object
      required:
        - inputMint
        - outputMint
        - inAmount
        - outAmount
        - minOutAmount
        - slippageBps
        - impactMeasurable
        - clamped
        - route
        - venues
        - engine
      properties:
        inputMint:
          type: string
        outputMint:
          type: string
        inAmount:
          type: string
          pattern: ^\d+$
          description: >-
            Atomic (base-unit) amount as a decimal integer string. A string, not
            a number, because a large 9-decimal balance exceeds
            Number.MAX_SAFE_INTEGER and would be corrupted by JSON float
            parsing.
          example: '1000000000'
        outAmount:
          type: string
          pattern: ^\d+$
          description: >-
            Atomic (base-unit) amount as a decimal integer string. A string, not
            a number, because a large 9-decimal balance exceeds
            Number.MAX_SAFE_INTEGER and would be corrupted by JSON float
            parsing.
          example: '1000000000'
        minOutAmount:
          type: string
          pattern: ^\d+$
          description: Worst-case output after slippageBps, as enforced on-chain.
          example: '1000000000'
        slippageBps:
          type: integer
          minimum: 1
          maximum: 1000
        priceImpactPct:
          type:
            - number
            - 'null'
          description: >-
            Price impact in PERCENT (1.5 = 1.5%). NOTE: Jupiter's equivalent
            field is fractional (0.015), so code ported from Jupiter is off by
            100x — in the direction that makes an untradeable position look
            fine.
          example: 1.5
        impactMeasurable:
          type: boolean
          description: >-
            False when impact sits inside the engine's noise floor (~0.1%),
            where the figure is a cached mid rather than a measurement. Render
            '—' rather than the number.
        clamped:
          type: boolean
          description: >-
            True when this is the router's out-of-liquidity floor price rather
            than an executable fill. Returned with HTTP 200. NEVER present a
            clamped quote as proceeds.
        contextSlot:
          type:
            - integer
            - 'null'
        route:
          type: array
          items:
            $ref: '#/components/schemas/RouteLeg'
        venues:
          type: array
          items:
            type: string
        engineTimeMs:
          type:
            - number
            - 'null'
          description: Router compute time in milliseconds, typically 1–2.
        swapUsdValue:
          type:
            - number
            - 'null'
          description: >-
            Upstream USD notional when available; null on many pairs. Don't
            depend on it.
        requestId:
          type:
            - string
            - 'null'
          description: Quote id. Include it if you report a bad route to us.
        engine:
          type: string
          example: raptor
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code. Branch on this, not the message.
              example: no_route
            message:
              type: string
              description: Human-readable detail. May change.
    RouteLeg:
      type: object
      description: One hop of the route the engine picked.
      required:
        - dex
        - inputMint
        - outputMint
      properties:
        dex:
          type: string
          example: Raydium CLMM
        pool:
          type:
            - string
            - 'null'
        inputMint:
          type: string
        outputMint:
          type: string
        percent:
          type:
            - number
            - 'null'
          description: Share of the input this leg carries, in percent.
        amountIn:
          type:
            - string
            - 'null'
        amountOut:
          type:
            - string
            - 'null'
        priceImpactPct:
          type:
            - number
            - 'null'
          description: This leg's impact, in PERCENT.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An OceanX API key, created in the app under Settings → Developer API.
        Send it as `Authorization: Bearer ox_live_…`. These endpoints require
        the `md.read` scope, which is on every key by default.

````