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

# POST /quote

> Preview an unstake's output amount and price impact before signing.

```http theme={null}
POST https://hubra.app/api/v1/quote
```

Preview the output of an **unstake** without committing. Use this to show price impact and output amount to a user before they sign anything.

Quotes are **non-binding**: pool state drifts between quote and unstake. Treat the returned `outAmount` and `priceImpactPct` as live estimates.

> [!NOTE]
>
> There is no quote endpoint for staking *into* a strategy. Stake quotes are deterministic: amount in equals amount out at the current receipt rate. Use [`GET /api/v1/strategies/{key}`](https://docs.hubra.app/developer/endpoints/get-strategy) to read the rate and compute locally.

***

## Request

```bash theme={null}
curl -X POST https://hubra.app/api/v1/quote \
  -H 'Content-Type: application/json' \
  -d '{
    "strategy": "sol-liquid-stake",
    "wallet":   "<your-wallet>",
    "amount":   "1.5"
  }'
```

| Field | Type | Required | Description |
| - | - | - | - |
| `strategy` | `"sol-liquid-stake" \| "sol-native-stake" \| "sol-leveraged-stake"` | yes | Which strategy to quote. |
| `wallet` | `string` | yes | Solana wallet pubkey (base58). |
| `amount` | `string` | yes | Amount to unstake, decimal string. For `sol-leveraged-stake`, this is the **raSOL Max LP** to burn. |
| `stakeAccount` | `string` | conditional | Required for `sol-native-stake`: the active stake account being settled. Not used for `sol-liquid-stake` or `sol-leveraged-stake`. |

***

## Response — `sol-liquid-stake`

```json theme={null}
{
  "strategy":       "sol-liquid-stake",
  "inAsset":        "raSOL",
  "outAsset":       "SOL",
  "inAmount":       "1.5",
  "outAmount":      "1.7616",
  "priceImpactPct": 0.0048
}
```

| Field | Type | Description |
| - | - | - |
| `inAsset` | `string` | Asset coming in (`raSOL`). |
| `outAsset` | `string` | Asset going out (`SOL`). |
| `inAmount` | `string` | Echoed input amount. |
| `outAmount` | `string` | Estimated SOL out at current pool state. |
| `priceImpactPct` | `number \| null` | Estimated price impact as a fraction (`0.0048` = 0.48%). `null` if the upstream router did not report one. |

***

## Response — `sol-native-stake` (instant)

```json theme={null}
{
  "strategy":       "sol-native-stake",
  "kind":           "instant",
  "inAsset":        "SOL",
  "outAsset":       "SOL",
  "inAmount":       "1.0",
  "outAmount":      "0.9952",
  "priceImpactPct": 0.0048
}
```

Same shape as liquid; the input "asset" is SOL because the active stake account is being settled to SOL via Sanctum's `depositStake`. `kind: "instant"` indicates this is a Sanctum-routed instant unstake quote (the only kind that can be quoted; `deactivate` does not have liquidity-based pricing).

***

## Response — `sol-leveraged-stake`

Previews burning raSOL Max LP back to raSOL. `amount` is the LP to burn; `path` is the redemption route the unstake would take.

```json theme={null}
{
  "strategy":  "sol-leveraged-stake",
  "inAsset":   "raSOL Max",
  "outAsset":  "raSOL",
  "inAmount":  "0.0195",
  "outAmount": "0.019485797",
  "path":      "flash-bracket",
  "kind":      "instant"
}
```

| Field | Type | Description |
| - | - | - |
| `inAsset` | `string` | `raSOL Max` (the LP being burned). |
| `outAsset` | `string` | `raSOL` (the payout asset — the leveraged exit stops at raSOL). |
| `outAmount` | `string` | Estimated raSOL out at current NAV. |
| `path` | `"vault-idle" \| "flash-bracket"` | Which redemption path the unstake would use. |

There is no leveraged **deposit** quote: the SOL → raSOL mint is a deterministic floor-division from the live pool snapshot, so there's nothing to preview. To estimate the SOL you'd ultimately receive (rather than raSOL), feed `outAmount` into a `sol-liquid-stake` quote.

***

## Errors

| Status | Slug | When |
| - | - | - |
| `400` | `invalid_request` | Missing `strategy` / `wallet` / `amount`, or `stakeAccount` missing for `sol-native-stake`. Also returned for `usdc-earn` (a direct vault redemption with no slippage — nothing to quote). |
| `404` | `not_found` | Unknown strategy key. |
| `502` | `upstream_error` | Sanctum's quote router could not produce a number (no liquidity, wallet has no on-chain history, etc.). |
| `503` | `service_unavailable` | Strategy is announced but not live. |

***

## See also

> [card] [POST /unstake](https://docs.hubra.app/developer/endpoints/unstake.md)
>
> Build the actual unstake transaction.

> [card] [GET /strategies/:key](https://docs.hubra.app/developer/endpoints/get-strategy.md)
>
> Read the current exchange rate.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.