Skip to main content
GET
/
portfolio
/
value
Get detailed information about portfolio profit/loss
curl --request GET \
  --url https://openapiv1.coinstats.app/portfolio/value \
  --header 'X-API-KEY: <api-key>'
{
  "totalValue": 12500.75,
  "defiValue": 2500.25,
  "totalCost": 10000.5,
  "unrealizedProfitLoss": 1250.75,
  "unrealizedProfitLossPercent": 12.5,
  "realizedProfitLoss": 500.25,
  "realizedProfitLossPercent": 5,
  "allTimeProfitLoss": 1751,
  "allTimeProfitLossPercent": 17.5
}
10 credits per request
  • Total value of portfolio
  • Defi value of portfolio
  • Total cost of portfolio
  • Unrealized profit/loss
  • Realized profit/loss
  • All time profit/loss
This endpoint is only available for users with a Degen plan subscription.
  • shareToken: Get this from your CoinStats portfolio page by clicking “Share” and copying the token from the share URL
  • currency: Specify the currency for price values, default is USD
  • passcode: Passcode for accessing protected portfolio data (can be passed in header or query parameter)

Authorizations

X-API-KEY
string
header
required

API key needed to access the endpoints. Example: 'demo-api-key'

Headers

passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Query Parameters

shareToken
string
required
currency
string
default:USD

Currency for price values. Default is USD.

Example:

"USD"

passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Response

Portfolio profit/loss

unrealizedProfitLossPercent
number
required

Unrealized profit/loss percentage

Example:

12.5

realizedProfitLossPercent
number
required

Realized profit/loss percentage

Example:

5

allTimeProfitLossPercent
number
required

All Time profit/loss percentage

Example:

17.5

totalValue
number

Total value of portfolio

Example:

12500.75

defiValue
number

DeFi value of portfolio

Example:

2500.25

totalCost
number

Total cost of portfolio

Example:

10000.5

unrealizedProfitLoss
number

Unrealized profit/loss

Example:

1250.75

realizedProfitLoss
number

Realized profit/loss

Example:

500.25

allTimeProfitLoss
number

All Time profit/loss

Example:

1751

I