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

# Place spot order

> Place a spot order on Hyperliquid. Supports market and limit orders. Docent automatically funds the trade from your unified balance if needed.



## OpenAPI

````yaml POST /v1/orders/spot
openapi: 3.1.0
info:
  title: Docent API
  description: >-
    REST API for programmatic trading on Hyperliquid and Polymarket via Docent.
    Create API agents, fund a dedicated wallet, place trades, check balances,
    and move funds between venues with API keys.
  version: 1.0.0
  contact:
    email: support@trydocent.com
servers:
  - url: https://api.trydocent.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Registration, key management, and auth status
  - name: Balances
    description: Unified balance across all trading venues
  - name: Positions
    description: Open positions on Hyperliquid and Polymarket
  - name: Markets
    description: Market metadata and search
  - name: Orders
    description: Place orders on Hyperliquid perpetuals, spot, and Polymarket
  - name: Transfers
    description: Move funds between trading venues
  - name: Actions
    description: Poll workflow execution status
  - name: Strategies
    description: Coming soon. Reserved for future strategy endpoints.
paths:
  /v1/orders/spot:
    post:
      tags:
        - Orders
      summary: Place spot order
      description: >-
        Place a spot order on Hyperliquid. Supports market and limit orders.
        Docent automatically funds the trade from your unified balance if
        needed.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceSpotOrderRequest'
      responses:
        '202':
          description: Order accepted for asynchronous execution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '400':
          description: Validation or execution error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PlaceSpotOrderRequest:
      type: object
      required:
        - symbol
        - side
        - amountUsd
        - orderType
      properties:
        symbol:
          type: string
          description: Spot trading pair symbol (for example `PURR` or `HFUN`)
          example: PURR
        side:
          type: string
          enum:
            - BUY
            - SELL
        amountUsd:
          type: number
          description: Amount in USD
          example: 100
        orderType:
          type: string
          enum:
            - market
            - limit
        limitPrice:
          type: number
          description: Limit price (required for limit orders)
        maxSlippagePercent:
          type: number
          description: Optional maximum slippage percentage
    OrderResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        actionId:
          type: string
          description: Action ID for polling status via `/v1/actions`
        workflowId:
          type: string
          description: Internal workflow ID
      required:
        - success
        - actionId
        - workflowId
    Error:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - RATE_LIMITED
            - BAD_REQUEST
            - VALIDATION_ERROR
            - NOT_FOUND
            - ORDER_REJECTED
            - ORDER_FAILED
            - TRANSFER_FAILED
            - REGISTRATION_FAILED
            - ROTATION_FAILED
            - NOT_IMPLEMENTED
        retryAfter:
          type: number
          description: Milliseconds until rate limit resets (only on 429)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in the format `dk_live_...`. Pass as `Authorization: Bearer
        dk_live_...`

````