> ## 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.

# Place Order

> Places a market order (BUY or SELL) directly against the Polymarket CLOB on behalf of the user, using their pre-funded proxy wallet.

This endpoint always requires an EIP-712 `signatureByEvmEoa` produced by the user's EOA — see the [Polymarket Signing Guide](../polymarket-signing). The endpoint submits the order synchronously and returns `{ txId, orderResponse }` so callers can poll workflow status.



## OpenAPI

````yaml /swap-api-reference/openapi.json post /workflows/polymarket/placeOrder
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/polymarket/placeOrder:
    post:
      tags:
        - Polymarket
      summary: Place Order
      description: >-
        Places a market order (BUY or SELL) directly against the Polymarket CLOB
        on behalf of the user, using their pre-funded proxy wallet.


        This endpoint always requires an EIP-712 `signatureByEvmEoa` produced by
        the user's EOA — see the [Polymarket Signing
        Guide](../polymarket-signing). The endpoint submits the order
        synchronously and returns `{ txId, orderResponse }` so callers can poll
        workflow status.
      operationId: placeOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - evmEoa
                - orderRequest
                - expiration
                - signatureByEvmEoa
              properties:
                evmEoa:
                  $ref: '#/components/schemas/EvmAddress'
                  description: User's EVM wallet address
                proxyWallet:
                  $ref: '#/components/schemas/EvmAddress'
                  description: Proxy wallet address (optional)
                orderRequest:
                  type: object
                  required:
                    - side
                    - tokenID
                    - orderType
                    - tickSize
                    - negRisk
                    - amount
                    - slippage
                  properties:
                    side:
                      type: string
                      enum:
                        - BUY
                        - SELL
                      description: Order side
                    tokenID:
                      type: string
                      description: Polymarket CLOB token ID of the outcome to trade
                    orderType:
                      type: string
                      enum:
                        - FOK
                        - FAK
                      description: Order type - Fill-Or-Kill (FOK) or Fill-And-Kill (FAK)
                    tickSize:
                      type: string
                      description: Tick size from the market details (e.g., '0.01')
                    negRisk:
                      type: boolean
                      description: Negative risk flag from the market details
                    amount:
                      type: number
                      description: Order amount in USD (must be a positive number)
                    slippage:
                      type: number
                      description: Slippage tolerance in basis points
                expiration:
                  type: integer
                  description: >-
                    Unix timestamp (seconds) when `signatureByEvmEoa` expires.
                    Must be in the future and ≤ 300s ahead.
                signatureByEvmEoa:
                  $ref: '#/components/schemas/Hex'
                  description: >-
                    EIP-712 signature by the EOA over the `PlaceOrder` typed
                    data. See the [Polymarket Signing
                    Guide](../polymarket-signing).
              example:
                evmEoa: '0xB9519a08267d7B259eCA6DbD8F7286B1f176A41f'
                orderRequest:
                  side: BUY
                  tokenID: >-
                    90234889617199443673709150877675264662915727532354468551650133547723659310093
                  orderType: FOK
                  tickSize: '0.01'
                  negRisk: true
                  amount: 5
                  slippage: 100
                expiration: 1735689600
                signatureByEvmEoa: 0x...
      responses:
        '200':
          description: Order placed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  txId:
                    type: string
                    description: Box transaction ID for the order workflow
                  orderResponse:
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: Whether the order was accepted
                      errorMsg:
                        type: string
                        description: >-
                          Error message if the order failed (empty string if
                          successful)
                      orderID:
                        type: string
                        description: Unique Polymarket order ID
                      transactionsHashes:
                        type: array
                        items:
                          type: string
                        description: >-
                          Array of on-chain transaction hashes produced by the
                          order
                      status:
                        type: string
                        description: Order status (e.g. 'matched', 'LIVE')
                      takingAmount:
                        type: string
                        description: >-
                          Amount of the counter asset taken in (USDC for BUY,
                          outcome tokens for SELL)
                      makingAmount:
                        type: string
                        description: >-
                          Amount of the offered asset (USDC for BUY, outcome
                          tokens for SELL)
                example:
                  txId: >-
                    0xa66c86a47f4f81caae5d767e2d8a5a7def1a191d24eba5bd49f8767297cfe2e5
                  orderResponse:
                    success: true
                    errorMsg: ''
                    orderID: >-
                      0xb9826fe87ddf21261eceaf513977cb5ea1ae31ac173210857c879cef936dfa2b
                    transactionsHashes:
                      - >-
                        0x39ac6726cf2cfb7814bdb2e04aeeea1d3bde2d1ce7e357f79a404cacb6984f35
                    status: matched
                    takingAmount: '8.5'
                    makingAmount: '5'
        '400':
          description: Bad request due to missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            Unauthorized - Invalid or missing API key, or invalid/expired
            `signatureByEvmEoa`
          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:
    EvmAddress:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
      description: EVM address (0x prefix + 40 hex characters)
    Hex:
      type: string
      pattern: ^0x[a-fA-F0-9]*$
      description: Hex string with 0x prefix
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Limited demo key for API Reference: `5c951bc81da566bbd030ba8e20724063`.'

````