Portfolio API
Endpoints for retrieving portfolio metrics, charts, and asset data.
Endpoints
Get Portfolio Line Graph
GET /getLineGraphValues
Retrieve historical portfolio value data for charting.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | User wallet address |
chainId | number | Yes | Chain ID |
timeframe | string | No | Time range (1D, 1W, 1M, 3M, 1Y, ALL) |
Get Portfolio Metrics
GET /getPortfolioMetrics
Retrieve portfolio overview metrics including total value and changes.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | User wallet address |
chainId | number | Yes | Chain ID |
Get Asset Table Data
GET /getAssetTableData
Retrieve a breakdown of all assets in the portfolio.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | User wallet address |
chainId | number | Yes | Chain ID |
Response Fields:
| Field | Type | Description |
|---|---|---|
token | string | Token name |
symbol | string | Token symbol |
balance | string | Token balance |
valueUSD | number | Value in USD |
price | number | Current price |
priceChange24h | number | 24h price change % |
Get Total Invested Value
GET /getTotalInvestedValue
Retrieve the total invested value for portfolio tracking.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | User wallet address |
chainId | number | Yes | Chain ID |
Get Token Invested Value
GET /getTokenInvestedValue
Retrieve invested value breakdown by individual token.
Get Allocation Data
GET /getAllocationData
Retrieve portfolio allocation percentages by asset.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | User wallet address |
chainId | number | Yes | Chain ID |