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

# Place Order

> Place a new trading order



## OpenAPI

````yaml https://spec.speakeasy.com/aries/aries/aries-trading-platform-api-with-code-samples post /v1/orders
openapi: 3.0.3
info:
  title: Aries Trading Platform API
  description: >-
    Complete API documentation for the Aries trading platform including user
    management, authentication, account management, order management, market
    data, and analytics
  contact:
    name: Aries Financial
    email: dev@aries.com
  version: 1.0.0
servers:
  - url: https://api.tradearies.dev
    description: Production server
security: []
tags:
  - name: Accounts
    description: Account management endpoints for positions, orders, and balances
  - name: Analytics
    description: >-
      Analytics endpoints for market data analysis including top gainers,
      losers, volume leaders, sector analysis, analyst ratings, market breadth,
      and net inflow
  - name: Authentication
    description: User authentication endpoints
  - name: Calendars
    description: Calendar endpoints for economic events and historical data
  - name: Market Data
    description: >-
      Market data endpoints for symbol search, real-time data access, and equity
      details
  - name: Orders
    description: >-
      Order management endpoints for placing, updating, canceling, and
      previewing orders
  - name: Users
    description: User management endpoints
  - name: Health
    description: Service health endpoints
paths:
  /v1/orders:
    post:
      tags:
        - Orders
      summary: Place Order
      description: Place a new trading order
      operationId: placeOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceOrderRequest'
        required: true
      responses:
        '200':
          description: Order placed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaceOrderResponse'
        '400':
          description: Bad request - invalid parameters or order rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid authentication
        '500':
          description: Internal server error
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from finance_dev import FinanceDev, models
            import os


            with FinanceDev(
                security=models.Security(
                    client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
                    client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
                ),
            ) as fd_client:

                res = fd_client.orders.place_order(account_id="TEST-ACCOUNT-001", symbol="AAPL", side=models.OrderSideEnum.BUY, type_=models.OrderTypeEnum.MARKET, qty="10", time_in_force=models.TimeInForceEnum.DAY, client_id="CLIENT-001", price="150.00", stop_price="145.00", currency="USD", legs=[
                    {
                        "symbol": "AAPL",
                        "side": models.Side.BUY,
                        "ratio_qty": "1",
                        "security_type": models.SecurityTypeEnum.CS,
                        "maturity": "2025-01-17",
                        "strike_price": "150.00",
                        "position_effect": models.PositionEffect.OPEN,
                        "put_call": models.OrdLegPutCall.CALL,
                    },
                ])

                # Handle response
                print(res)
        - lang: java
          label: Java (SDK)
          source: |-
            package hello.world;

            import java.lang.Exception;
            import org.openapis.openapi.AriesJava;
            import org.openapis.openapi.models.components.PlaceOrderRequest;
            import org.openapis.openapi.models.errors.ErrorResponse;
            import org.openapis.openapi.models.operations.PlaceOrderResponse;

            public class Application {

                public static void main(String[] args) throws ErrorResponse, Exception {

                    AriesJava sdk = AriesJava.builder()
                            .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
                        .build();

                    PlaceOrderRequest req = PlaceOrderRequest.builder()
                            .account("12682708")
                            .symbol("<value>")
                            .quantity(451705L)
                            .orderType("<value>")
                            .tradeAction("<value>")
                            .timeInForce("<value>")
                            .build();

                    PlaceOrderResponse res = sdk.orders().create()
                            .request(req)
                            .call();

                    if (res.placeOrderResponse().isPresent()) {
                        // handle response
                    }
                }
            }
components:
  schemas:
    PlaceOrderRequest:
      type: object
      properties:
        account:
          type: string
          description: Account ID
        symbol:
          type: string
          description: Trading symbol
        quantity:
          type: integer
          format: int64
          description: Order quantity
        orderType:
          type: string
          description: Order type (MARKET, LIMIT, STOP, STOP_LIMIT)
        tradeAction:
          type: string
          description: Trade action (BUY, SELL)
        timeInForce:
          type: string
          description: Time in force (DAY, GTC, IOC, FOK)
        route:
          type: string
          description: Order routing destination
        limitPrice:
          type: string
          description: Limit price for limit orders
        stopPrice:
          type: string
          description: Stop price for stop orders
        legs:
          type: array
          items:
            $ref: '#/components/schemas/Leg'
          description: Legs for multi-leg orders
      required:
        - account
        - symbol
        - quantity
        - orderType
        - tradeAction
        - timeInForce
    PlaceOrderResponse:
      type: object
      properties:
        orderId:
          type: integer
          format: int64
          description: Placed order ID
        status:
          type: string
          description: Order status
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        codes:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code
              description:
                type: string
                description: Error description
    Leg:
      type: object
      properties:
        symbol:
          type: string
          description: Trading symbol for the leg
        ratioQuantity:
          type: string
          description: Ratio quantity for the leg
        tradeAction:
          type: string
          description: Trade action (BUY, SELL)
        positionEffect:
          type: string
          description: Position effect (OPEN, CLOSE)
      required:
        - symbol
        - ratioQuantity
        - tradeAction
        - positionEffect
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````