> ## 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.

# Add Trading Pair

> Initialize order book for a trading pair.

This endpoint dynamically adds a trading pair to a connector's order book tracker.
It uses the best available connector (trading connectors are preferred over data connectors).

Args:
    request: Request with connector name, trading pair, optional account name, and timeout

Returns:
    TradingPairResponse with success status and message

Raises:
    HTTPException: 500 if initialization fails



## OpenAPI

````yaml /api-reference/openapi.json post /market-data/trading-pair/add
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:
  /market-data/trading-pair/add:
    post:
      tags:
        - Market Data
      summary: Add Trading Pair
      description: >-
        Initialize order book for a trading pair.


        This endpoint dynamically adds a trading pair to a connector's order
        book tracker.

        It uses the best available connector (trading connectors are preferred
        over data connectors).


        Args:
            request: Request with connector name, trading pair, optional account name, and timeout

        Returns:
            TradingPairResponse with success status and message

        Raises:
            HTTPException: 500 if initialization fails
      operationId: add_trading_pair_market_data_trading_pair_add_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddTradingPairRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradingPairResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    AddTradingPairRequest:
      properties:
        connector_name:
          type: string
          title: Connector Name
          description: Name of the connector (e.g., 'binance', 'binance_perpetual')
        trading_pair:
          type: string
          title: Trading Pair
          description: Trading pair to add (e.g., 'BTC-USDT')
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
          description: Optional account name for trading connector preference
        timeout:
          type: number
          maximum: 120
          minimum: 1
          title: Timeout
          description: Timeout in seconds for order book initialization
          default: 30
      type: object
      required:
        - connector_name
        - trading_pair
      title: AddTradingPairRequest
      description: Request model for adding a trading pair to order book tracking
    TradingPairResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the operation succeeded
        connector_name:
          type: string
          title: Connector Name
          description: Name of the connector
        trading_pair:
          type: string
          title: Trading Pair
          description: Trading pair that was added/removed
        message:
          type: string
          title: Message
          description: Status message
      type: object
      required:
        - success
        - connector_name
        - trading_pair
        - message
      title: TradingPairResponse
      description: Response model for trading pair management operations
    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

````