Skip to content

List All Assets

GET
/api/v1/assets
curl --request GET \
--url 'https://indepai.app/api/v1/assets?summary=false&type=stock&sort=value&order=asc' \
--header 'Authorization: Bearer <token>'

Get all assets in the authenticated user’s portfolio

summary
Any of:
boolean
type

Filter by asset type

string
Allowed values: stock etf crypto real_estate cash bond other
Example
etf
sort

Sort field

string
default: value
Allowed values: value name type date
Example
value
order

Sort order

string
default: desc
Allowed values: asc desc
Example
desc

List of assets

Media typeapplication/json
object
success
required
boolean
data
required
Array<object>
object
id
required

Asset ID

string format: uuid
userId
required

Owner user ID

string format: uuid
portfolioId
required

Owning portfolio ID

string | null format: uuid
name
required
string
assetType
required

Type of financial asset

string
Allowed values: stock etf crypto real_estate cash bond other
tickerSymbol
required
string | null
isin
required
string | null
quantity
required
number
purchasePrice
required
number
currentPrice
required
number | null
currentValue
required
number | null
valueEur
required
number | null
valueUsd
number | null
purchaseDate
required
string | null
currency
required
string
expenseRatio
required
number | null
geographicRegion
required
string | null
sector
required
string | null
address
string | null
city
string | null
countryCode
string | null
propertyValue
number | null
annualGrossRent
number | null
annualOperatingExpenses
number | null
mortgagePrincipal
number | null
mortgageRate
number | null
mortgageTermMonths
number | null
mortgageStartDate
string | null
mortgageType
string | null
Allowed values: fixed variable interest_only
downPayment
number | null
closingCosts
number | null
sellWillingnessTier

Willingness to sell this asset to fund living costs

string | null
Allowed values: gladly_sell sell_if_needed avoid_selling
bondFaceValue
number | null
bondFirstYearRate
number | null
bondMargin
number | null
bondRateType

How the bond’s coupon rate is determined after year 1

string | null
Allowed values: fixed cpi_plus_margin reference_plus_margin
bondCapitalization

How bond interest is capitalized or paid out

string | null
Allowed values: annual_compound annual_payout at_maturity
bondMaturityDate
string | null
bondSeries
string | null
bondEarlyRedemptionFee
number | null
marketQuote
object
price
required
number
> 0
currency
required
string
dailyChange
required
number | null
dailyChangePercent
required
number | null
asOf
required

Timestamp in ISO 8601 format

string | null format: date-time
source
required
string
status
required
string
Allowed values: fresh stale
categoryId
required

Unique identifier (UUID v4)

string format: uuid
categoryName
required
string
lastUpdated
required

Timestamp in ISO 8601 format

string | null format: date-time
createdAt
required

Timestamp in ISO 8601 format

string format: date-time
updatedAt
required

Timestamp in ISO 8601 format

string format: date-time
summary

Included when summary=true

object
totalValue
required

Total portfolio value in original currencies

number
totalValueEur
required

Total portfolio value in EUR

number
totalCost
required

Total cost basis

number
totalProfitLoss
required

Total profit/loss

number
totalProfitLossPercent
required

Total profit/loss percentage

number
assetCount
required

Number of assets in portfolio

integer
diversificationScore
required

Diversification score (0-100)

integer
<= 100
meta
required
object
count
required
integer
timestamp
required

Timestamp in ISO 8601 format

string format: date-time
Example
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"userId": "550e8400-e29b-41d4-a716-446655440000",
"portfolioId": "550e8400-e29b-41d4-a716-446655440000",
"assetType": "stock",
"mortgageType": "fixed",
"sellWillingnessTier": "gladly_sell",
"bondRateType": "fixed",
"bondCapitalization": "annual_compound",
"marketQuote": {
"asOf": "2024-01-15T10:30:00Z",
"status": "fresh"
},
"categoryId": "550e8400-e29b-41d4-a716-446655440000",
"lastUpdated": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"summary": {
"totalValue": 135000,
"totalValueEur": 135000,
"totalCost": 100000,
"totalProfitLoss": 35000,
"totalProfitLossPercent": 35,
"assetCount": 5,
"diversificationScore": 75
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
}
}

Unauthorized

Media typeapplication/json
object
success
required

Always false for error responses

boolean
error
required

Error type

string
code

Machine-readable error code

string
details

Detailed validation errors

Array<object>
object
path
required

Path to the invalid field

string
message
required

Error message

string
Example
{
"success": false,
"error": "Validation error",
"code": "VALIDATION_ERROR",
"details": [
{
"path": "currentAge",
"message": "Must be between 18 and 100"
}
]
}