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

# Get Quote



## OpenAPI

````yaml /openapi.json get /stocks/{symbol}/quote
openapi: 3.1.0
info:
  title: psxdata
  version: 0.8.0
servers:
  - url: https://psxdata-api.fastapicloud.dev
security: []
paths:
  /stocks/{symbol}/quote:
    get:
      tags:
        - stocks
      summary: Get Quote
      operationId: get_quote_stocks__symbol__quote_get
      parameters:
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            title: Symbol
        - name: X-PSX-Proxy
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optional proxy for this request's PSX traffic: http://, socks5://
              or socks5h://, with an explicit port and optional user:pass@. Must
              resolve to a public address. Cached data is served without
              contacting the proxy; it is used only when PSX must be fetched,
              with stricter rate limits. Only honoured when the server enables
              proxy passthrough.
            title: X-Psx-Proxy
          description: >-
            Optional proxy for this request's PSX traffic: http://, socks5:// or
            socks5h://, with an explicit port and optional user:pass@. Must
            resolve to a public address. Cached data is served without
            contacting the proxy; it is used only when PSX must be fetched, with
            stricter rate limits. Only honoured when the server enables proxy
            passthrough.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    QuoteResponse:
      properties:
        data:
          $ref: '#/components/schemas/QuoteData'
        meta:
          $ref: '#/components/schemas/MetaSingle'
      type: object
      required:
        - data
        - meta
      title: QuoteResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QuoteData:
      properties:
        symbol:
          type: string
          title: Symbol
        price:
          type: number
          title: Price
        market_cap:
          anyOf:
            - type: number
            - type: 'null'
          title: Market Cap
        pe_ratio:
          anyOf:
            - type: number
            - type: 'null'
          title: Pe Ratio
        dividend_yield:
          anyOf:
            - type: number
            - type: 'null'
          title: Dividend Yield
        free_float:
          anyOf:
            - type: number
            - type: 'null'
          title: Free Float
        volume_avg_30d:
          anyOf:
            - type: number
            - type: 'null'
          title: Volume Avg 30D
        change_1y_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Change 1Y Pct
        ldcp:
          anyOf:
            - type: number
            - type: 'null'
          title: Ldcp
        change:
          anyOf:
            - type: number
            - type: 'null'
          title: Change
        change_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Change Pct
        traded_today:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Traded Today
          description: >-
            True if the stock has traded on PSX's regular-market board so far
            this session, false if not, null if unknown. PSX keeps delisted and
            non-trading stocks in its screener with their last trading day's
            price and change_pct.
        sector_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Sector Code
          description: >-
            PSX sector code as PSX writes it, e.g. "0809"; null if PSX gives
            none.
        sector_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sector Name
          description: Sector name for sector_code, e.g. "FERTILIZER"; null if unknown.
        badge:
          anyOf:
            - type: string
            - type: 'null'
          title: Badge
          description: >-
            Badge PSX shows next to the ticker (XD, XB, XR, NC, ...; several
            joined with +); null if none.
        ex_flag:
          anyOf:
            - type: string
            - type: 'null'
          title: Ex Flag
          description: >-
            Corporate-action badge only: XD ex-dividend, XB ex-bonus, XR
            ex-rights; null otherwise. A stock that goes ex drops by about the
            dividend or entitlement without a real loss.
      type: object
      required:
        - symbol
        - price
      title: QuoteData
    MetaSingle:
      properties:
        timestamp:
          type: string
          title: Timestamp
        cached:
          type: boolean
          title: Cached
      type: object
      required:
        - timestamp
        - cached
      title: MetaSingle
      description: Metadata block for single-item responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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