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.
/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>"
| Parameter | Description |
|---|---|
idpath · 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.
| Field | Type | Description |
|---|---|---|
id | string | The entity's id, whatever id, name or ticker was asked for. |
name | string | Display name. |
type | string | A public company or a government. |
symbol | string | null | Stock ticker with its exchange suffix, e.g. MSTR.US. Null for a government. |
country | string | null | Two-letter country code, e.g. US. |
websiteUrl | string | null | Official website. |
twitterHandle | string | null | X (Twitter) handle, without the @. |
treasuryValueUsd | number | null | What all its crypto is worth now, in USD. |
unrealizedPnlUsd | number | null | Treasury value minus total cost, in USD. Null when the cost is not disclosed. |
mNav | number | null | Market cap over the crypto's value (0.95 = the stock trades at 95% of its crypto). Null for a government. |
assetValuePerShareUsd | number | null | Crypto value per share, in USD. Null for a government. |
holdings | object[] | Each coin held, as the source lists them. |
holdings[].coinId | string | The coin held, by coin id, e.g. bitcoin, ethereum. |
holdings[].amount | number | Coins held. |
holdings[].percentOfSupply | number | null | Share of the coin's total supply held, in percent (4.03 = 4.03%). |
holdings[].amountPerShare | number | null | Coins held per share of the company. Null for a government. |
holdings[].valueUsd | number | null | What the holding is worth now, in USD. |
holdings[].percentOfTreasury | number | null | This coin's share of the whole treasury's value, in percent. |
holdings[].costBasisUsd | number | null | What the holding cost in total, in USD. Null when the cost is not disclosed. |
holdings[].averageCostUsd | number | null | Average cost per coin, in USD. Null when the cost is not disclosed. |
holdings[].unrealizedPnlUsd | number | null | Value now minus cost, in USD; negative is a loss. Null when the cost is not disclosed. |
transactions | object[] | The 100 most recent reported buys and sells, newest first. Can be empty. |
transactions[].date | integer | The reported date of the trade, unix seconds (00:00 UTC). |
transactions[].coinId | string | The coin traded, by coin id. |
transactions[].type | string | Whether coins were bought or sold. |
transactions[].amount | number | Coins bought (positive) or sold (negative). |
transactions[].valueUsd | number | null | What the trade cost or raised, in USD. Null when not disclosed. |
transactions[].pricePerCoinUsd | number | null | The price per coin of this trade, in USD. Null when not disclosed. |
transactions[].holdingAfter | number | null | Coins held after this trade. |
transactions[].sourceUrl | string | null | The 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