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

# Create order

> **Limit: 10 requests per 1 second**

`POST /v1/order`

Place order maker/taker, the order executed information will be update from websocket stream.
will response immediately with an order created message.

`MARKET` type order behavior: it matches until the full size is executed. If the size is too large (larger than whole book) or the matching price exceeds the price limit (refer to `price_range`), then the remaining quantity will be cancelled.

`IOC` type order behavior: it matches as much as possible at the order_price. If not fully executed, then remaining quantity will be cancelled.

`FOK` type order behavior: if the order can be fully executed at the order_price then the order gets fully executed otherwise would be cancelled without any execution.

`POST_ONLY` type order behavior: if the order will be executed with any maker trades at the time of placement, then it will be cancelled without any execution. If a `POST_ONLY` order would match only with hidden quantity at the price level, the incoming `POST_ONLY` order is treated as the maker side for that execution and the resting hidden order is treated as the taker side.

`ASK` type order behavior: the order price is guranteed to be the best ask price of the orderbook at the time it gets accepted.

`BID` type order behavior: the order price is guranteed to be the best bid price of the orderbook at the time it gets accepted.

`visible_quantity` behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to order_quantity, negative number and number larger than `order_quantity` is not allowed. If it sets to 0, the order would be hidden from the orderbook. It doesn't work for `MARKET`/`IOC`/`FOK` orders since orders with these types would be executed and cancelled immediately and not be shown on orderbook. For `LIMIT` order, as long as it's not complete, `visible_quantity` is the maximum quantity that shown on orderbook. When hidden quantity is matched by a new incoming order, the hidden side is marked as taker and charged the taker fee. If an order has both hidden and visible quantity, the hidden quantity is matched before the visible quantity.

`order_quantity` are provided. The precision of the number should be within 8 digits.

`client_order_id` behavior: customized order_id, a unique id among open orders. Orders with the same `client_order_id` can be accepted only when the previous one if completed, otherwise the order will be rejected.

Note: This endpoint requires `trading` scope in orderly key.



## OpenAPI

````yaml orderly.openapi post /v1/order
openapi: 3.0.1
info:
  title: EVM
  description: ''
  version: 1.0.0
servers:
  - url: https://api.orderly.org
    description: Mainnet
  - url: https://testnet-api.orderly.org
    description: Testnet
security: []
tags:
  - name: public
  - name: private
paths:
  /v1/order:
    post:
      tags:
        - private
      summary: Create order
      description: >-
        **Limit: 10 requests per 1 second**


        `POST /v1/order`


        Place order maker/taker, the order executed information will be update
        from websocket stream.

        will response immediately with an order created message.


        `MARKET` type order behavior: it matches until the full size is
        executed. If the size is too large (larger than whole book) or the
        matching price exceeds the price limit (refer to `price_range`), then
        the remaining quantity will be cancelled.


        `IOC` type order behavior: it matches as much as possible at the
        order_price. If not fully executed, then remaining quantity will be
        cancelled.


        `FOK` type order behavior: if the order can be fully executed at the
        order_price then the order gets fully executed otherwise would be
        cancelled without any execution.


        `POST_ONLY` type order behavior: if the order will be executed with any
        maker trades at the time of placement, then it will be cancelled without
        any execution. If a `POST_ONLY` order would match only with hidden
        quantity at the price level, the incoming `POST_ONLY` order is treated
        as the maker side for that execution and the resting hidden order is
        treated as the taker side.


        `ASK` type order behavior: the order price is guranteed to be the best
        ask price of the orderbook at the time it gets accepted.


        `BID` type order behavior: the order price is guranteed to be the best
        bid price of the orderbook at the time it gets accepted.


        `visible_quantity` behavior: it sets the maximum quantity to be shown on
        orderbook. By default, it is equal to order_quantity, negative number
        and number larger than `order_quantity` is not allowed. If it sets to 0,
        the order would be hidden from the orderbook. It doesn't work for
        `MARKET`/`IOC`/`FOK` orders since orders with these types would be
        executed and cancelled immediately and not be shown on orderbook. For
        `LIMIT` order, as long as it's not complete, `visible_quantity` is the
        maximum quantity that shown on orderbook. When hidden quantity is
        matched by a new incoming order, the hidden side is marked as taker and
        charged the taker fee. If an order has both hidden and visible quantity,
        the hidden quantity is matched before the visible quantity.


        `order_quantity` are provided. The precision of the number should be
        within 8 digits.


        `client_order_id` behavior: customized order_id, a unique id among open
        orders. Orders with the same `client_order_id` can be accepted only when
        the previous one if completed, otherwise the order will be rejected.


        Note: This endpoint requires `trading` scope in orderly key.
      parameters:
        - $ref: '#/components/parameters/orderly_timestamp'
        - $ref: '#/components/parameters/orderly_account_id'
        - $ref: '#/components/parameters/orderly_key'
        - $ref: '#/components/parameters/orderly_signature'
        - $ref: '#/components/parameters/recv_window_header'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostOrderBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostOrderResponse'
      deprecated: false
components:
  parameters:
    orderly_timestamp:
      name: orderly-timestamp
      in: header
      description: Timestamp of the signed request in milliseconds.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: '1649920583000'
    orderly_account_id:
      name: orderly-account-id
      in: header
      description: Account ID of the authenticated account.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: 6.858456565150415e+75
    orderly_key:
      name: orderly-key
      in: header
      description: Public orderly key used to sign the request.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: ed25519:8tm7dnKYkSc3FzgPuJaw1wztr79eeZpN35nHW5pL5XhX
    orderly_signature:
      name: orderly-signature
      in: header
      description: Signature of the request payload generated with the orderly key.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: >-
        dG4bkKiqG0dUYLzViRZkvbI6Sy239JxAdNMIBxFZ4w030Jofr0ORV06GHtvXZkaZaWUXE+XAU3fnzKN/5fDeBQ==
    recv_window_header:
      name: x-recv-window
      in: header
      description: >-
        Use this parameter to control the timeout threshold for placing order,
        unit in miliseconds
      required: false
      schema:
        type: number
      example: 20
  schemas:
    PostOrderBody:
      required:
        - order_type
        - side
        - symbol
      type: object
      properties:
        symbol:
          type: string
          example: PERP_ETH_USDC
        client_order_id:
          type: string
          description: >-
            36 length, accepts hyphen but cannot be the first character,
            default: null
        order_type:
          type: string
          description: '`LIMIT`/`MARKET`/`IOC`/`FOK`/`POST_ONLY`/`ASK`/`BID`'
        order_price:
          type: number
          description: >-
            If order_type is MARKET/ASK/BID, then is not required, otherwise
            this parameter is required.
        order_quantity:
          type: number
          description: ''
        order_amount:
          type: number
          description: For MARKET/ASK/BID order, the order size in terms of quote currency
        visible_quantity:
          type: number
          description: >
            The order quantity shown on orderbook. (default: equal to
            order_quantity)

            Visible quantity is not supported for post-only orders.
        side:
          type: string
          description: '`SELL`/`BUY`'
        reduce_only:
          type: boolean
          description: Default false
        slippage:
          type: number
          description: '`MARKET` orders beyond this slippage will not be executed'
        order_tag:
          type: string
          description: >
            Optional tag for the order. Supports two formats:

            - Referral code: plain string (e.g., `REFERRAL2026`) - overrides
            referral relationship

            - Order tag fee config: `enum:<enum_id>` (e.g., `enum:STRATEGY_DCA`)
            - adds fee on top of existing fees, preserves referral

            Max length: 36 characters. Cannot be modified after order placement.
        level:
          type: number
          description: >-
            Integer value from `0` to `4`. This parameter controls wether to
            present the price of bid0 to bid4 or ask0 to ask4. Only allowed when
            `order_type` is `BID` or `ASK`.
        post_only_adjust:
          type: boolean
          description: >-
            If set to true, then price will be adjusted to 1 tick close to
            current best price. Only supported for `POST_ONLY` type orders
        margin_mode:
          type: string
          description: >-
            Margin mode for the order. Default: the symbol's current default
            margin mode.
          enum:
            - CROSS
            - ISOLATED
    PostOrderResponse:
      allOf:
        - $ref: '#/components/schemas/BasicResponse'
        - required:
            - data
          type: object
          properties:
            data:
              $ref: '#/components/schemas/CreatedOrder'
    BasicResponse:
      required:
        - success
      type: object
      properties:
        success:
          description: Indicates whether the request was successful.
          type: boolean
          example: true
        timestamp:
          description: Server timestamp in milliseconds.
          type: integer
          example: 1702989203989
    CreatedOrder:
      type: object
      properties:
        order_id:
          type: number
          example: 13
        client_order_id:
          type: string
          example: testclientid
        order_type:
          type: string
          example: LIMIT
        order_price:
          type: number
          example: 100.12
        order_quantity:
          type: number
          example: 0.987654
        error_message:
          type: string
          example: none

````