# Get a deposit address

> Get a policy-gated account deposit address.

`GET /v1/agent-api/accounts/{id}/deposit-address`

## Path parameters

| Field | Type   | Required | Description |
| ----- | ------ | -------- | ----------- |
| `id`  | string | Yes      |             |

## Query parameters

| Field     | Type                | Required | Description |
| --------- | ------------------- | -------- | ----------- |
| `network` | `"base"` \| `"arc"` | Yes      |             |
| `asset`   | string              | Yes      |             |

## Responses

| Status | Description                                                                                                                                                                                                                                                                                                                                   |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200`  | Account deposit address                                                                                                                                                                                                                                                                                                                       |
| `400`  | Missing or unsupported network or asset                                                                                                                                                                                                                                                                                                       |
| `403`  | Account not accessible under this policy                                                                                                                                                                                                                                                                                                      |
| `404`  | Readable account not found                                                                                                                                                                                                                                                                                                                    |
| `409`  | Catena has closed the network to new work (`onchain_network_closed`), including addresses already issued on it. The closure has no known end and sends no `Retry-After`: do not retry on this network. `details.network` names it, and `details.alternatives` lists the account's open networks to ask for instead, empty when there are none |
| `503`  | Banking services are temporarily unavailable (`temporarily_unavailable`, with the service in `details`), or the banking provider did not answer (`temporarily_unavailable` without `details`). An address already created is still returned; send the request again after the `Retry-After` seconds                                           |

## Response fields

| Field                  | Type                          | Required | Description |
| ---------------------- | ----------------------------- | -------- | ----------- |
| `accountId`            | string                        | Yes      |             |
| `address`              | string                        | Yes      |             |
| `liquidationAddressId` | string                        |          |             |
| `source`               | `"wallet"` \| `"liquidation"` | Yes      |             |

## Example

### SDK

```ts
import { createCatenaClient } from "@catena/sdk"

// Reads CATENA_SECRET_KEY
const client = createCatenaClient()

const deposit = await client.getAccountDepositAddress(
  "acct_01JC2Y6ZQ8R4M7N9P3S5T6V8WX",
  {
    network: "base",
    asset: "usdc",
  },
)
```

### CLI

```sh
catena accounts deposit-address acct_01JC2Y6ZQ8R4M7N9P3S5T6V8WX \
  --network base --asset usdc
```

### Response `200`

```json
{
  "accountId": "acct_01JC2Y6ZQ8R4M7N9P3S5T6V8WX",
  "address": "0x4b5a9c8d7e6f3a2b1c0d9e8f7a6b5c4d3e2f1a0b",
  "source": "wallet"
}
```
