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

# Stable APY endpoints

> The stabilizer API, route by route.

The reference for the stabilizer. For what it does and when to use it, read [Stable APY](/products/stable-apy) first.

All routes live under `https://api.defindex.io/stabilizer/{vaultAddress}` and take an optional `?network=mainnet` query parameter. Authentication is the standard `Authorization: Bearer <api_key>` header used across the API.

<Info>
  Mainnet only, and enabled per account: every route below returns `403 Forbidden` until the feature is switched on for your API key. [Contact us on Discord](https://discord.gg/aV5jHwmsaj) to enable it.
</Info>

## The response shape

Every write endpoint returns an unsigned transaction for the `caller` you pass in the body:

```json theme={null}
{
  "xdr": "AAAAAg...",
  "simulationResponse": { },
  "functionName": "register_vault",
  "operationXDR": "AAAAEA...",
  "isSmartWallet": false
}
```

Sign `xdr` with the caller's key and submit it, either through your own RPC connection or through the API's `POST /send` endpoint, the same flow as any [Vault Operation](/integration-guide/vault-operations/index).

Smart wallet callers (C addresses) cannot sign a prebuilt transaction, so for them `xdr` comes back `null` and `isSmartWallet` is `true`. Build your own transaction around `operationXDR` instead.

## `GET /stabilizer/{vaultAddress}/status`

Read only snapshot of the vault's stabilizer state:

```json theme={null}
{
  "registered": true,
  "managedByStabilizer": true,
  "config": {
    "adminAddress": "G...",
    "targetApyBps": 800,
    "minFeeBps": 0,
    "maxFeeBps": 2000
  },
  "campaign": {
    "active": true,
    "asset": "C...",
    "totalDeposited": "1000000000",
    "totalBoosted": "42000000",
    "totalWithdrawn": "0",
    "available": "958000000",
    "lastBoostedAt": 1756400000
  },
  "currentFeeBps": 1250
}
```

`config` is `null` when the vault is not registered. `campaign` is `null` when the vault has no boost campaign. The two are independent: a vault can be registered without a campaign, and the other way around. Campaign amounts are in stroops of the campaign asset, and `lastBoostedAt` is unix seconds, `0` meaning never.

## `POST /stabilizer/{vaultAddress}/register`

```json theme={null}
{
  "caller": "G...",
  "targetApyBps": 800,
  "minFeeBps": 0,
  "maxFeeBps": 2000
}
```

`caller` must be the vault's **current Manager** and becomes the vault's stabilizer admin: the address that controls every setting below and the only one that can exit. The returned transaction both registers the vault and hands the Manager role to the stabilizer contract, so one signature covers the whole handoff.

All rates are basis points: `10000` is 100%, `800` is 8%. `minFeeBps` must be less than or equal to `maxFeeBps`.

`minFeeBps` is the floor the fee can never go below, including while a boost campaign is running. It is a commercial decision more than a technical one: see [what a boost costs](/products/stable-apy#what-a-boost-costs).

## `POST /stabilizer/{vaultAddress}/target-apy`

```json theme={null}
{ "caller": "G...", "targetApyBps": 650 }
```

Changes the target. `caller` must be the vault's stabilizer admin.

## `POST /stabilizer/{vaultAddress}/fee-bounds`

```json theme={null}
{ "caller": "G...", "minFeeBps": 0, "maxFeeBps": 1500 }
```

Changes the fee range the stabilizer may use. `caller` must be the vault's stabilizer admin, and `minFeeBps` must be less than or equal to `maxFeeBps`.

## `POST /stabilizer/{vaultAddress}/exit`

```json theme={null}
{ "caller": "G..." }
```

Unregisters the vault and returns the Manager role to the stabilizer admin. `caller` must be the vault's stabilizer admin.

## `POST /stabilizer/{vaultAddress}/boost/deposit`

```json theme={null}
{ "caller": "G...", "amount": "1000000000" }
```

Funds the vault's boost campaign. `amount` is stroops of the campaign asset, as a string. Anyone may fund an active campaign, not just the admin. Returns `404` if the vault has no campaign registered and `400` if the campaign is inactive.

## Errors

| Status | When                                                                                                                                                                     |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`  | The stabilizer is not available on the requested network, `minFeeBps` exceeds `maxFeeBps`, `amount` is not a positive integer string, or the boost campaign is inactive. |
| `403`  | The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (all other writes).                                   |
| `404`  | The vault is not registered with the stabilizer, or it has no boost campaign.                                                                                            |
