GET
/
portfolio
/
value
cURL
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
Get detailed information about portfolio profit/loss, including:
  • Total value of portfolio
  • Defi value of portfolio
  • Total cost of portfolio
  • Unrealized profit/loss
  • Realized profit/loss
  • All time profit/loss
Required:
  • shareToken: Get this from your CoinStats portfolio page by clicking “Share” and copying the token from the share URL
Optional Parameters:
  • currency: Specify the currency for price values, default is USD
Note: This endpoint is only available for users with a Degen plan subscription.

Authorizations

X-API-KEY
string
header
required

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

Query Parameters

shareToken
string
required

<b>To access your Share Token</b> Visit <a target='_blank' href='https://coinstats.app/portfolio'>CoinStats Portfolio</a> and make sure you are signed in to your account. In the top-right corner of the page, click on the Share button. This will bring up sharing preferences for your portfolio. Generate a Share Link. In the generated URL, the segment following <code>/p/</code> (e.g., <code>XXX</code>) is your share token. Copy only that token (without additional slashes or characters). Use the Token in the API

currency
string
default:USD

Currency for price values. Default is USD.

Example:

"USD"

passcode
string

Optional passcode for accessing protected portfolio data

Example:

"123456"

Response

200
application/json

Portfolio

The response is of type object.