> Solana Developer Platform docs, served as Markdown. The [docs index](https://platform-beta.solana.com/docs.md) lists every page and [llms.txt](https://platform-beta.solana.com/docs/ai/llms.txt) the key ones; [SKILL.md](https://platform-beta.solana.com/SKILL.md) has the rules for building on SDP.

# List withdrawal options

Lists the withdrawal routes a position supports right now: instant, provider order, solver queue and operator redemption, each read from live provider state.

> **Earn is under active development.** Features, API endpoints, and docs may change.

`POST /v1/earn/external-wallet/withdrawal-options`

A position offers instant or provider order, never both; the withdrawal endpoints build whichever it offers. Call this when the customer starts a withdrawal, and let them choose when more than one route is available. Never infer a route from the strategy's `liquidityTerm`.

Requires an [API key](/docs/developing-with-sdp/authentication) with the `earn.read` action.

## Headers

- **`x-project-id`** · `string` · min length 1 · example `prj_example`

  Required for dashboard sessions. API keys use their assigned project.

## Request body

`application/json` · required

List the withdrawal routes a position supports right now.

- **`positionId`** · `string` · required · min length 1 · max length 128 · example `earn_position_2f8b6b04-7147-487e-b760-b1caa4fbcb8b`

  The position's ID, from the positions list or the deposit submit response.

## Responses

- **`200`** Withdrawal options and their live terms

  - **`data`** · `object` · required

    - **`positionId`** · `string` · required · min length 1 · max length 128 · example `earn_position_2f8b6b04-7147-487e-b760-b1caa4fbcb8b`

      The position's ID, from the positions list or the deposit submit response.

    - **`instant`** · `boolean` · required

      Whether the withdrawal endpoints build an instant withdrawal for this position. Never true together with `providerOrder`.

    - **`providerRedemptionModes`** · `string[]` · each one of `standard`, `instant`

    - **`providerOrder`** · `boolean` · required

      Whether the withdrawal endpoints build a provider order that pays out later. Never true together with `instant`.

    - **`queued`** · `boolean` · required

      Whether a solver queue accepts requests now. Never infer it from `liquidityTerm`.

    - **`withdrawAuthority`** · `string | null` · required

      The withdrawal authority the queue's vault reports, or null without a queue. Informational: no request takes it.

    - **`queueState`** · `string | null` · required

      The provider queue account, or null without a queue.

    - **`queueAsset`** · `object | null` · required

      Live asset-specific queue limits. Null when this asset has no queue configuration.

      - **`assetMint`** · `string` · required · min length 32 · max length 44 · pattern `^[1-9A-HJ-NP-Za-km-z]{32,44}$` · example `2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo`

        Base58 Solana mint address.

      - **`allowWithdrawals`** · `boolean` · required

        Whether this asset's queue currently accepts new requests.

      - **`secondsToMaturity`** · `integer` · required · min 0 · example `86400`

        Seconds after the request is created, by the cluster clock, before a solver may fulfill it.

      - **`minimumSecondsToDeadline`** · `integer` · required · min 0 · example `3600`

        Shortest solver window accepted after maturity.

      - **`maximumSecondsToDeadline`** · `integer` · required · greater than 0 · max 7776000 · example `7776000`

        Longest solver window accepted after maturity.

      - **`minimumDiscountBps`** · `integer` · required · min 0 · max 10000 · example `0`

      - **`maximumDiscountBps`** · `integer` · required · min 0 · max 10000 · example `500`

      - **`minimumShares`** · `string` · required · max length 128 · pattern `^(?=.*[1-9])\d+(\.\d+)?$` · example `1`

        Smallest request accepted by the queue, in share units.

      - **`shareDecimals`** · `integer` · required · min 0 · max 38 · example `6`

    - **`parRedemption`** · `object | null` · required

      Live operator redemption terms. Null when this strategy offers no operator redemption.

      - **`intermediateMint`** · `string` · required · min length 32 · max length 44 · pattern `^[1-9A-HJ-NP-Za-km-z]{32,44}$` · example `2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo`

        Token created or delegated by the request transaction and later burned by the operator.

      - **`assetMint`** · `string` · required · min length 32 · max length 44 · pattern `^[1-9A-HJ-NP-Za-km-z]{32,44}$` · example `2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo`

        Token the operator pays when the redemption completes.

      - **`minimumShares`** · `string | null` · required · max length 128 · pattern `^(?=.*[1-9])\d+(\.\d+)?$` · example `1`

        Smallest operator redemption request funded by shares, in position-share units. Null while the provider's rate is unavailable, which also blocks share-funded requests.

      - **`minimumIntermediateAmount`** · `string` · required · max length 128 · pattern `^(?=.*[1-9])\d+(\.\d+)?$` · example `0.000001`

        Smallest request over intermediate the owner already holds, in intermediate-token units.

      - **`shareDecimals`** · `integer` · required · min 0 · max 38 · example `6`

      - **`assetDecimals`** · `integer` · required · min 0 · max 38 · example `6`

      - **`cancelable`** · `boolean` · required

        Whether the owner may revoke an open request before the operator completes it.

      - **`operatorSettled`** · `boolean` · required · always `true`

        Always true: a provider operator must complete the eventual asset payout.

  - **`meta`** · `object` · required

    Response metadata.

    - **`requestId`** · `string` · required · min length 1 · example `req_example`

      Request identifier for tracing.

    - **`timestamp`** · `string` · required · format `date-time` · example `2025-01-01T00:00:00.000Z`

      ISO 8601 timestamp.

- **`400`** Bad Request

  - **`error`** · `object` · required

    Standard error payload.

    - **`code`** · `string` · required

      Machine-readable error code.

    - **`message`** · `string` · required

      Human-readable error message.

    - **`details`** · `object`

      Optional error details for debugging.

      - **`*`** · `any`

  - **`meta`** · `object`

    - **`requestId`** · `string` · min length 1 · example `req_example`

      Request identifier for tracing.

- **`401`** Unauthorized

  Same fields as `400`.

- **`403`** Forbidden. Requires the `earn.read` action: an API key must hold it (a module's `manage` or `execute` also covers its `read`), and a signed-in member's organization role must include it. Without it the error is INSUFFICIENT_PERMISSIONS and `error.details.action` names the action. Any other 403 names its own reason.

  Same fields as `400`.

- **`404`** Not Found

  Same fields as `400`.

- **`429`** Too Many Requests

  Same fields as `400`.

- **`500`** Internal Server Error

  Same fields as `400`.

- **`501`** The provider does not support this operation.

  - **`error`** · `object` · required

    Standard error payload.

    - **`code`** · `string` · required

    - **`message`** · `string` · required

      Human-readable error message.

    - **`details`** · `object`

      Optional error details for debugging.

      - **`*`** · `any`

  - **`meta`** · `object`

    - **`requestId`** · `string` · min length 1 · example `req_example`

      Request identifier for tracing.

- **`503`** Service Unavailable

  Same fields as `400`.

## Example request

```bash tab="cURL"
curl -X POST 'https://api.solana.com/v1/earn/external-wallet/withdrawal-options' \
  -H "Authorization: Bearer $SDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "positionId": "earn_position_0432ffeb-c574-4b11-80dc-a09defb68fcc"
  }'
```

```ts tab="TypeScript"
const res = await fetch("https://api.solana.com/v1/earn/external-wallet/withdrawal-options", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SDP_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "positionId": "earn_position_0432ffeb-c574-4b11-80dc-a09defb68fcc"
  })
});
```

```python tab="Python"
import os, requests

r = requests.post("https://api.solana.com/v1/earn/external-wallet/withdrawal-options",
  headers={"Authorization": f"Bearer {os.environ['SDP_API_KEY']}"},
  json={
    "positionId": "earn_position_0432ffeb-c574-4b11-80dc-a09defb68fcc"
  })
```

## Example responses

```json tab="200"
{
  "data": {
    "positionId": "earn_position_0432ffeb-c574-4b11-80dc-a09defb68fcc",
    "instant": true,
    "providerOrder": false,
    "queued": true,
    "withdrawAuthority": "11111111111111111111111111111111",
    "queueState": "7XbSKzG8Kf1qsprNV1XE9YHNNpSV7jZBWLx1n4B6tSDf",
    "queueAsset": {
      "assetMint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
      "allowWithdrawals": true,
      "secondsToMaturity": 3600,
      "minimumSecondsToDeadline": 60,
      "maximumSecondsToDeadline": 7776000,
      "minimumDiscountBps": 0,
      "maximumDiscountBps": 100,
      "minimumShares": "0.000001",
      "shareDecimals": 6
    },
    "parRedemption": null
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}
```

```json tab="403"
{
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "Missing action: earn.read",
    "details": {
      "action": "earn.read"
    }
  },
  "meta": {
    "requestId": "req_example"
  }
}
```

Error responses use the [standard error shape](/docs/reference/conventions/errors).
