# GBLIN Wallet Treasury Health Check

> GBLIN Wallet Treasury Health Check is a paid API for AI agents from gblin.digital, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Returns GBLIN/USDC/ETH balances, gas runway estimate, and rebalance recommendation for an agent wallet address

## Facts

- Endpoint: GET https://gblin.digital/api/x402/health
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gblin-digital-2685538c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qb3W0JSVfmVLVlFDace_k

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability gblin-digital-2685538c
```

Example prompt: Check the treasury health for my agent wallet 0x4a3b...c12f — I spend about $15 a day on average — tell me my GBLIN, USDC, and ETH balances, how much gas runway I have left, and whether I should rebalance.

## When to prefer this

Use this endpoint when an autonomous agent needs to assess the financial health of its own wallet before taking on-chain actions, especially when managing GBLIN protocol positions. Ideal for pre-flight checks before swaps, treasury top-ups, or gas-sensitive operations. Prefer this over generic balance APIs when you specifically need GBLIN-aware rebalance recommendations and gas runway computation.

## Known failure modes

- Missing or malformed wallet address returns 400 bad request
- Non-existent or zero-balance wallet may return empty balances with no rebalance signal
- Payment not included or insufficient (x402 flow) returns 402 Payment Required
- Network congestion or RPC issues may delay on-chain balance reads
- Invalid daily_burn format returns validation error

## How this service works

Wallet treasury health: GBLIN/USDC/ETH balances, gas runway, and rebalance recommendation. Critical for autonomous decision-making.

## Output

Returns the queried wallet's GBLIN, USDC, and ETH token balances, a computed gas runway (in days) based on optional daily burn rate, and a rebalance recommendation indicating whether holdings should be adjusted for optimal treasury management.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "wallet": "0x1234567890123456789012345678901234567890",
   "daily_burn": "20"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "wallet"
     ],
     "properties": {
      "wallet": {
       "type": "string",
       "description": "Agent 0x address"
      },
      "daily_burn": {
       "type": "string",
       "description": "Optional average daily USD spend, used to compute runway"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ratios": {
   "usdc_pct": 5.86,
   "gblin_pct": 87.02
  },
  "wallet": "0x0000000000000000000000000000000000000001",
  "balances": {
   "eth": "0.001234",
   "usdc": "3.500000",
   "gblin": "42.123456",
   "total_usd": 59.7438,
   "eth_value_usd": 4.2562,
   "gblin_value_usd": 51.987654
  },
  "cooldown": {
   "active": false,
   "last_deposit_unix": 1747500000,
   "seconds_remaining": 0
  },
  "gas_health": {
   "status": "sufficient",
   "warning": null,
   "eth_balance": "0.001234"
  },
  "recommendation": {
   "action": "hold",
   "reasoning": "Low burn rate ($1.5/day): maximize GBLIN exposure (90%) for treasury yield. JIT-swap on demand.",
   "runway_days": 2,
   "target_usdc_pct": 10,
   "target_gblin_pct": 90
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gblin-digital-2685538c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gblin.digital](https://www.zero.xyz/host/gblin.digital/llms.txt)
