Discovery and markets API

What crypto does this public company or government hold, and what did it pay?

One public company or government treasury by id, name or ticker: coins held, value, cost, unrealized P&L, mNAV, and its 100 most recent buys and sells with price paid.

GET/api/external/discovery/treasury-entity/{id}

What it returns

One public company or government that holds crypto on its balance sheet (e.g. strategy, bhutan), by id, name or stock ticker (MSTR, MSTR.US) in any case: each coin it holds with the amount, its value now, what it cost and the unrealized profit or loss, the whole treasury's value, and its 100 most recent reported buys and sells, newest first, each with the price paid and the holding after it. Governments rarely disclose a cost, so their cost, profit and trade values are null, never 0. A subject that names no entity returns 404.

Chains

This endpoint is not tied to a chain: it takes no chain in its request.

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/discovery/treasury-entity/<id>"
Parameters
ParameterDescription
id

path · string · required

A public company or government that holds crypto, by id (e.g. "strategy", "bhutan"), by name (e.g. "Strategy") or by stock ticker (e.g. "MSTR" or "MSTR.US"), in any case — not a wallet, token mint or contract address.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of What crypto does this public company or government hold, and what did it pay?
FieldTypeDescription
idstringThe entity's id, whatever id, name or ticker was asked for.
namestringDisplay name.
typestringA public company or a government.
symbolstring | nullStock ticker with its exchange suffix, e.g. MSTR.US. Null for a government.
countrystring | nullTwo-letter country code, e.g. US.
websiteUrlstring | nullOfficial website.
twitterHandlestring | nullX (Twitter) handle, without the @.
treasuryValueUsdnumber | nullWhat all its crypto is worth now, in USD.
unrealizedPnlUsdnumber | nullTreasury value minus total cost, in USD. Null when the cost is not disclosed.
mNavnumber | nullMarket cap over the crypto's value (0.95 = the stock trades at 95% of its crypto). Null for a government.
assetValuePerShareUsdnumber | nullCrypto value per share, in USD. Null for a government.
holdingsobject[]Each coin held, as the source lists them.
holdings[].coinIdstringThe coin held, by coin id, e.g. bitcoin, ethereum.
holdings[].amountnumberCoins held.
holdings[].percentOfSupplynumber | nullShare of the coin's total supply held, in percent (4.03 = 4.03%).
holdings[].amountPerSharenumber | nullCoins held per share of the company. Null for a government.
holdings[].valueUsdnumber | nullWhat the holding is worth now, in USD.
holdings[].percentOfTreasurynumber | nullThis coin's share of the whole treasury's value, in percent.
holdings[].costBasisUsdnumber | nullWhat the holding cost in total, in USD. Null when the cost is not disclosed.
holdings[].averageCostUsdnumber | nullAverage cost per coin, in USD. Null when the cost is not disclosed.
holdings[].unrealizedPnlUsdnumber | nullValue now minus cost, in USD; negative is a loss. Null when the cost is not disclosed.
transactionsobject[]The 100 most recent reported buys and sells, newest first. Can be empty.
transactions[].dateintegerThe reported date of the trade, unix seconds (00:00 UTC).
transactions[].coinIdstringThe coin traded, by coin id.
transactions[].typestringWhether coins were bought or sold.
transactions[].amountnumberCoins bought (positive) or sold (negative).
transactions[].valueUsdnumber | nullWhat the trade cost or raised, in USD. Null when not disclosed.
transactions[].pricePerCoinUsdnumber | nullThe price per coin of this trade, in USD. Null when not disclosed.
transactions[].holdingAfternumber | nullCoins held after this trade.
transactions[].sourceUrlstring | nullThe filing or report the trade was taken from.

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key