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

# Prepare a limit order

> Work out every term of a limit order from its price, and get the typed data to sign. Stores nothing.

<ParamField body="chainId" type="number">Defaults to the primary EVM chain. Solana chains answer `limit_orders_unsupported`.</ParamField>

<ParamField body="sellToken" type="address" required />

<ParamField body="buyToken" type="address" required />

<ParamField body="sellAmount" type="string" required>Base units.</ParamField>
<ParamField body="limitAmount" type="string" required>The whole sell amount at the taker's price, in buy-token base units, before fees.</ParamField>

<ParamField body="taker" type="address" required />

<ParamField body="recipient" type="address">Defaults to `taker`.</ParamField>
<ParamField body="expiresInSeconds" type="number" required>300 to 2,592,000 (5 minutes to 30 days).</ParamField>

<ResponseField name="chainId" type="number" />

<ResponseField name="executor" type="address" />

<ResponseField name="permit2" type="address" />

<ResponseField name="draft" type="object">
  Every term the taker signs. Send it back unchanged to [place the order](/integrators/api/limit-orders-place).

  <Expandable title="Draft">
    <ResponseField name="chainId, taker, recipient, sellToken, buyToken, sellAmount, limitAmount" />

    <ResponseField name="minOut" type="string">`limitAmount` less the fee at that price and the gas cap.</ResponseField>

    <ResponseField name="gasFeeToken" type="address" />

    <ResponseField name="maxGasFee" type="string">Three times today's gas fee.</ResponseField>
    <ResponseField name="permitAmount" type="string">What the Permit2 authorization covers.</ResponseField>
    <ResponseField name="nonce" type="string">A fresh Permit2 nonce.</ResponseField>
    <ResponseField name="deadline" type="string">Unix seconds.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="typedData" type="object">Permit2 `PermitWitnessTransferFrom` with a `LimitAuth` witness, for `eth_signTypedData_v4`.</ResponseField>
<ResponseField name="fee" type="object">`{ token, bps, atLimit }`: the protocol fee at the limit price. `token` is null when the corridor's fee is 0.</ResponseField>
<ResponseField name="gasFeeNow" type="string">Today's gas fee, from which the cap was derived.</ResponseField>

<ResponseField name="expiresAt" type="string" />

Errors: `400 below_minimum` (with `minimum`), `bad_expiry`, `limit_below_fees`; `429 too_many_open`;
`404 limit_orders_disabled`.
