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

# Bridge Health

> [Alpha Preview] Live health of the bridge solver: overall state, fill and refund activity, and solver load.

> [!WARNING]
>
> **Alpha Preview** — Endpoints and response shape may change without notice.

`GET /api/2/bridge/health` returns the bridge's current health: whether fills are going out, how long they take, and how loaded the solver is. Use it for a status page, or to pause quoting when the bridge is paused or down. No query parameters.

The solver publishes this data every 5 seconds, so two calls within that window return the same snapshot.

## Response

```json theme={null}
{
  "data": {
    "state": "operational",
    "shedding": false,
    "killswitchActive": false,
    "fills": {
      "pending": 3,
      "oldestPendingSec": 21,
      "lastMinute": 14,
      "latencyMs": { "p50": 380, "p90": 1270 }
    },
    "refunds": { "pending": 0, "lastMinute": 0 },
    "pods": [
      { "pod": "bridge-solver-659cd59dff-zb5ph", "leader": true, "cpuCores": 0.42, "eventLoopUtilization": 0.38, "rssMB": 1310, "heapUsedMB": 610, "uptimeSec": 5400, "ageSec": 3 },
      { "pod": "bridge-solver-659cd59dff-j8pbg", "leader": false, "cpuCores": 0.05, "eventLoopUtilization": 0.04, "rssMB": 980, "heapUsedMB": 420, "uptimeSec": 5390, "ageSec": 1 }
    ],
    "updatedAt": 1792794302465
  }
}
```

## State

| `state` | Meaning |
| - | - |
| `operational` | One solver replica holds the leader lease, it is publishing activity, and its main thread has headroom. |
| `degraded` | Fills may be slow. Either the solver is shedding load (`shedding`), no replica holds the lease, two replicas both claim it, the leader isn't publishing activity, or the leader's main thread is saturated (`eventLoopUtilization` ≥ 0.9). |
| `paused` | The treasury killswitch is tripped. No fills, refunds or rebalances go out until it is reset. |
| `down` | No solver replica has reported in the last 30 seconds. |

## Fields

* `shedding` — the solver leader is saturated by incoming deposits, so cross-chain quotes return `503` ("Bridge temporarily at capacity") until it recovers, usually within a few minutes. Deposits already made are still filled. Same-chain swaps are not affected.
* `killswitchActive` — the treasury killswitch. `null` when the leader isn't publishing activity.
* `fills` — `null` when the leader isn't publishing activity.
  * `pending` — intents in `filling` or `retrying`, created in the last 24 hours.
  * `oldestPendingSec` — age of the oldest of those, or `null` when nothing is pending.
  * `lastMinute` — fills confirmed in the last minute.
  * `latencyMs.p50` / `latencyMs.p90` — time from deposit detection to fill, over fills confirmed in the last 10 minutes. `null` when there were none. A retried fill counts its full wait, so a recovery after an incident shows up here.
* `refunds` — `null` when the leader isn't publishing activity.
  * `pending` — intents in `refunding`, created in the last 24 hours.
  * `lastMinute` — refunds completed in the last minute.
* `pods` — every solver replica that reported in the last 30 seconds, leader first.
  * `leader` — held the leader lease when its snapshot was taken. Only the leader moves funds.
  * `cpuCores` — CPU used over the last 5 seconds, in cores (1 = one full core).
  * `eventLoopUtilization` — share of the last 5 seconds the main thread was busy (1 = saturated).
  * `rssMB` / `heapUsedMB` — process memory.
  * `uptimeSec` — process uptime.
  * `ageSec` — age of the snapshot.
* `updatedAt` — epoch ms the leader computed `fills` and `refunds`, or `null`.

## Reading it

* A climbing `fills.pending` with a growing `oldestPendingSec` while `fills.lastMinute` drops means fills are stalling, even if `state` is still `operational`.
* `degraded` because of a saturated leader often clears within seconds. Treat it as a signal to watch, not an outage.
* Status for a single intent is at [`/2/bridge/status/{id}`](https://docs.mobula.io/rest-api-reference/endpoint/bridge-status).


## OpenAPI

````yaml get /2/bridge/health
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula API
  description: >-
    Documentation of the Mobula API


    **Demo API**: The default server (demo-api.mobula.io) is a demo API with
    rate limits.

    For production use, please use api.mobula.io with an API key from
    https://admin.mobula.io
servers:
  - url: https://demo-api.mobula.io/api/
    description: Demo API (rate limited, for testing only)
  - url: https://api.mobula.io/api/
    description: Production API (requires API key)
security: []
tags:
  - name: V2 - Token
    description: Token details, price, security, ATH, and holder data
  - name: V2 - Market Data
    description: Market details, OHLCV history, and lighthouse metrics
  - name: V2 - Trades
    description: Token trades, enriched trades, and trade filters
  - name: V2 - Wallet
    description: Wallet positions, activity, trades, analysis, and labels
  - name: V2 - Assets
    description: Cross-chain asset details and price history
  - name: V2 - Swap
    description: Swap quoting and execution
  - name: V2 - Perps
    description: Perpetual futures quoting, execution, and positions
  - name: V2 - Bridge
    description: Cross-chain bridge quoting and intent status (Alpha Preview)
  - name: V2 - DeFi
    description: Bonding pools and pulse data
  - name: V2 - Search
    description: Universal fast search
  - name: V2 - Usage
    description: Per-key API and WebSocket usage history
  - name: V2 - Blockchains
    description: System metadata and chain listings
  - name: V2 - Prediction Markets
    description: >-
      Polymarket markets/events, wallet positions, and the full execution stack
      (auth, order build/submit/cancel, approvals, pUSD wrap/unwrap, deploy,
      deposit/withdraw, redeem). Alpha — see /api/2/pm/*.
  - name: V1 - Market Data
    description: Market prices, history, sparklines, pairs, and multi-data
  - name: V1 - Wallet
    description: Wallet portfolio, transactions, history, and NFTs
  - name: V1 - Token
    description: First buyers
  - name: V1 - Trades
    description: Market trades by pair
  - name: V1 - Metadata
    description: Token metadata, categories, and news
  - name: V1 - Assets
    description: List all assets
  - name: V1 - Search
    description: Search for assets, tokens, and pairs
  - name: V1 - DeFi
    description: Bonding pool pulse data
  - name: V1 - Blockchains
    description: Blockchain listings, pairs, and stats
  - name: V1 - Webhooks
    description: Webhook management
  - name: V1 - Feed
    description: Custom feed creation
paths:
  /2/bridge/health:
    get:
      tags:
        - V2 - Bridge
      summary: Get bridge health
      description: >-
        [Alpha Preview] Live health of the bridge solver: an overall state, fill
        and refund activity, and each solver replica's load. Refreshed every 5
        seconds.
      responses:
        '200':
          description: Bridge health.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - operational
                          - degraded
                          - paused
                          - down
                        description: >-
                          paused: the treasury killswitch stopped every fund
                          movement. down: no solver replica reported in the last
                          30s. degraded: the solver is shedding load, there is
                          no single leader, the leader publishes no activity, or
                          the leader is saturated (event-loop utilization >=
                          0.9).
                      shedding:
                        type: boolean
                        description: >-
                          True while the solver leader is saturated by incoming
                          deposits: cross-chain quotes return 503 until it
                          recovers. Deposits already made are still filled.
                      killswitchActive:
                        type: boolean
                        nullable: true
                        description: Null while the leader publishes no activity.
                      fills:
                        type: object
                        nullable: true
                        properties:
                          pending:
                            type: number
                            description: >-
                              Intents in filling or retrying, created in the
                              last 24h.
                          oldestPendingSec:
                            type: number
                            nullable: true
                            description: Age of the oldest pending intent.
                          lastMinute:
                            type: number
                            description: Fills confirmed in the last minute.
                          latencyMs:
                            type: object
                            properties:
                              p50:
                                type: number
                                nullable: true
                              p90:
                                type: number
                                nullable: true
                            required:
                              - p50
                              - p90
                            description: >-
                              Deposit detection to fill, over fills confirmed in
                              the last 10 minutes.
                        required:
                          - pending
                          - oldestPendingSec
                          - lastMinute
                          - latencyMs
                      refunds:
                        type: object
                        nullable: true
                        properties:
                          pending:
                            type: number
                            description: Intents in refunding, created in the last 24h.
                          lastMinute:
                            type: number
                            description: Refunds completed in the last minute.
                        required:
                          - pending
                          - lastMinute
                      pods:
                        type: array
                        items:
                          type: object
                          properties:
                            pod:
                              type: string
                            leader:
                              type: boolean
                              description: >-
                                Held the leader lease when the snapshot was
                                taken.
                            cpuCores:
                              type: number
                              description: CPU used over the last 5s, in cores.
                            eventLoopUtilization:
                              type: number
                              description: >-
                                Share of the last 5s the main thread was busy (1
                                = saturated).
                            rssMB:
                              type: number
                            heapUsedMB:
                              type: number
                            uptimeSec:
                              type: number
                            ageSec:
                              type: number
                              description: Age of the snapshot.
                          required:
                            - pod
                            - leader
                            - cpuCores
                            - eventLoopUtilization
                            - rssMB
                            - heapUsedMB
                            - uptimeSec
                            - ageSec
                        description: >-
                          Solver replicas that reported in the last 30s, leader
                          first.
                      updatedAt:
                        type: number
                        nullable: true
                        description: Epoch ms the leader computed fills and refunds.
                    required:
                      - state
                      - shedding
                      - killswitchActive
                      - fills
                      - refunds
                      - pods
                      - updatedAt
                required:
                  - data

````

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