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

# Search Markets

> Search and browse markets across all exchanges.

Supports:
- Exact match on ticker, condition_id, slug, centos_id
- Full-text search on name, description, tags
- Browse by filters (no query required)
- Results ranked by relevance

We default to active markets in the view so things are faster



## OpenAPI

````yaml /openapi.json get /v1/markets/search
openapi: 3.1.0
info:
  title: Centos Finance API
  contact:
    name: Centos Finance
    url: https://centosfi.com/
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.centosfi.com
security: []
tags:
  - name: markets
    description: Search and discover prediction markets across Kalshi and Polymarket.
  - name: subaccounts
    description: >-
      Manage trading subaccounts. Each subaccount can have its own exchange
      credentials and positions.
  - name: positions
    description: View current portfolio positions across all connected exchanges.
  - name: fills
    description: Retrieve trade execution history and fill details.
  - name: prices
    description: Get historical price data and candlesticks from exchanges.
  - name: orders
    description: Place and manage orders on prediction market exchanges.
  - name: complex-orders
    description: >-
      Manage complex orders: conditional orders (take-profit and stop-loss),
      TWAP, and other advanced order types.
paths:
  /v1/markets/search:
    get:
      tags:
        - markets
      summary: Search Markets
      description: |-
        Search and browse markets across all exchanges.

        Supports:
        - Exact match on ticker, condition_id, slug, centos_id
        - Full-text search on name, description, tags
        - Browse by filters (no query required)
        - Results ranked by relevance

        We default to active markets in the view so things are faster
      operationId: search_markets_v1_markets_search_get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            description: Search query
            title: Q
          description: Search query
        - name: exchange_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by exchange name (KALSHI, POLYMARKET)
            title: Exchange Name
          description: Filter by exchange name (KALSHI, POLYMARKET)
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by canonical category (Sports, Crypto, Politics, Finance,
              Entertainment, Science & Tech, Weather, World Affairs, Health,
              Social, Other)
            title: Category
          description: >-
            Filter by canonical category (Sports, Crypto, Politics, Finance,
            Entertainment, Science & Tech, Weather, World Affairs, Health,
            Social, Other)
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/InstrumentStatus'
              - type: 'null'
            description: Filter by instrument status
            title: Status
          description: Filter by instrument status
        - name: expiration_date_start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Start of expiration date range (inclusive, ISO 8601)
            title: Expiration Date Start
          description: Start of expiration date range (inclusive, ISO 8601)
        - name: expiration_date_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: End of expiration date range (exclusive, ISO 8601)
            title: Expiration Date End
          description: End of expiration date range (exclusive, ISO 8601)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Maximum number of results
            default: 20
            title: Limit
          description: Maximum number of results
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Offset for pagination
            default: 0
            title: Offset
          description: Offset for pagination
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InstrumentStatus:
      type: string
      enum:
        - active
        - closed
        - inactive
      title: InstrumentStatus
      description: >-
        Instrument status derived in mv_instruments from exchange-specific
        fields.


        Kalshi: maps from kalshi_markets.status
            - 'active' -> ACTIVE
            - everything else (closed, determined, finalized, settled, amended, inactive, initialized) -> CLOSED

        Polymarket: maps from polymarket_markets.closed and
        polymarket_markets.active booleans
            - closed=true -> CLOSED
            - active=true (and not closed) -> ACTIVE
            - else (active=false, closed=false) -> INACTIVE
    MarketSearchResponse:
      properties:
        query:
          type: string
          title: Query
        results:
          items:
            $ref: '#/components/schemas/MarketSearchResult'
          type: array
          title: Results
        total:
          type: integer
          title: Total
      type: object
      required:
        - query
        - results
        - total
      title: MarketSearchResponse
      description: Schema for market search response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MarketSearchResult:
      properties:
        centos_id:
          type: integer
          title: Centos Id
        exchange_value:
          type: integer
          title: Exchange Value
        exchange_name:
          type: string
          title: Exchange Name
        ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticker
        token_id_yes:
          anyOf:
            - type: string
            - type: 'null'
          title: Token Id Yes
        token_id_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Token Id No
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        tick_size_price:
          type: number
          title: Tick Size Price
        tick_size_qty:
          type: number
          title: Tick Size Qty
        minimum_order_size:
          type: number
          title: Minimum Order Size
        expiration_datetime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiration Datetime
          description: Market expiration datetime (UTC)
        neg_risk:
          type: boolean
          title: Neg Risk
        neg_risk_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Neg Risk Id
        condition_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Condition Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          $ref: '#/components/schemas/InstrumentStatus'
        category:
          type: string
          title: Category
          default: Other
        rank:
          anyOf:
            - type: number
            - type: 'null'
          title: Rank
      type: object
      required:
        - centos_id
        - exchange_value
        - exchange_name
        - ticker
        - token_id_yes
        - token_id_no
        - slug
        - tick_size_price
        - tick_size_qty
        - minimum_order_size
        - neg_risk
        - neg_risk_id
        - condition_id
        - name
        - description
        - status
      title: MarketSearchResult
      description: Schema for a single market search result.
    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

````