> 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.

# Preview a deposit

Quotes how many shares a deposit would receive right now, from the provider's live accounting.

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

`POST /v1/earn/vault-deposit-previews`

When the strategy's `depositSlippage` is not null, set `minSharesOut` from this quote: take your tolerance off `sharesOut`. Resolve every `blockingIssues` entry before you build. The preview is read-only, takes no Idempotency-Key, and applies a deposit's access checks, provider activation included. It returns 501 when the provider cannot quote deposits.

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

Quote one direct vault deposit against the provider's live accounting. Read-only: nothing is built and nothing is persisted.

- **`strategyId`** · `string` · required · min length 1 · example `earn_strategy_3b6a81ce-00b0-4c5a-9761-cb359932e97e`

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

  Deposit amount in deposit-token units.

## Responses

- **`200`** Live deposit quote

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

    - **`strategyId`** · `string` · required · example `earn_strategy_3b6a81ce-00b0-4c5a-9761-cb359932e97e`

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

      Shares the deposit would mint at the live rate. Derive `minSharesOut` from this value minus the chosen tolerance, quantized to `shareDecimals`.

    - **`shareDecimals`** · `integer` · required · example `6`

      The share mint's decimals, which the floor must be quantized to.

    - **`blockingIssues`** · `object[]` · required

      Conditions the provider reports would block this deposit; empty when none.

      - **`code`** · `string` · required · example `SHARE_LOCKED`

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

    - **`feeSponsored`** · `boolean` · required

      Whether SDP pays network fees for Treasury movements on this cluster. It does not apply to customer wallets: to sponsor an Embedded Yield transaction, pass `feePayer` when you build it.

  - **`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/vault-deposit-previews' \
  -H "Authorization: Bearer $SDP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "strategyId": "earn_strategy_3b6a81ce-00b0-4c5a-9761-cb359932e97e",
    "amount": "25"
  }'
```

```ts tab="TypeScript"
const res = await fetch("https://api.solana.com/v1/earn/vault-deposit-previews", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SDP_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "strategyId": "earn_strategy_3b6a81ce-00b0-4c5a-9761-cb359932e97e",
    "amount": "25"
  })
});
```

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

r = requests.post("https://api.solana.com/v1/earn/vault-deposit-previews",
  headers={"Authorization": f"Bearer {os.environ['SDP_API_KEY']}"},
  json={
    "strategyId": "earn_strategy_3b6a81ce-00b0-4c5a-9761-cb359932e97e",
    "amount": "25"
  })
```

## Example responses

```json tab="200"
{
  "data": {
    "strategyId": "earn_strategy_3b6a81ce-00b0-4c5a-9761-cb359932e97e",
    "sharesOut": "24.975",
    "shareDecimals": 6,
    "blockingIssues": [],
    "feeSponsored": false
  },
  "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).
