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

# Get Workflow Status

> Retrieves the status of a workflow transaction by transaction ID.



## OpenAPI

````yaml /swap-api-reference/openapi.json get /workflows/getStatus
openapi: 3.1.0
info:
  title: Swaps API
  description: >-
    The Swaps API provides instant cross-chain swap and bridge functionality for
    decentralized applications.

    It supports multiple virtual machines (EVM, Solana, Bitcoin) and various DEX
    protocols and bridge solutions.
  version: 3.0.0
  contact:
    name: Swaps.xyz
    url: https://swaps.xyz
servers:
  - url: https://api-v2.swaps.xyz/api
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /workflows/getStatus:
    get:
      summary: Get Workflow Status
      description: Retrieves the status of a workflow transaction by transaction ID.
      operationId: getWorkflowStatus
      parameters:
        - name: txId
          in: query
          description: Transaction ID from /getAction request
          required: true
          schema:
            type: string
            example: '0x1b121f30eeddfc1ee3eeb491c02be6c4b676b0ac0ac3e309fa25f010172c5af4'
      responses:
        '200':
          description: Workflow status response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowStatusResponse'
        '400':
          description: Bad request due to missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      servers:
        - url: https://api-v2.swaps.xyz/api
          description: Core Swap API Server
components:
  schemas:
    WorkflowStatusResponse:
      type: object
      required:
        - txId
        - status
        - operation
        - timestamp
        - name
        - data
      properties:
        txId:
          type: string
          description: Transaction ID
          example: '0x36f51092bdfb6f9793fefd9b2d27529fbf7362b48ded9acb7fa4cc7aea03aeca'
        status:
          type: string
          enum:
            - success
            - failed
            - pending
          description: Workflow status
          example: success
        operation:
          type: string
          description: Operation type
          example: placeOrder
        timestamp:
          type: integer
          description: Unix timestamp when workflow was executed
          example: 1765593597
        name:
          type: string
          description: Workflow name
          example: polymarket
        data:
          oneOf:
            - $ref: '#/components/schemas/PolyMarketWorkflowData'
              title: Polymarket Data
            - title: Generic Workflow Data
              type: object
              additionalProperties: true
          description: Workflow-specific data
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          description: Always false for error responses
          enum:
            - false
          example: false
        error:
          type: object
          required:
            - code
            - name
            - message
            - title
            - statusCode
            - timestamp
          properties:
            code:
              type: string
              description: Error type code for programmatic handling
            name:
              type: string
              description: Error class name
            message:
              type: string
              description: Detailed error message
            title:
              type: string
              description: Short, user-friendly error title
            statusCode:
              type: integer
              description: HTTP status code
            details:
              type: object
              description: Additional error details
              additionalProperties: true
            timestamp:
              type: string
              description: ISO 8601 timestamp when the error occurred
    PolyMarketWorkflowData:
      type: object
      required:
        - userId
        - orderRequest
        - orderResponse
      properties:
        userId:
          type: string
          description: Polymarket user ID
          example: '0x0797bfec6d2d4f733d461bbee8125805e9e9c892'
        orderRequest:
          $ref: '#/components/schemas/PolymarketOrderRequest'
        orderResponse:
          oneOf:
            - $ref: '#/components/schemas/PolymarketOpenOrder'
              title: Open Order
            - title: Error Response
              type: object
              required:
                - error
                - status
              properties:
                error:
                  type: string
                  description: Error message
                status:
                  type: string
                  description: Order status
          description: Order response from Polymarket
        relayTx:
          type: object
          nullable: true
          properties:
            txHash:
              type: string
              pattern: ^0x[a-fA-F0-9]{64}$
              description: Transaction hash of the relay transaction
            status:
              type: string
              description: Status of the relay transaction
          description: Relay transaction details (null if not applicable)
    PolymarketOrderRequest:
      type: object
      required:
        - side
        - tokenID
        - orderType
        - feeRateBps
        - slippage
        - tickSize
        - negRisk
      properties:
        side:
          type: string
          enum:
            - BUY
            - SELL
          description: Order side
        tokenID:
          type: string
          description: Polymarket CLOB token ID
          example: >-
            110902308091723190012269532299497167125504426554890434343419495764557291673806
        orderType:
          type: string
          enum:
            - FOK
            - FAK
            - GTC
            - GTD
          description: Order type (FOK/FAK are market orders, GTC/GTD are limit orders)
        feeRateBps:
          type: number
          minimum: 0
          description: Fee rate in basis points
          example: 0
        slippage:
          type: number
          description: Slippage tolerance in basis points
          example: 100
        tickSize:
          type: string
          enum:
            - '0.01'
            - '0.001'
            - '0.0001'
          description: Price tick size
        negRisk:
          type: boolean
          description: Negative risk flag
        amount:
          type: number
          description: Amount for market orders (FOK/FAK)
          example: 5
        price:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Price per share (0-1) - required for limit orders, optional for
            market orders
          example: 0.021
        size:
          type: number
          minimum: 0
          description: Number of shares for limit orders
          example: 5
    PolymarketOpenOrder:
      type: object
      required:
        - id
        - status
        - owner
        - maker_address
        - market
        - asset_id
        - side
        - original_size
        - size_matched
        - price
        - outcome
        - created_at
        - expiration
        - order_type
        - associate_trades
      properties:
        id:
          type: string
          description: Order ID
          example: '0xbd2f3c625c1f6f918a74e8645c3afee9e8f2c5adf91f178efa5e1b65f74fb489'
        status:
          type: string
          description: Order status
          example: MATCHED
        owner:
          type: string
          description: Owner ID
          example: 258f7485-b93f-52e5-2327-a53c49a299c1
        maker_address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Maker address
          example: '0xBEDcAD563ddf52391573a016Bc5EC7A334Eec756'
        market:
          type: string
          description: Market ID
          example: '0xb050c89e1e5738c79e117d28da1f057ac2f193511aab87a01b517b466c7265dc'
        asset_id:
          type: string
          description: Asset ID (token ID)
          example: >-
            110902308091723190012269532299497167125504426554890434343419495764557291673806
        side:
          type: string
          enum:
            - BUY
            - SELL
          description: Order side
        original_size:
          type: string
          description: Original order size
          example: '5'
        size_matched:
          type: string
          description: Size matched
          example: '0'
        price:
          type: string
          description: Order price
          example: '0.02'
        outcome:
          type: string
          description: Order outcome
          example: 'No'
        expiration:
          type: string
          description: Expiration timestamp
          example: '1763996360'
        order_type:
          type: string
          description: Order type
          example: GTD
        associate_trades:
          type: array
          items:
            type: string
          description: Associated trade IDs
        created_at:
          type: integer
          description: Unix timestamp when order was created
          example: 1763996291
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Limited demo key for API Reference: `5c951bc81da566bbd030ba8e20724063`.'

````