Transactions API

Newest DEX swaps on a chain

The newest DEX swaps on a whole chain, most recent first, both legs published -- no token, wallet or pool in the question. Five chains.

GET/api/external/transaction-analysis/dex-trades-recent/{chain}

What it returns

A recency-ordered page of the newest DEX SWAPS on one chain — no token, wallet or pool in the question, and no other kind of on-chain activity: for every transaction a chain saw (transfers, approvals, contract calls — not swap-scoped), see recent-transactions instead (RHC only). Each row publishes BOTH legs of the swap (sold and bought) rather than a single buy/sell side, because a chain-wide question has no single token for "buy" or "sell" to be relative to. dex is the venue name when the source could identify it, and null when the source could only identify the POOL — the pool address is always published, under pool, regardless. Amounts are already decimalized. There is no pagination or limit parameter in this first cut — a single page only.

Chains

  • Solana SOL
  • BNB Chain BNB
  • Ethereum ETH
  • Base BASE
  • Robinhood Chain RHC

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/transaction-analysis/dex-trades-recent/SOL"
Parameters
ParameterDescription
chain

path · string · required

SOL, ETH, BNB, BASE or RHC. STABLE and ARC both return 400 — neither is offered on this resource. CELO, ARB, OP and SCROLL return 400 here.

Response fields

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

Response fields of Newest DEX swaps on a chain
FieldTypeDescription
tradesobject[]Newest first, in the order the source reports — never re-sorted here.
trades[].atinteger | nullUnix SECONDS the trade was mined at, or null.
trades[].blockinteger | nullThe block it was mined in, or null.
trades[].txHashstring | null
trades[].walletstring | nullThe wallet that initiated the swap.
trades[].dexstring | nullThe DEX/AMM venue name, or null when the source could only identify the pool, not the venue itself. The pool address is always published separately, under pool, whether or not the venue name is known.
trades[].poolstring | nullThe pool address (or pool id) the swap traded through.
trades[].soldobjectThe side of the swap the wallet GAVE.
trades[].sold.tokenstring | nullThe mint/contract address of the token given.
trades[].sold.symbolstring | nullnull when the source did not report one — a common gap, not an error.
trades[].sold.amountnumber | nullDecimalized quantity given. 0 is a real, published measurement, distinct from null.
trades[].sold.priceUsdnumber | nullUSD price of this side at the trade, or null when the source did not price it.
trades[].boughtobjectThe side of the swap the wallet RECEIVED.
trades[].bought.tokenstring | nullThe mint/contract address of the token received.
trades[].bought.symbolstring | nullnull when the source did not report one — a common gap, not an error.
trades[].bought.amountnumber | nullDecimalized quantity received. 0 is a real, published measurement, distinct from null.
trades[].bought.priceUsdnumber | nullUSD price of this side at the trade, or null when the source did not price it.
trades[].volumeUsdnumber | nullUSD value of the whole trade, or null when the source did not value it.

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