DeFi Data - S3

We offer Amazon S3 bulk downloads to retrieve massive historical datasets for select data types, delivered in Apache Parquet format.

DeFi Datasets




DeFi Data Fields & Descriptions

Ethereum - Protocol Events (Aave v2 & v3)

FieldDescription
accountThe EOA that triggered this event
actionThe event that the EOA triggered in the smart contract
amountNativeThe amount of the asset in native units, normalized with the asset's decimals
amountUSDThe amount of the asset in US dollars
assetIdThe smart contract address of the asset
assetSymbolThe human readable, abbreviated name of the asset
blockNumberThe integer value identifying the block
borrowRateThe interest rate for borrowing the asset
borrowRateModeIndicates whether the borrowRate is stable or variable
caller
collateralAmountNativeThe amount of the asset in native units, normalized with the asset's decimals
collateralAmountUSDThe amount of the asset in US dollars
collateralAssetIdThe smart contract address of the asset. This is the asset that was used as backing for the borrowing activity of liquidatee
collateralAssetSymbolThe human readable, abbreviated name of the asset
initiator
liquidateeThe EOA being liquidated because they are under-collateralized on their borrowed amount
liquidatorThe EOA that is triggering the liquidation on liquidatee
logIndex
market
marketId
principalAmountNativeThe amount of the asset in native units, normalized with the asset's decimals
principalAmountUSDThe amount of the asset in US dollars
principalAssetIdThe smart contract address of the asset. This is the asset that was borrowed by the liquidatee
principalAssetSymbolThe human readable, abbreviated name of the asset
profitUSDThe amount in US dollars that the liquidator earned from triggering a liquidation
repayerThe EOA that repaid the load
reserveAsCollateralEnabledIndicates if assets deposited into the smart contract can be used as collateral
target
timestampIndicates the datetime or epoch milliseconds of when the event took place
totalFeeThe fee for the FlashLoan
transactionHashThe unique identifier of the transaction indicating that the transaction was validated and added to the block

Ethereum - Protocol Events (Compound v2 & MakerDAO)

FieldDescription
accountThe EOA that triggered this event
actionThe human readable name of the event that the EOA triggered in the smart contract
amountNativeThe amount of the asset in native units, normalized with the asset's decimals
amountUSDThe amount of the asset in US dollars
assetIdThe smart contract address of the asset
assetSymbolThe human readable, abbreviated name of the asset
blockNumberThe integer value identifying the block
borrowRateThe interest rate for borrowing the asset
borrowRateModeIndicates whether the borrowRate is stable or variable
collateralAmountNativeThe amount of the asset in native units, normalized with the asset's decimals
collateralAmountUSDThe amount of the asset in US dollars
collateralAssetIdThe smart contract address of the asset. This is the asset that was used as backing for the borrowing activity of liquidatee
collateralAssetSymbolThe human readable, abbreviated name of the asset
liquidateeThe EOA being liquidated because they are under-collateralized on their borrowed amount
liquidatorThe EOA that is triggering the liquidation on liquidatee
logIndex
market
marketId
principalAmountNativeThe amount of the asset in native units, normalized with the asset's decimals
principalAmountUSDThe amount of the asset in US dollars
principalAssetIdThe smart contract address of the asset. This is the asset that was borrowed by the liquidatee
principalAssetSymbolThe human readable, abbreviated name of the asset
profitUSDThe amount in US dollars that the liquidator earned from triggering a liquidation
timestampIndicates the datetime or epoch milliseconds of when the event took place
totalFeeThe fee for the FlashLoan
transactionHashThe unique identifier of the transaction indicating that the transaction was validated and added to the block

DEX - Trades

FieldDescription
exchangeThe name of the exchange.
timestampTimestamp when Amberdata received the data.
timestampNanosecondsThe nanosecond part of the timestamp where applicable.
isBuyIndicates the direction of the trade:

- true means buy the base, sell the quote

- false means sell the base, buy the quote
priceThe actual price at which the asset was traded (including slippage, but not fees)
volumeThe total amount of that asset that was traded.
tradeIdThe exchange provided id of the trade.
logIndexThe index of the log within the transaction which included this trade event.
pairAddressThe address of the pair.
amountInBaseThe amount of the Base asset accepted in the trade.
amountInQuoteThe amount of the Quote asset accepted in the trade.
amountOutBaseThe amount of the Base asset returned in the trade.
amountOutQuoteThe amount of the Quote asset accepted in the trade.
fromAddressThe address which started the trade, ie the sender
toAddressThe recipient of the trade, ie the receiver

DEX - Liquidity

FieldDescription
exchangeNameThe name of the exchange.
exchangeIdThe address of the exchange/pool.
pairThe common name for the pair - name is not unique, use pairAddress instead.
pairNormalizedThe internal name for the pair - name is not unique, use pairAddress instead.
pairAddressThe address of the pair.
baseAddressThe address of the first underlying assert behind the pair.
quoteAddressThe address of the last underlying assert behind the pair.
addressThe address of the asset for which this liquidity events is for (would be one of base or quote address).
timestampThe timestamp associated with this record.
transactionHashThe hash of the transaction which included this liquidity event.
transactionIndexThe index of the transaction which included this liquidity event.
logIndexThe index of the log within the transaction which included this liquidity event.
amountThe new amount of the underlying asset after this liquidity event.
liquidityPriceThe new price of the underlying asset after this liquidity event.
timestampNanosecondsThe nanosecond part of the timestamp where applicable.


FAQs

Why is delivery via S3 important?

  • With data in S3, our customers can bulk download historical data in an analytics friendly format. This allows them to dig deep into the data and perform their own proprietary research and test trading strategies without being limited by our REST API throughput.

How does a customer get access to these datasets?

  • Customers will need to have their own AWS credentials in which we will provision for S3 access. If you are interested in downloading data via S3, please contact your Account Executive.

Why Parquet format instead of a GZIP compressed JSON file?

  • Parquet is a columnar storage format for structured data that is optimized for querying and analysis. In Parquet format, data is stored in columns rather than rows, allowing for more efficient compression and encoding of data. This can result in significant performance improvements for analytical workloads that involve large datasets and complex queries. Parquet is widely used in big data environments for data warehousing, analytics, and machine learning applications and can be easily integrated into existing data pipelines.

How do I download a parquet sample file and open it to see which fields are returned?

  • If you only want to see the fields, simply download the sample parquet file, load it as a pandas dataframe in Python and use dataframe.dtypes, that'll give you a quick output of the field types. Here is the code available for you to try out:
#Import the pandas library
import pandas as pd

# Replace 'your_parquet_file.parquet' with the path to your Parquet file
parquet_file = 'your_parquet_file.parquet'

# Load the Parquet file as a pandas DataFrame
df = pd.read_parquet(parquet_file)

# Display the data types of the DataFrame
print(df.dtypes)
  • Now if you wanted to actually read the parquet data, once you've downloaded the sample parquet file, you can run the following Python code:
#Import the pandas library
import pandas as pd   

# Replace 'your_parquet_file.parquet' with the path to your Parquet file
parquet_file = 'your_parquet_file.parquet' 

pd.read_parquet(parquet_file, engine='pyarrow')