Api Endpoint

market2000.xyz

Portfolio Optimizer — Markowitz mean-variance optimization for a basket of assets. HOW TO CALL: POST /optimize_portfolio?tickers=AAPL,MSFT,NVDA,SPY&period=1y&objective=max_sharpe PARAMETERS: tickers — comma-separated list of 2–30 ticker symbols (required) period — historical window: '6mo' | '1y' (default) | '2y' | '3y' | '5y' objective — 'max_sharpe' (default) | 'min_volatility' | 'max_return' risk_free_rate — annual risk-free rate for Sharpe ratio (default: 0.04) RESPONSE FIELDS: allocation — {ticker: weight} dict, weights sum to 1.0 metrics — expected_annual_return, annual_volatility, sharpe_ratio benchmark_equal_weight — same metrics for a naive equal-weight portfolio correlation_matrix — pairwise return correlations Cached 6 hours per (tickers, period, objective). PRICING: $0.10 per call.

Open interactive test console

Offering

Provider
market2000.xyz
Method
POST
Offering type
Api Endpoint
Transport type
http
Category
Financial Analysis
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://market2000.xyz/optimize_portfolio
MIME type
application/json
First seen
2026-10-16T02:08:23.172Z
Last seen
Tags
None supplied

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.05 USDC
Atomic price: 50000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "50000",
    "payTo": "0x7a9Fa18dd9402F8d8C55Afbd59ED707BAc0e9cAf"
  }
]

Observed health

Status
Reachable
Latest latency
500 ms
Average latency
3519 ms
HTTP status
400
Last checked
Reachability
14.3% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "body": {},
  "type": "http",
  "method": "POST",
  "bodyType": "json",
  "queryParams": {
    "period": "1y",
    "tickers": "AAPL,MSFT,NVDA,SPY",
    "objective": "max_sharpe"
  }
}

Output schema

{
  "type": "json",
  "example": {
    "cached": false,
    "period": "1y",
    "metrics": {
      "sharpe_ratio": 1.402,
      "annual_volatility": 0.194,
      "expected_annual_return": 0.312
    },
    "objective": "max_sharpe",
    "allocation": {
      "SPY": 0.33,
      "AAPL": 0.54,
      "NVDA": 0.13
    },
    "fetched_at": "2026-06-07T10:00:00Z",
    "tickers_used": [
      "AAPL",
      "MSFT",
      "NVDA",
      "SPY"
    ],
    "risk_free_rate": 0.04,
    "benchmark_equal_weight": {
      "sharpe_ratio": 1.08,
      "annual_volatility": 0.213,
      "expected_annual_return": 0.271
    }
  }
}