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

# Place Trade

> Place a buy or sell order using a specific account and connector.

Args:
    trade_request: Trading request with account, connector, trading pair, type, amount, etc.
    accounts_service: Injected accounts service

Returns:
    TradeResponse with order ID and trading details

Raises:
    HTTPException: 400 for invalid parameters, 404 for account/connector not found, 500 for trade execution errors



## OpenAPI

````yaml /api-reference/openapi.json post /trading/orders
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:
  /trading/orders:
    post:
      tags:
        - Trading
      summary: Place Trade
      description: |-
        Place a buy or sell order using a specific account and connector.

        Args:
            trade_request: Trading request with account, connector, trading pair, type, amount, etc.
            accounts_service: Injected accounts service

        Returns:
            TradeResponse with order ID and trading details

        Raises:
            HTTPException: 400 for invalid parameters, 404 for account/connector not found, 500 for trade execution errors
      operationId: place_trade_trading_orders_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TradeRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    TradeRequest:
      properties:
        account_name:
          type: string
          title: Account Name
          description: Name of the account to trade with
        connector_name:
          type: string
          title: Connector Name
          description: Name of the connector/exchange
        trading_pair:
          type: string
          title: Trading Pair
          description: Trading pair (e.g., BTC-USDT)
        trade_type:
          type: string
          enum:
            - BUY
            - SELL
          title: Trade Type
          description: Whether to buy or sell
        amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: Amount to trade
        order_type:
          type: string
          enum:
            - LIMIT
            - MARKET
            - LIMIT_MAKER
          title: Order Type
          description: Type of order
          default: LIMIT
        price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Price
          description: Price for limit orders
        position_action:
          type: string
          enum:
            - OPEN
            - CLOSE
          title: Position Action
          description: Position action for perpetual contracts (OPEN/CLOSE)
          default: OPEN
      type: object
      required:
        - account_name
        - connector_name
        - trading_pair
        - trade_type
        - amount
      title: TradeRequest
      description: Request model for placing trades
    TradeResponse:
      properties:
        order_id:
          type: string
          title: Order Id
          description: Client order ID assigned by the connector
        account_name:
          type: string
          title: Account Name
          description: Account used for the trade
        connector_name:
          type: string
          title: Connector Name
          description: Connector used for the trade
        trading_pair:
          type: string
          title: Trading Pair
          description: Trading pair
        trade_type:
          type: string
          title: Trade Type
          description: Trade type
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: Trade amount
        order_type:
          type: string
          title: Order Type
          description: Order type
        price:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Price
          description: Order price
        status:
          type: string
          title: Status
          description: Order status
          default: submitted
      type: object
      required:
        - order_id
        - account_name
        - connector_name
        - trading_pair
        - trade_type
        - amount
        - order_type
        - price
      title: TradeResponse
      description: Response model for trade execution
    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

````