# Quote a Deposit or a Withdrawal

> Coming soon, upon request — this feature is turned on for your tenant by the Aurea team. [Contact us](https://www.aureahub.com/contact)

What a deposit or a withdrawal would do, before the user commits to it.

## Overview

- The same checks as the write — the product switched on (`403` `EARN_PRODUCT_OFF`), the route and the chain, the limits, the wallet — then the route, who signs (`server` or `client`), the wallet, `expectedAmount`, `fee`, what the wallet or the position holds (`available`) and the exact approval a deposit needs first (`approvalAmount`, or `null`).
- `reading` is the product's state and rate on that chain, with its age: a quote answers them instead of refusing a stale reading.
- `amount` is `null` in the answer for a withdrawal of `max`. A product with share tokens adds `shares`; the bridge route adds `nativeFee`, the fee paid with the transaction in the chain's native token.

## Endpoint

### `GET /v1/earn/quote`

Authentication: bearer token required.

What a deposit or a withdrawal would do.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `productId` | string | yes | The product's identifier |
| `side` | string | yes | `deposit` or `withdrawal` |
| `amount` | string | yes | In the asset's smallest unit; a withdrawal may say `max` |
| `isTestnet` | string | no | `true` testnet, `false` (default) mainnet |
| `walletId` | string | no | One of the user's EVM wallets; without it, the first one somebody can sign for |
| `route` | string | no | `direct`, `bridge` or `secondary_market`; without it, the first open to the wallet |
| `chainId` | integer | no | The chain to quote on; without it, the one the wallet is on |

**Responses**

`200` OK

```json
{
  "productId": "lumen",
  "side": "deposit",
  "route": "direct",
  "signer": "client",
  "walletId": "7c1e…",
  "walletAddress": "0x2f4B…",
  "chain": "gnosis",
  "chainId": 100,
  "assetAddress": "0xcB44…C56E",
  "amount": "50000000000000000000",
  "expectedAmount": "50000000000000000000",
  "fee": "0",
  "available": "120000000000000000000",
  "approvalAmount": "50000000000000000000",
  "reading": {
    "chain": "gnosis",
    "chainId": 100,
    "assetAddress": "0xcB44…C56E",
    "readable": true,
    "state": "active",
    "apy": 2.41,
    "apyBasisPoints": 241,
    "rateSource": "onchain",
    "observedAt": "2026-10-05T10:00:05.000Z",
    "fresh": true,
    "assetDecimals": 18
  }
}
```

`403` Not Offered

```json
{
  "statusCode": 403,
  "error": "ForbiddenError",
  "message": "This product is not offered on this network.",
  "details": { "code": "EARN_PRODUCT_OFF", "productId": "lumen" }
}
```

---

Web version: https://docs.aureahub.com/#earn-quote
