# The Most a Wallet Can Send

For one of your own wallets: how much of an asset it can send at a fee level.

## Overview

- `asset`: `native` (the default), or a token's address — an SPL mint on Solana. `level`: `LOW`, `MEDIUM` (the default) or `HIGH` ([Estimate Fees](https://docs.aureahub.com/docs/fees-estimate.md)).
- The native coin: `maxSpendable` is its balance minus `fee`, never below zero. A token: its whole balance, and `feeCovered` says whether the native balance pays the fee. Amounts in the smallest unit; `fee` is in the native coin's, the most it can cost on EVM.
- Your own wallets only: another's, or one that doesn't exist, answers `404` `WALLET_NOT_FOUND` (`Wallet not found`). An asset that is neither `native` nor a token address of the wallet's chain: `400` `FEE_ASSET_INVALID`. A chain your tenant doesn't have: `404` `FEE_CHAIN_NOT_CONFIGURED`; a node that doesn't answer: `502` `FEE_ESTIMATE_UNAVAILABLE`.
- At most 60 calls a minute.

## Endpoint

### `GET /v1/wallets/{id}/max-spendable`

Authentication: bearer token required.

The most one of the caller's wallets can send of an asset at a fee level.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The wallet's id |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `asset` | string | no | `native` (default) or a token address |
| `level` | string | no | `LOW`, `MEDIUM` (default) or `HIGH` |

**Responses**

`200` OK

```json
{
  "walletId": "7c1e9b24-3f5a-4d8e-9b6c-1a2f3e4d5c6b",
  "chain": "base",
  "chainId": 8453,
  "isTestnet": false,
  "asset": "native",
  "level": "MEDIUM",
  "balance": "2500000000000000",
  "nativeBalance": "2500000000000000",
  "fee": "220500000000",
  "feeCovered": true,
  "maxSpendable": "2499779500000000"
}
```

`400` Asset

```json
{
  "statusCode": 400,
  "error": "BadRequestError",
  "message": "asset is \"native\" or a token address of the wallet's chain",
  "details": { "code": "FEE_ASSET_INVALID" }
}
```

---

Web version: https://docs.aureahub.com/#wallet-max-spendable
