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

# Place order

> Single endpoint for all order types (market, limit, stop, take-profit) across all venues. Requires the `TRADE` permission scope.

Risk-rule rejections come back with HTTP `200` but a non-empty `violations` array. The order is not placed when violations are present, so check this field in every response.

Always set a stable `client_id` per trading intent. If a request times out or returns a 5xx error, retry with the same `client_id` and the engine returns the original result without placing a duplicate order.



## OpenAPI

````yaml POST /order
openapi: 3.1.0
info:
  title: DojiFunded Trading API
  description: >-
    Public REST interface for algorithmic trading on DojiFunded. Place orders,
    manage positions, and pull account state programmatically.
  version: 1.0.0
  contact:
    email: business@dojifunded.com
servers:
  - url: https://engine.dojifunded.com/v1
    description: Production
security:
  - apiKey: []
    apiSecret: []
tags:
  - name: Accounts
    description: Account state, positions, history, risk, and analytics.
  - name: Orders
    description: Place, cancel, and close orders across all venues.
  - name: Market data
    description: Public price feeds and symbol catalog. No authentication required.
paths:
  /order:
    post:
      tags:
        - Orders
      summary: Place order
      description: >-
        Single endpoint for all order types (market, limit, stop, take-profit)
        across all venues. Requires the `TRADE` permission scope.


        Risk-rule rejections come back with HTTP `200` but a non-empty
        `violations` array. The order is not placed when violations are present,
        so check this field in every response.


        Always set a stable `client_id` per trading intent. If a request times
        out or returns a 5xx error, retry with the same `client_id` and the
        engine returns the original result without placing a duplicate order.
      operationId: placeOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - symbol
                - side
                - kind
                - quantity
              properties:
                account_id:
                  type: string
                  format: uuid
                  description: >-
                    UUID of the account to trade on. Must be owned by the
                    authenticated user.
                symbol:
                  type: string
                  description: >-
                    Tradable symbol, e.g. `BTC-USD`, `ETH-USD`, `AAPL-USD`. Use
                    `GET /tickers` for the full catalog. Symbol variants like
                    `BTCUSD`, `BTC/USD`, and `btc-usd` are also accepted.
                  example: BTC-USD
                side:
                  type: string
                  enum:
                    - BUY
                    - SELL
                  description: Order side.
                kind:
                  type: string
                  enum:
                    - MARKET
                    - LIMIT
                    - STOP
                    - TAKE_PROFIT
                  description: Order type.
                quantity:
                  type: number
                  description: Base-asset quantity. Must be positive.
                  example: 0.05
                price:
                  type: number
                  description: Limit price. Required when `kind` is `LIMIT`.
                  example: 62500
                trigger_price:
                  type: number
                  description: >-
                    Trigger reference price. Required when `kind` is `STOP` or
                    `TAKE_PROFIT`.
                tif:
                  type: string
                  enum:
                    - GTC
                    - GTD
                    - GTX
                    - IOC
                    - FOK
                  description: >-
                    Time-in-force. `GTC` good till cancelled, `GTD` good till
                    date, `GTX` post-only intent (same as `GTC` plus
                    `post_only`), `IOC` immediate or cancel, `FOK` fill or kill.
                flags:
                  type: object
                  description: Order behaviour flags.
                  properties:
                    post_only:
                      type: boolean
                      description: >-
                        Reject the order if it would be immediately matched as a
                        taker.
                    reduce_only:
                      type: boolean
                      description: >-
                        Only reduce an existing position, never open or increase
                        one.
                    trigger_on_index:
                      type: boolean
                      description: 'For stop/TP orders: trigger against the index price.'
                    trigger_on_mark:
                      type: boolean
                      description: 'For stop/TP orders: trigger against the mark price.'
                client_id:
                  type: string
                  description: >-
                    Your own deduplication ID. Retrying with the same
                    `client_id` is safe, the engine returns the original result
                    rather than placing a duplicate. Surfaces in fills and audit
                    logs.
                  example: my-bot:strategy-A:1234
                platform_id:
                  type: string
                  enum:
                    - GMX
                    - OSTIUM
                  description: >-
                    Execution venue override. Overrides the account default for
                    this order only.
                parent_order_id:
                  type: string
                  format: uuid
                  description: UUID of a parent order. Links a TP or SL to its entry.
                position_id:
                  type: string
                  format: uuid
                  description: UUID of a specific open position to target when reducing.
      responses:
        '200':
          description: Order result. Check `violations` before assuming success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/Order'
                  trades:
                    type: array
                    items:
                      $ref: '#/components/schemas/Trade'
                    description: >-
                      Fills generated immediately by the order (market orders,
                      IOC/FOK).
                  violations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Violation'
                    description: >-
                      Non-empty when the order was rejected by a risk rule. The
                      order is not placed when violations are present.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Order UUID.
        status:
          type: string
          description: Current order status.
          example: OPEN
        symbol:
          type: string
          description: Tradable symbol.
        side:
          type: string
          enum:
            - BUY
            - SELL
        kind:
          type: string
          enum:
            - MARKET
            - LIMIT
            - STOP
            - TAKE_PROFIT
        quantity:
          type: number
        price:
          type: number
        client_id:
          type: string
          description: Client-supplied deduplication ID.
    Trade:
      type: object
      properties:
        id:
          type: string
          description: Trade fill ID.
        symbol:
          type: string
        side:
          type: string
          enum:
            - BUY
            - SELL
        quantity:
          type: number
        price:
          type: number
          description: Fill price.
        timestamp:
          type: string
          format: date-time
    Violation:
      type: object
      properties:
        rule:
          type: string
          description: The risk rule that was tripped.
        severity:
          type: string
          description: Violation severity.
        message:
          type: string
          description: Human-readable message.
  responses:
    Unauthorized:
      description: Missing or invalid API credentials.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: unauthorized
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key generated at Dashboard, Settings, Developer. Format:
        `doji_ak_...`
    apiSecret:
      type: apiKey
      in: header
      name: X-API-Secret
      description: 'API secret returned once at key creation. Format: `doji_sk_...`'

````