Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt

Use this file to discover all available pages before exploring further.

DTF Endpoints

A Dex Traded Fund (DTF) is a basket of assets with a price. These endpoints tell you what that price is, what it was, and what the basket contains. The rest is your decision.

Get DTF Price / NAV

itp_id
string
required
The on-chain DTF identifier (hex address, e.g., 0x...).
Returns the current NAV per share, priced asset count, and AUM. Tries the data node first; falls back to on-chain if needed.
curl "https://generalmarket.io/api/itp-price?itp_id=0x1234abcd..."
FieldTypeDescription
itp_idstringDTF identifier
navstringNAV per share in wei (18 decimals)
nav_displaynumberHuman-readable NAV per share in USD
assets_pricednumberNumber of assets with available price data
assets_totalnumberTotal number of assets in the DTF basket
aum_usdnumberTotal assets under management in USD
total_supplystringTotal DTF shares outstanding in wei
NAV is computed as sum(qty[i] * price[i]) / 1e18 where quantities are the fixed per-share amounts stored on-chain. See the pricing model documentation for details.
Dual-source resolution — the API trusts no single source:
  Request: GET /api/itp-price?itp_id=0x...

  1. Try data-node first (has live API prices, more accurate NAV)
     GET DATA_NODE:8200/itp-price?itp_id=0x...
         |
         +-- success + nav != 0 --> return { source: "data-node", ... }
         |
         +-- fail / nav == 0 ----> fall through

  2. Fallback: read NAV from on-chain Index contract
     eth_call to Index.getITPState(bytes32)
         |
         +-- decode ABI: skip creator, read totalSupply, NAV
         +-- count assets from dynamic array
         +-- return { source: "onchain", ... }

  The "source" field in the response indicates which path was used.

Get NAV Time Series

itp_id
string
required
The on-chain DTF identifier.
range
string
required
Time range for the series. One of: 1d, 7d, 30d, 90d, 1y.
NAV over time. The chart tells the story. The numbers are the evidence.
curl "https://generalmarket.io/api/nav-series?itp_id=0x1234abcd...&range=7d"
FieldTypeDescription
timestampnumberUnix timestamp of the data point
navnumberNAV per share at that point in time

Get AUM Ranking

All DTFs, ranked by AUM. The market votes with capital.
curl "https://generalmarket.io/api/aum-ranking"
FieldTypeDescription
itp_idstringDTF identifier
namestringHuman-readable DTF name
symbolstringDTF ticker symbol
nav_per_sharenumberCurrent NAV per share in USD
aum_usdnumberTotal assets under management in USD
total_supplystringTotal shares outstanding in wei
asset_countnumberNumber of assets in the basket

Get Snapshot

The current state of a DTF — or all of them. Weights, quantities, NAV, supply.
itp_id
string
Optional. When provided, the endpoint returns the snapshot for only the specified DTF.
# All DTFs
curl "https://generalmarket.io/api/snapshot"

# Specific DTF
curl "https://generalmarket.io/api/snapshot?itp_id=0x1234abcd..."

Get DTF Enrichment

Beyond prices: who founded the projects in this basket, how much venture money they raised, what their TVL looks like, and how the market values them. Four upstream sources, aggregated into one response.
GET /api/itp-enrichment?itp_id={itp_id}
itp_id
string
required
The on-chain DTF identifier (66-character hex string: 0x + 64 hex chars).
  Data aggregation pipeline:

  +-------------------+     +------------------+     +------------------+
  | Data Node         |     | CoinGecko API    |     | DeFiLlama API    |
  | /snapshot?itp_id= |     | /simple/price    |     | /protocols       |
  +--------+----------+     +--------+---------+     | /raises          |
           |                         |                +--------+---------+
           v                         v                         |
      raw holdings             market data                     v
      (symbol, weight,        (price, mcap,              TVL + funding
       price, name)            24h change)               round data
           |                         |                         |
           +------------+------------+-------------------------+
                        |
                        v
              +---------+----------+
              | Founders Lookup    |
              | (local JSON file)  |
              | age, gender,       |
              | nationality, uni   |
              +--------+-----------+
                       |
                       v
              Combined enrichment response
curl "https://generalmarket.io/api/itp-enrichment?itp_id=0x1234abcd..."
Holdings fields:
FieldTypeDescription
symbolstringAsset ticker
weightnumberPortfolio weight (0-1)
pricenumberLatest price in USD
namestringHuman-readable name
imagestringCoinGecko image URL
coingecko_idstringCoinGecko identifier
market_capnumberMarket capitalization in USD
change_24hnumber24-hour price change (%)
Founders aggregate (present when founder data exists for holdings):
FieldTypeDescription
total_foundersnumberTotal founders matched
total_companies_matchednumberHoldings with founder data
age_distributionarrayAge buckets: 20-29, 30-39, 40-49, 50-59, 60+
gender_splitarrayGender distribution
top_nationalitiesarrayTop 12 nationalities by count
top_universitiesarrayTop 10 universities by count
DeFi aggregate (present when holdings have DeFiLlama protocol data):
FieldTypeDescription
total_tvlnumberCombined TVL of matched protocols
avg_tvl_change_7dnumberAverage 7-day TVL change (%)
protocols_with_datanumberHoldings with DeFiLlama data
top_by_tvlarrayTop 10 protocols by TVL
Funding aggregate (present when holdings have DeFiLlama raise data):
FieldTypeDescription
total_raised_mnumberTotal raised in millions USD
avg_valuation_mnumberAverage valuation in millions USD
total_roundsnumberTotal funding rounds
top_investorsarrayTop 10 investors by deal count
recent_raisesarray10 most recent raises
StatusMeaning
200Enrichment data returned (cached 5 min when holdings present)
400Invalid itp_id format
500Enrichment computation failed
Enrichment results are cached at the CDN for 5 minutes when meaningful data is available. Empty results (no holdings found) are not cached.