← 智能数据整合

投资组合分析

GET /mashup/portfolio/analyze

在单次请求中分析混合资产组合(加密货币、法定货币和商品)。提供逗号分隔的资产标识符列表,获取当前价值、绩效指标、相关性数据和多元化分析。支持加密货币 ID(bitcoin、ethereum)、法定货币代码(EUR、NOK)和黄金。适用于投资组合追踪仪表板、投资分析工具和跨多种资产类别的财富管理平台。

参数

资产 必填

Comma-separated asset IDs (e.g., bitcoin,ethereum,EUR,gold)

base 可选 默认: USD

Base currency for valuation

请求示例

基本用法
curl "https://nordapi.ee/api/v1/mashup/portfolio/analyze?assets=bitcoin,ethereum,EUR,gold"
Analyze a mixed crypto and fiat portfolio
curl "https://nordapi.ee/api/v1/mashup/portfolio/analyze?assets=bitcoin,ethereum,EUR,gold"
Analyze crypto portfolio in EUR
curl "https://nordapi.ee/api/v1/mashup/portfolio/analyze?assets=bitcoin,ethereum,solana&base=EUR"
Analyze Nordic currency basket
curl "https://nordapi.ee/api/v1/mashup/portfolio/analyze?assets=NOK,SEK,DKK&base=USD"

实时响应

{
  "analysis": {
    "asset_class_mix": "2 crypto, 1 commodity, 1 fiat",
    "recommendation": "Good asset class diversification across crypto, commodities, and fiat"
  },
  "asset_count": 4,
  "assets": [
    {
      "change_24h": 0.5283,
      "change_7d": 2.0292,
      "id": "bitcoin",
      "market_cap": 1349982371824.0,
      "name": "Bitcoin",
      "price_usd": 67630.0,
      "symbol": "BTC",
      "type": "crypto"
    },
    {
      "change_24h": 0.3919,
      "change_7d": 3.8933,
      "id": "ethereum",
      "market_cap": 249271525270.0,
      "name": "Ethereum",
      "price_usd": 2071.46,
      "symbol": "ETH",
      "type": "crypto"
    },
    {
      "id": "EUR",
      "name": "EUR",
      "rate_vs_base": 0.86767896,
      "type": "fiat",
      "volatility_30d": 0.35936938373961186
    },
    {
      "id": "gold",
      "name": "Gold (Troy Ounce)",
      "price_usd": 3045.0,
      "type": "commodity",
      "unit": "troy_oz"
    }
  ],
  "base_currency": "USD",
  "composition": {
    "commodity": 1,
    "crypto": 2,
    "fiat": 1
  },
  "diversification_grade": "C",
  "geographic_regions": 1,
  "inflation_context": {
    "us_inflation": 2.9495,
    "year": 2024
  },
  "success": true
}