Discovery and markets API

Which protocols were hacked, when, for how much, and how?

Crypto hacks, exploits and rugpulls back to 2011: who was hit, the day, the USD taken and returned, the technique and the chains, filtered by date or size.

GET/api/external/discovery/defi-hacks

What it returns

Every tracked hack, exploit and rugpull, newest first, back to 2011. since and until are unix seconds and keep the incidents dated inside them; minAmountUsd keeps those at or above an amount; limit caps how many are returned, while matched, totalAmountUsd and amountUnknown always describe every incident that matched. date is the day it happened, as unix seconds at UTC midnight; the hour is not published. amountUsd is null when the amount was never disclosed and 0 when nothing was finally lost — a filtered request drops the undisclosed ones, since "at least this much" cannot be said of them. returnedUsd is what was handed back afterwards and can exceed amountUsd when more than the stolen funds were returned. chains is written as the source writes it, which spells one chain several ways (BSC, BNB Chain, Binance Smart Chain all appear), so match on it loosely and never treat it as a chain code.

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/defi-hacks"
Parameters
ParameterDescription
since

query · integer · optional

Keep incidents dated at or after this instant, in unix seconds.
until

query · integer · optional

Keep incidents dated at or before this instant, in unix seconds.
minAmountUsd

query · integer · optional

Keep incidents that took at least this much, in USD. Incidents whose amount was never disclosed are left out when this is set.
limit

query · integer · optional

How many incidents to return, 1 to 500. Defaults to 50. limit ≤ 125 keeps the answer under 32 KB.

Response fields

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

Response fields of Which protocols were hacked, when, for how much, and how?
FieldTypeDescription
matchedintegerHow many incidents matched the filters, before limit.
totalAmountUsdnumber | nullUSD taken across the matching incidents with a known amount; null when none has one.
amountUnknownintegerHow many matching incidents have no published amount, so sit outside totalAmountUsd.
hacksobject[]Newest first, capped by limit; incidents on the same day keep the source order.
hacks[].dateintegerThe day it happened, unix seconds at UTC midnight.
hacks[].namestringThe protocol, exchange or chain that was hit.
hacks[].classificationstringThe broad failure, e.g. Oracle Manipulation, Key Compromise, Rugpull.
hacks[].techniquestringHow it was done, e.g. Spot Price Manipulation, Private Key Compromised.
hacks[].targetTypestringWhat was hit, e.g. DeFi Protocol, CEX, Token, Chain.
hacks[].isBridgebooleanWhether a bridge was what was exploited.
hacks[].chainsstring[] | nullChain names as the source writes them; null when it names none.
hacks[].languagestring | nullThe contract language, e.g. Solidity, Rust; null when not said.
hacks[].amountUsdnumber | nullUSD taken. null when never disclosed, 0 when nothing was finally lost.
hacks[].returnedUsdnumber | nullUSD returned afterwards; null when none is reported. Can exceed amountUsd.

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