---
title: "Create Limit Order"
method: POST
path: "/v1/limit-orders"
tags: ["limit_orders"]
---

# Create Limit Order

`POST /v1/limit-orders`

## Request

- Base URL: `https://api.fereai.xyz`
- URL: `https://api.fereai.xyz/v1/limit-orders`
- Auth: none declared

Create a limit order.

## Query parameters

- `wait` boolean
- `timeout` integer: Seconds to block when wait=true (max 90; the ~100s edge cuts longer waits — use wait=false + poll for longer).

## Request body

- LimitOrderRequest
  - `chain_id_in` integer, required: Source chain ID.
  - `chain_id_out` integer, required: Destination chain ID.
  - `token_in` string, required: Input token contract address.
  - `token_out` string, required: Output token contract address.
  - `amount` string, required: Amount in smallest unit (wei/lamports).
  - `price_usd_trigger` number, required: USD price that triggers the order execution.
  - `trigger_token_address` string, required: Token address to monitor for the price trigger.
  - `trigger_token_chain` string, required: Chain of the trigger token (chain name or ID).
  - `condition` string, required: Trigger condition: 'gte' (above price) or 'lte' (below price).
  - `slippage_bps` integer, nullable: Slippage tolerance in basis points.
  - `query` string, nullable: Original user query for context.

## Response `200`

Successful Response

- TaskResponse
  - `task_id` string, required: Celery task ID for tracking the async operation.
  - `status` string: Current task status: queued, pending, started.
  - `poll_url` string, nullable: Relative URL to poll for task status.
  - `notification_stream` string, nullable: SSE stream URL for real-time task updates.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fereai/apis/fereai-gateway.md) - [All operations](https://skmtc.dev/fereai/apis/fereai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/fereai/apis/fereai-gateway/revisions/ad211f8e2f30?raw)
