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

# Get Onchain Order by Client ID

> Retrieve order status using the client-provided order ID. This is useful for tracking orders submitted directly on-chain using the calldata endpoint.



## OpenAPI

````yaml openapi.json get /v1/order/by-client-id/{clientId}
openapi: 3.0.0
info:
  title: Swaps API
  description: The Swaps API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://swap-api.flux.fun
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags: []
paths:
  /v1/order/by-client-id/{clientId}:
    get:
      tags:
        - Orders
      summary: Get Onchain Order by Client ID
      description: >-
        Retrieve order status using the client-provided order ID. This is useful
        for tracking orders submitted directly on-chain using the calldata
        endpoint.
      operationId: OrdersController_getOrderByClientId
      parameters:
        - name: clientId
          required: true
          in: path
          description: The unique client-provided identifier for the order
          schema:
            type: string
      responses:
        '200':
          description: Order details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentFullResponseDto'
        '404':
          description: Order not found
      security:
        - api-key: []
components:
  schemas:
    IntentFullResponseDto:
      type: object
      properties:
        id:
          type: string
          example: intent_abc123xyz
          description: Unique order intent ID
        clientId:
          type: string
          example: client-order-123
          description: Client-provided order ID
          nullable: true
        action:
          type: object
          description: Order action details
          example:
            orderType: MarketOrder
            order:
              quoteToken:
                type: chain
                data:
                  tokenId: USDC
                  chainId: 8453
                  contractAddress: 0x...
              baseToken:
                type: kalshi
                data:
                  marketId: BTC-100K-2024
                  side: 'yes'
              orderType: BUY
              baseQuantity: '100'
              maxQuoteQuantityIn: '50.00'
            chainId: 8453
        createdAt:
          type: string
          example: '2024-01-12T10:00:00.000Z'
          description: When the order was created
        status:
          type: string
          enum:
            - pending
            - executing
            - validated
            - completed
            - failed
          example: validated
        balanceValidatedAt:
          type: string
          example: '2024-01-12T10:00:05.000Z'
          description: When balance was validated
          nullable: true
        txnFilledAt:
          type: string
          example: '2024-01-12T10:00:10.000Z'
          description: When transaction was filled
          nullable: true
        transactionHash:
          type: string
          example: 0xabc123...
          description: Blockchain transaction hash
          nullable: true
        isComplete:
          type: boolean
          example: false
          description: Whether the order is complete
        terminationReason:
          type: string
          example: null
          description: Reason for termination if failed
          nullable: true
      required:
        - id
        - clientId
        - action
        - createdAt
        - status
        - balanceValidatedAt
        - txnFilledAt
        - transactionHash
        - isComplete
        - terminationReason
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````