nft.trades
nft.trades makes NFT trading data available to everyone on Dune Analytics. NFT.trades aggregates data across multiple NFT platforms into one simple table.
Our docs are now available at dune.com/docs. We'll keep this around as a reference, but we won't update them and eventually plan to deprecate.
nft.trades
is an effort to make NFT trading data easily available to everyone on Dune Analytics. This table aggregates and standardizes the data between different data platforms and provides auxiliary information and metadata all in one table.The culmination of this is a dataset which makes it extremely easy to query for any NFT related trading data across all indexed platforms.
So far we have indexed the data of the following platforms:
- OpenSea
- Rarible
- SuperRare
- CryptoPunks (They get traded in their own contracts)
- Foundation
- LooksRare
All of this data is easily accessible with very simple queries like these:

select * from nft.trades
where nft_contract_address = '\xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb' --this is the cryptopunks address
select date_trunc('day', block_time), usd_amount, nft_contract_address, token_id from nft.trades
where platform = 'OpenSea' --only shows trades on given Platform
and block_time > now() - interval '24hours'
select sum(usd_amount),
date_trunc('day', block_time) as day,
platform
from nft.trades
where block_time > now() - interval '365 days'
group by platform, day
A trade occurs between a
buyer
and a seller
.
They exchange an item which is uniquely identified by the combination of nft_contract_address
and token_id
. The Buyer will pay the Seller a given original_amount
of tokens in any given original_currency
. To make it easier, we have calculated the usd_amount
that this was worth at the time of the trade for you. Most trades will be done in ETH or WETH, but especially non OpenSea trades often contain other currencies.
The trade is committed on any of the indexed platforms
and will be facilitated through a smart contract of those platform's exchange_contract_address
. Each trade will have metadata like block_time
, tx_hash
, block_number
, platform version
, evt_index
etc.
Additionally, we also provide metadata about the traded NFT. nft_project_name
and erc_standard
will help you in analysing your dataset more easily. nft_project_name
data gets pulled from the nft.tokens
table, if your NFT is missing in that table, you are welcome to make a PR to add it.Bundle Trade
There can also be trades in which a single trade transaction contains multiple Items. Each of these Items is uniquely identified through a combination of
nft_contract_address
and token_id
. Unfortunately, in these trades there is not a clear way to determine a corresponding usd_amount
for each of the items. A possible workaround is to divide the number of items by the payment made for the bundle, but this logic very quickly falls apart when Items that are not one in kind/value get sold in a bundle. We recommend removing bundle transfers from the dataset that you are working with since it can heavily influence the results in either direction. Note that token_id
and 'erc_standard
will be null if tokens with different tokens IDs or erc type are transfered within the same transaction.Aggregator Trade
There can also be trades in which a single trade transaction contains multiple items, especially when using NFT aggregator platforms. Our approach is to unravel aggregator trades so that each row correspond to a unique item that was traded, with its associated ID, price, collection, etc. Importantly, the
trade_type
will be indicated as Aggregator Trade
, and platform names and address can be found in the nft.aggregators
table. If your aggregator platform is missing in that table, you are welcome to make a PR to add it.Platform and Royalty Fees
In the most recent version of
nft.trades
, information about the amount and percent of royalty fees in the original amount and in USD is available when this information was able to be retrieved. Royalty fees are going to the creator, and Platform fees are collected by the NFT platform. Note that royalty fees cannot always be retrieved, and are set to null by default.Dashboard that utilize parameters
Dashboards that look across the entire Ecosystem
The SQL code that processes the data for every market place is open source and available in our github repository. Everyone can review the code, make pull requests and submit code to add more marketplaces.
column_name | data_type | description |
---|---|---|
block_time | timestamp with time zone | When was this trade exectuted |
nft_project_name | text | NFT project name (e.g. "the dudes") |
nft_token_id | text | The token_id that got trades (e.g. 235) |
erc_standard | text | The Token Standard of the traded token ERC721 or ERC1155 |
platform | text | Which Platform was this trade executed on? |
platform_version | text | Which version of this platform was utilized? |
trade_type | text | "Single Item Sale" or "Bundle Sale"? |
number_of_items | integer | How many NFTs were traded in this trade? |
category | text | Was this an auction or a direct sale? |
evt_type | text | currently not in use, default 'Trade' |
aggregator | text | Was this trade made using an aggregator (Yes : Name of aggregator, No : Null) |
usd_amount | numeric | USD value of the trade at time of execution |
seller | bytea | Seller of NFTs |
buyer | bytea | Buyer of NFTs |
original_amount | numeric | The amount in the right format |
original_amount_raw | numeric | raw amount of the currency |
eth_amount | numeric | ETH value of the trade at time of execution |
royalty_fees_percent | numeric | Royalty fees going to the creator (in %) |
original_royalty_fees | numeric | Royalty fees in the currency used for this trade |
usd_royalty_fees | numeric | USD value of royalty fees at time of execution |
platform_fees_percent | numeric | Platform fees (in %) |
original_platform_fees | numeric | Platform fees in the currency used for this trade |
usd_platform_fees | numeric | USD value of platform fees at time of execution |
original_currency | text | The Currency used for this trade |
original_currency_contract | bytea | The erc20 address of the currency used in this trade (does not work with raw ETH) |
currency_contract | bytea | the corrected currency contract |
nft_contract_address | bytea | The contract address of the NFT traded |
exchange_contract_address | bytea | The platform contract that facilitated this trade |
tx_hash | bytea | the hash of this transaction |
block_number | integer | the block_number that this trade was done in |
tx_from | bytea | Initiated this transaction |
tx_to | bytea | Received this transaction |
trace_address | ARRAY | n/a |
evt_index | integer | event index |
trade_id | integer | n/a |
Last modified 4mo ago