> ## Documentation Index
> Fetch the complete documentation index at: https://jupiter-feat-ai-trading-mcp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Withdraw Price Order

> Deprecated: Withdraw funds from a price-based recurring order. Use time-based orders instead.

**This endpoint is deprecated.** Price-based recurring orders are no longer supported via the API. Use time-based orders (`params.time`) with the [`/createOrder` endpoint](/recurring/create-order) instead. The documentation below is preserved for reference only.

<Warning>
  **CAUTION**

  Price-based orders via API is deprecated.
</Warning>

## Withdraw Order

If you want to withdraw funds from a price-based order, you need to do these steps:

<Steps>
  <Step>
    Get a list of the order accounts you want to withdraw via `/getRecurringOrders` endpoint.
  </Step>

  <Step>
    Choose the order account to deposit by making a post request to the `/priceDeposit` endpoint to get the transaction to deposit into the order.
  </Step>

  <Step>
    Sign then send the transaction to the network either via `/execute` endpoint or by yourself.
  </Step>
</Steps>

<Note>
  **GET RECURRING ORDERS**

  [Refer to the `/getRecurringOrders` section](/recurring/get-recurring-orders) to prepare order account you want to withdraw from.
</Note>

<Warning>
  **WARNING**

  If you do not pass in `amount`, the transaction will be built to withdraw the full amount of the order.
</Warning>

```js theme={null}
const priceWithdrawResponse = await (
    await fetch('https://api.jup.ag/recurring/v1/priceWithdraw', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'x-api-key': 'your-api-key',
        },
        body: JSON.stringify({
            order: "EpTsCUnKComCd8FDNZn3kVrQBQo2uEn5rRzYk9ocqFPH",
            user: wallet.publicKey,
            inputOrOutput: "In", // either "In" or "Out" mint, note that price-based orders auto withdraws the output tokens to the user's wallet every time the order is executed
            amount: 1000000
        }),
    })
).json();
```

## Withdraw Order Response

**Success Example Response**

```js theme={null}
{
  "requestId": "cb1c0e03-8e4a-4f85-ac36-e353c7981f5b",
  "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAcNRL7cu4ZNuxh1wI9W7GVURyr3A06dH348HDpIQzcAJ4oHNtIX+MwRgQakd3fYovqoEXuKqaHTmdCmjuWoQiMiby7TSszpu+tgf+jdiEM5n3uMiCD/N3AS0uVWTp10QrcFd1R4MYi595YUO8ViNwpWb17+Q9DxkVcz5fWpSqjtDyjKhKdx27tkl2VPxhBBJcKx9gSuUqMJnrF2JWtuKPpRPM1Qmt8G5sH80c9QL+SQJRbRoHSG7z7KaEAztDAAXRb0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAabiFf+q4GE+2h/Y0YYwDXaxDncGus7VZig8AAAAAABBt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKmMlyWPTiSJ8bs9ECkUjg2DC1oTmdr/EIQEjnvY2+n4Wcb6evO+2606PWXzaqvJdDGxu+TC0vbg5HymAgNFL11h22bCn6+jaw4yO0OzNgqgKrh+NYPQDG7Wi2D35hzKmzcjGx2VRtfxzpYauPv7ArfDDH2VHlwLKs45O0rZTboL4wMHAAUCnqwAAAcACQNADQMAAAAAAAEOAAAFCwgCAwEEBgkKDAEStxJGnJRtoSIBQEIPAAAAAAAA"
}
```

**Failed Example Response**

```js theme={null}
{
  "code": 400,
  "error": "Failed to deserialize account data: failed to fill whole buffer",
  "status": "Bad Request"
}
```

## Execute Withdraw Order

To sign then send the transaction to the network to execute the withdrawal, you can use the `/execute` endpoint or by yourself.

Refer to the [Execute Order](/recurring/execute-order) section for more details.
