portfolIQ
Documentation

Quickstart

Make your first API call in 5 minutes.

Quickstart

Get up and running with the portfolIQ API in 5 minutes.

Step 1 — Get your API key

Create a free account on the pricing page. Your API key is generated automatically — no credit card required for the Free tier.

Step 2 — List assets

curl "https://api.portfoliq.io/v1/assets?limit=5" \
  -H "X-API-Key: YOUR_API_KEY"

Example response:

{
  "data": [
    {
      "coingecko_id": "bitcoin",
      "ticker": "BTC",
      "name": "Bitcoin",
      "tier": 1,
      "price_usd": 67432.50,
      "market_cap_usd": 1325000000000,
      "change_24h_pct": -0.52,
      "last_updated": "2026-05-19"
    }
  ],
  "meta": {
    "version": "0.1.0",
    "total": 50,
    "has_next": true,
    "freshness_ts": "2026-05-19T00:00:00Z",
    "disclaimer": "Not financial advice. Methodology disclosed."
  }
}

Note: The {id} path parameter in all routes refers to coingecko_id (e.g., bitcoin, ethereum) — not the ticker symbol (BTC). See Asset identifiers.

Step 3 — Get AI analysis for an asset

Requires Starter tier or above (ai:read scope).

curl "https://api.portfoliq.io/v1/assets/bitcoin/ai" \
  -H "X-API-Key: YOUR_API_KEY"

Example response:

{
  "data": {
    "analysis_type": "fundamental_summary",
    "summary": "Bitcoin is the largest proof-of-work network...",
    "generated_at": "2026-05-19T07:00:00Z",
    "model": "claude-haiku-4-5",
    "prompt_version": "fundamental_summary_v1.2",
    "sentiment_score": null
  },
  "meta": {
    "version": "0.1.0",
    "freshness_ts": "2026-05-19T07:00:00Z",
    "disclaimer": "Not financial advice. AI-generated analysis. Methodology disclosed."
  }
}

Pagination

All list endpoints (/v1/assets) support offset and limit query parameters.

Parameters:

  • limit (default: 20, max: 100) — number of items per page
  • offset (default: 0) — number of items to skip

Response fields:

  • total — total number of matching assets
  • has_nexttrue if there are more items beyond the current page
  • limit — the limit applied to this response

Example — fetch all Tier 1 assets:

# First page
curl "https://api.portfoliq.io/v1/assets?limit=20&offset=0&tier=1" \
  -H "X-API-Key: YOUR_KEY"

# Second page
curl "https://api.portfoliq.io/v1/assets?limit=20&offset=20&tier=1" \
  -H "X-API-Key: YOUR_KEY"

Example — Python loop over all assets:

offset = 0
limit = 100
all_assets = []

while True:
    resp = client.assets.list_assets(limit=limit, offset=offset)
    all_assets.extend(resp.data)
    if not resp.meta.get("has_next"):
        break
    offset += limit

Step 4 — What's next?

Not financial advice. Not a fatwa. Methodology disclosed.