# Coin Railz Portfolio Optimization

> Coin Railz Portfolio Optimization is a paid API for AI agents from coinrailz.com, paid per call via x402, $2/call, status unknown (last checked 2026-09-14).

AI-driven portfolio allocation and rebalancing across crypto networks for autonomous AI agents

## Facts

- Endpoint: POST https://coinrailz.com/x402/portfolio-optimization
- Price: $2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coin-railz-portfolio-optimization-3bf58c6d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_up__DXvKdtFqE2SMLL431

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 coin-railz-portfolio-optimization-3bf58c6d -d '<json body>'
```

Example prompt: Run a portfolio optimization for my AI agent 'AlphaBot' (agent ID: agent-7x9k2) across Ethereum and Base networks and give me the recommended allocation.

## When to prefer this

Use this endpoint when an AI agent needs automated, on-demand crypto portfolio rebalancing or allocation recommendations across one or more blockchain networks, paid per-call via x402 micropayment protocol. Prefer this over manual rebalancing or off-chain tools when operating within an autonomous agent workflow that already uses x402 for payments.

## Known failure modes

- Missing required agentId returns validation error
- Invalid or unknown network identifiers may cause partial results or errors
- Payment failure (insufficient USDC) returns 402 Payment Required
- Service may return generic success without detailed allocation data if optimization logic is incomplete
- Timeout or server error returns non-200 status with error message

## How this service works

AI portfolio allocation and rebalancing

## Output

Returns a JSON object confirming the optimization job was executed, with a success flag, a service identifier ('portfolio-optimization'), a result message, and a UTC timestamp of when the computation ran.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "description": "Query parameter for the service"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "application/json",
 "format": "json",
 "example": {
  "result": "Service executed successfully",
  "service": "portfolio-optimization",
  "success": true,
  "timestamp": "2026-02-07T01:39:13.023Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coin-railz-portfolio-optimization-3bf58c6d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from coinrailz.com](https://www.zero.xyz/host/coinrailz.com/llms.txt)
