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

# Get Trading Rules

> Get trading rules for a connector, optionally filtered by trading pairs.

This endpoint uses the MarketDataService to access non-trading connector instances,
which means no authentication or account setup is required.

Args:
    request: FastAPI request object
    connector_name: Name of the connector (e.g., 'binance', 'binance_perpetual')
    trading_pairs: Optional list of trading pairs to filter by (e.g., ['BTC-USDT', 'ETH-USDT'])

Returns:
    Dictionary mapping trading pairs to their trading rules

Raises:
    HTTPException: 404 if connector not found, 500 for other errors



## OpenAPI

````yaml /api-reference/openapi.json get /connectors/{connector_name}/trading-rules
openapi: 3.1.0
info:
  title: Hummingbot API
  description: API for managing Hummingbot trading instances
  version: 1.0.1
servers:
  - url: http://localhost:8000
    description: Local development server
security: []
paths:
  /connectors/{connector_name}/trading-rules:
    get:
      tags:
        - Connectors
      summary: Get Trading Rules
      description: >-
        Get trading rules for a connector, optionally filtered by trading pairs.


        This endpoint uses the MarketDataService to access non-trading connector
        instances,

        which means no authentication or account setup is required.


        Args:
            request: FastAPI request object
            connector_name: Name of the connector (e.g., 'binance', 'binance_perpetual')
            trading_pairs: Optional list of trading pairs to filter by (e.g., ['BTC-USDT', 'ETH-USDT'])

        Returns:
            Dictionary mapping trading pairs to their trading rules

        Raises:
            HTTPException: 404 if connector not found, 500 for other errors
      operationId: get_trading_rules_connectors__connector_name__trading_rules_get
      parameters:
        - name: connector_name
          in: path
          required: true
          schema:
            type: string
            title: Connector Name
        - name: trading_pairs
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Filter by specific trading pairs
            title: Trading Pairs
          description: Filter by specific trading pairs
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic

````