OpenBlock Docs
  • Welcome To OpenBlock
  • Data Offering
    • Overview
    • DeFi Canonical Data
      • Automated Liquidity Manager
      • Bridge
      • Derivative
      • DEX Aggregator
      • DEX
      • Lending
      • Liquid Staking
      • NFT Marketplace
      • Prediction Market
      • Yield Aggregator
      • General
      • Incentive Claims
    • DEX Events
    • ERC20 Transfers
    • Airdrop Data
    • Global Token Prices
  • Intelligence Models
    • Sybil
    • User Labeling
    • User Retention Prediction
    • Mercenary Strategy Identification
  • Incentive Methodologies
    • Point Campaigns
      • Point Methodologies
Powered by GitBook
On this page
Export as PDF
  1. Data Offering
  2. DeFi Canonical Data

DEX

Our data tables capture key metrics on trades, liquidity pools, and user activity.

Key Tables:

  • Pools: Details of liquidity pools, including token pairs, liquidity provided, and fee rates.

  • LP Position Snapshot: Snapshots of liquidity provider positions, tracking token amounts and USD values.

  • Pool Snapshot: Snapshot of individuals pools, including token volume, fees, and transaction data.

  • Trades: Records of user trades, capturing swap amounts, tokens involved, and fees.\

Property
Description
Type

chain_id

The standard id of the chain.

number

creation_block_number

The block this pool was created in.

number

timestamp

The timestamp of the block that this pool was created in.

number

pool_address

The contract address of the LP pool.

string

lp_token_address

The token address of the LP token for this pool.

string

lp_token_symbol

The symbol of the LP token.

string

token_address

The token address of the pool token at token_index.

string

token_symbol

The symbol of the pool token.

string

token_decimals

The decimals of the pool token.

string

token_index

The index in the pool smart contract that this token appears at, default 0 (ie, one entry per token in a pool).

number

fee_rate

The fee rate of the pool, as a percentage (ie, 2.3% as 0.023).

number

dex_type

The type of the DEX (ie, CPMM, CLMM, Orderbook).

string

Property
Description
Type

timestamp

The timestamp of the snapshot.

number

block_date

The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots).

date

chain_id

The standard id of the chain.

number

pool_address

The contract address of the pool.

string

user_address

The address of the liquidity provider.

string

token_index

The token index based on the smart contract.

number

token_address

The contract address of the token provided as liquidity.

string

token_symbol

The symbol of the token.

string

token_amount

The amount of the underlying liquidity position in the pool, decimal normalized (ie, the amount of USDC provided by the LPer in a USDC/WETH pool).

number

token_amount_usd

The amount of the token in USD.

number

Property
Description
Type

timestamp

The timestamp of the snapshot.

number

block_date

The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots).

date

chain_id

The standard id of the chain.

number

pool_address

The contract address of the LP pool.

string

token_index

The token index in the smart contract.

number

token_address

The contract address of the token in the pool.

string

token_symbol

The symbol of the token.

string

token_amount

The amount of the token in this pool at the snapshot.

number

token_amount_usd

The amount of the token in USD.

number

volume_amount

The volume of the token transacted in this pool during the given snapshot, decimal normalized.

number

volume_usd

The volume transacted in the given snapshot, in USD.

number

fee_rate

The fee rate of the pool, as a percentage (ie, 2.3% as 0.023).

number

total_fees_usd

The total amount of revenue and fees paid in this pool in the given snapshot, in USD.

number

user_fees_usd

The amount of total fees accrued to liquidity providers of the protocol, in USD.

number

protocol_fees_usd

The amount of total fees accrued to the protocol, in USD.

number

Property
Description
Type

timestamp

The timestamp of the transaction.

number

chain_id

The standard id of the chain.

number

block_number

The block number of the trade.

number

log_index

The event log. For transactions that don't emit event, create arbitrary index starting from 0.

number

transaction_hash

The hash of the transaction.

string

user_address

The address that initiates the transaction (ie, the transaction signer).

string

taker_address

The taker, the address that receives the output of the swap (ie, could be the same as user_address unless a proxy contract/router is used).

string

pair_name

The name of the token pair.

string

pool_address

The contract address of the LP pool being traded in.

string

input_token_address

The contract address of the input token (ie, the tokenIn or the token being sold to the pool).

string

input_token_symbol

The symbol of the input token.

string

input_token_amount

The amount of the input token, decimal normalized.

number

output_token_address

The contract address of the output token (ie, the tokenOut of the token being bought by the user and sent to the taker).

string

output_token_symbol

The symbol of the output token.

string

output_token_amount

The amount of the output token, decimal normalized.

number

spot_price_after_swap

The spot price in the pool after the swap is complete. This is the price ratio a user would get if they made an infinitesimal swap immediately after this one.

number

swap_amount_usd

The amount of the swap in USD.

number

fees_usd

The fees paid by the user.

number

PreviousDEX AggregatorNextLending

Last updated 6 months ago