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

# Post api order

> POST create order



## OpenAPI

````yaml /openapi.yaml post /api/{blockchain}/order
openapi: 3.1.0
info:
  title: swap-8dx
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://swap.ggp.gg
  - url: https://8dx.io
security: []
tags:
  - name: swap
    description: Swap API endpoints
  - name: approve
    description: Approve (Permit) API endpoints
  - name: explorer
    description: Explorer API endpoints
  - name: order
    description: Limit Order API endpoints
  - name: healthcheck
    description: Health Check API endpoints
paths:
  /api/{blockchain}/order:
    post:
      tags:
        - order
      description: POST create order
      operationId: create_order
      parameters:
        - name: blockchain
          in: path
          required: true
          schema:
            type: string
            enum:
              - ethereum
              - bsc
              - arbitrum
      requestBody:
        description: Order params with signatures and extensions
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderBody'
        required: true
      responses:
        '201':
          description: Success creation order with orderHash
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
              examples:
                Result:
                  summary: Result
                  value:
                    orderHash: >-
                      0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        '400':
          description: Bad request error from HTTP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                BadRequest:
                  summary: Bad request
                  value:
                    code: 400
                    error: string
        '408':
          description: Request timeout error from HTTP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RequestTimeout:
                  summary: Request timeout
                  value:
                    code: 408
                    error: string
        '500':
          description: Internal server error from HTTP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Internal:
                  summary: Internal
                  value:
                    code: 500
                    error: string
components:
  schemas:
    OrderBody:
      type: object
      required:
        - makerSrcOrToken
        - takerSrcOrToken
        - maker
        - orderType
        - params
      properties:
        maker:
          type: string
          description: Maker wallet or contract address
        makerSrcOrToken:
          type: string
          description: Address of the maker asset (ERC20 token contract)
        orderType:
          $ref: '#/components/schemas/OrderType'
          description: Order type
        params:
          $ref: '#/components/schemas/LimitOrderParams'
          description: Limit order params
        recipient:
          type:
            - string
            - 'null'
          description: Other destination wallet or contract
        takerSrcOrToken:
          type: string
          description: Address of the taker asset (ERC20 token contract)
    CreateOrderResponse:
      type: object
      required:
        - orderHash
      properties:
        orderHash:
          type: string
          description: Order hash (id in bytes32)
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        code:
          type: integer
          format: int32
          minimum: 0
        error:
          type: string
    OrderType:
      type: string
      enum:
        - limit
        - twap
    LimitOrderParams:
      type: object
      required:
        - makingAmount
        - takingAmount
        - makerTraits
        - salt
        - signature
      properties:
        extension:
          type:
            - string
            - 'null'
          description: >-
            An interaction call data. ABI encoded set of makerAssetSuffix,
            takerAssetSuffix,

            makingAmountGetter, takingAmountGetter, predicate, permit,
            preInteraction, postInteraction.

            If extension exists then lowest 160 bits of the order salt must be
            equal to the lowest 160 bits of the extension hash
        makerTraits:
          $ref: '#/components/schemas/MakerTraits'
          description: >-
            Includes some flags like allow multiple fills, is partial fill
            allowed or not, price improvement, nonce, deadline, etc
        makingAmount:
          type: string
          description: >-
            Amount of the maker token to swap (in token's smallest unit, e.g.,
            wei for ETH)
        salt:
          type: string
          description: >-
            Some unique value. It is necessary to be able to create limit orders
            with the same parameters (so that they have a different hash),

            Lowest 160 bits of the order salt must be equal to the lowest 160
            bits of the extension hash
        signature:
          type: string
          description: Signature of the limit order typed data (using signTypedData_v4)
        takingAmount:
          type: string
          description: >-
            Amount of the taker token to receive (in token's smallest unit,
            e.g., wei for ETH)
    MakerTraits:
      type: object
      required:
        - allowedSenderSuffix
        - expiration
        - nonceOrEpoch
        - series
        - allowPartialFills
        - allowMultipleFills
        - needPreInteractionCall
        - needPostInteractionCall
        - needCheckEpochManager
        - hasExtension
        - usePermit2
        - unwrapWeth
      properties:
        allowMultipleFills:
          type: boolean
        allowPartialFills:
          type: boolean
        allowedSenderSuffix:
          type: string
        expiration:
          type: integer
          format: int64
          minimum: 0
        hasExtension:
          type: boolean
        needCheckEpochManager:
          type: boolean
        needPostInteractionCall:
          type: boolean
        needPreInteractionCall:
          type: boolean
        nonceOrEpoch:
          type: integer
          format: int64
          minimum: 0
        series:
          type: integer
          format: int64
          minimum: 0
        unwrapWeth:
          type: boolean
        usePermit2:
          type: boolean

````