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

# Get Quote

> Get a price quote for buying or selling a specific number of contracts in a prediction market. Returns the total cost including fees.



## OpenAPI

````yaml openapi.json get /v1/prediction-market/markets/{ticker}/quote
openapi: 3.0.0
info:
  title: Swaps API
  description: The Swaps API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://swap-api.flux.fun
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags: []
paths:
  /v1/prediction-market/markets/{ticker}/quote:
    get:
      tags:
        - Prediction Markets & Portfolio
      summary: Get Quote
      description: >-
        Get a price quote for buying or selling a specific number of contracts
        in a prediction market. Returns the total cost including fees.
      operationId: PredictionMarketsController_getQuote
      parameters:
        - name: ticker
          required: true
          in: path
          description: The market ticker symbol
          schema:
            type: string
        - name: action
          required: false
          in: query
          description: 'Whether to buy or sell (default: buy)'
          schema:
            enum:
              - buy
              - sell
            type: string
        - name: contracts
          required: true
          in: query
          description: Number of contracts to quote
          schema:
            type: number
        - name: side
          required: true
          in: query
          description: Which side of the market (yes or no)
          schema:
            enum:
              - 'yes'
              - 'no'
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetQuoteResponseDto'
      security:
        - api-key: []
components:
  schemas:
    GetQuoteResponseDto:
      type: object
      properties:
        fillable:
          type: boolean
          example: true
          description: Whether the quote is fillable
        contracts:
          type: number
          example: 100
          description: Number of contracts
        cost:
          type: number
          example: 4500
          description: Cost in cents
        costDollars:
          type: string
          example: '45.00'
          description: Cost in dollars
        fee:
          type: number
          example: 150
          description: Fee in cents
        feeDollars:
          type: string
          example: '1.50'
          description: Fee in dollars
      required:
        - fillable
        - contracts
        - cost
        - costDollars
        - fee
        - feeDollars
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````