# Sagitta Systems Portfolio Rebalance Engine

> Sagitta Systems Portfolio Rebalance Engine is a paid API for AI agents from selun.sagitta.systems, paid per call via x402, $1/call, status unknown (last checked 2026-09-15).

Computes target-vs-current allocation drift and required trade adjustments to rebalance a portfolio segment within policy constraints.

## Facts

- Endpoint: POST https://selun.sagitta.systems/agent/x402/rebalance
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/selun-sagitta-systems-be4292b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XZQzFHs5JhbBT4qQlCkZm

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 selun-sagitta-systems-be4292b7 -d '<json body>'
```

Example prompt: Check my Bluechip portfolio for drift and tell me what rebalancing trades are needed — I'm holding BTC at 50% ($25k), ETH at 30% ($15k), and USDC at 20% ($10k), with a Balanced risk tolerance and a 1-to-3-year timeframe.

## When to prefer this

Use this endpoint when you need to compute concrete rebalancing actions for a specific portfolio segment (Bluechips, Memecoins, Gaming, Yield Farm) with defined risk tolerance and timeframe constraints. Prefer this over generic allocation tools when you have actual current holdings with USD values and need policy-constrained drift analysis rather than just raw percentage differences. Best called after the market regime classifier and risk policy engine siblings have run.

## Known failure modes

- Missing required holdings array returns validation error
- Holdings array with fewer than 1 item rejected
- Invalid portfolioSegment or riskTolerance enum value returns 400
- Truncated response (_truncated: true) means full rebalancing detail was cut off — original size available in _originalSize
- Payment not processed results in x402 payment required error
- Network timeout on large portfolios

## How this service works

Portfolio rebalance engine. Call this after allocation or on a monitoring schedule with current holdings. Returns target-vs-current drift and the adjustments required to rebalance within policy constraints for the requested portfolio segment.

## Output

Returns the drift between current and target allocations across portfolio holdings, along with specific adjustment recommendations required to rebalance within the policy constraints for the requested portfolio segment (e.g. Bluechips). Note: the actual rebalancing payload can be large; the response schema indicates whether the result was truncated and the original response size.

## Example request

```json
{
 "holdings": [
  {
   "name": "Bitcoin",
   "asset": "BTC",
   "usdValue": 25000,
   "allocationPct": 50
  },
  {
   "name": "Ethereum",
   "asset": "ETH",
   "usdValue": 15000,
   "allocationPct": 30
  },
  {
   "name": "USD Coin",
   "asset": "USDC",
   "usdValue": 10000,
   "allocationPct": 20
  }
 ],
 "timeframe": "1-3_years",
 "decisionId": "test-rebal-001",
 "riskTolerance": "Balanced",
 "portfolioSegment": "Bluechips"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "holdings": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "asset",
     "usdValue"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "asset": {
      "type": "string"
     },
     "usdValue": {
      "type": "number"
     },
     "allocationPct": {
      "type": "number"
     }
    }
   },
   "minItems": 1
  },
  "timeframe": {
   "enum": [
    "<1_year",
    "1-3_years",
    "3+_years"
   ]
  },
  "decisionId": {
   "type": "string"
  },
  "riskTolerance": {
   "enum": [
    "Conservative",
    "Balanced",
    "Growth",
    "Aggressive"
   ]
  },
  "portfolioSegment": {
   "enum": [
    "Bluechips",
    "Memecoins",
    "Gaming",
    "Yield Farm"
   ]
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "result": {
    "recommendations": [
     {
      "asset": "BTC",
      "action": "reduce",
      "targetAllocationPct": 36,
      "currentAllocationPct": 43
     }
    ],
    "currentPortfolioUsd": 10000
   },
   "status": "completed",
   "endpoint": "/agent/x402/rebalance",
   "productId": "rebalance",
   "decisionId": "rebalance-001"
  },
  "success": true,
  "executionModelVersion": "Selun-1.0.0"
 }
}
```

## More

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