Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dune.com/llms.txt

Use this file to discover all available pages before exploring further.

Table Description

A unified view of all token exchanges on the XRP Ledger DEX, combining AMM pool swaps and order-book offer executions into a single table for cross-venue trade analytics. Each row represents one trade execution, with the execution venue identified by fulfilled_by (AMM for pool swaps, OfferCreate or Payment for order-book fills). Token amounts are expressed in human-readable units (XRP in XRP, issued currencies in their native denomination). Columns specific to a venue are null for rows from the other venue.

Column Descriptions

ColumntypeDescription
offer_idbigintSurrogate key for the order-book offer execution record; null for AMM swaps.
swap_idbigintSurrogate key for the AMM pool swap record; null for order-book trades.
pool_idbigintSurrogate key for the AMM pool that fulfilled the swap; null for order-book trades.
pool_addressstringOn-ledger account address of the AMM pool that executed the swap; null for order-book trades.
transaction_idbigintInternal surrogate key for the on-ledger transaction that triggered this trade.
transaction_hashstringCryptographic hash of the XRP Ledger transaction, usable for direct ledger lookup.
node_indexintegerPosition of this trade within the transaction’s AffectedNodes list, distinguishing multiple fills in a single transaction.
transaction_typestringXRPL transaction type that generated this trade (e.g. OfferCreate, Payment, AMMSwap).
transaction_resultstringXRPL engine result code for the transaction (e.g. tesSUCCESS); only successful trades are included in this view.
memostringDecoded MemoData from the first memo attached to the transaction, often used by apps to tag orders with routing or platform metadata.
transaction_feevarcharNetwork fee paid by the submitter for this transaction, denominated in XRP. Stored as a string; cast to a numeric type for arithmetic.
account_idbigintInternal surrogate key for the wallet that submitted the transaction.
account_addressstringXRP Ledger account address of the wallet that submitted the transaction.
destination_idbigintInternal surrogate key for the destination account specified in the transaction, if any; typically the recipient in a Payment.
destination_addressstringXRP Ledger account address of the transaction destination (e.g. payment recipient); null if no destination was specified.
base_token_idbigintSurrogate key of the base token in the trading pair; the base token is the one whose currency code comes first alphabetically.
base_tokenstringHuman-readable currency code of the base token (e.g. XRP, USD, BTC).
base_token_issuerstringXRP Ledger account address of the entity that issued the base token; null for XRP, which has no issuer.
counter_token_idbigintSurrogate key of the counter (quote) token in the trading pair.
counter_tokenstringHuman-readable currency code of the counter token (e.g. XRP, USD, EUR).
counter_token_issuerstringXRP Ledger account address of the entity that issued the counter token; null for XRP.
base_token_amountdoubleAmount of the base token exchanged in this trade, in human-readable units (XRP in XRP, not drops).
counter_token_amountdoubleAmount of the counter token exchanged in this trade, in human-readable units.
pricedoubleTrade price expressed as counter_token_amount divided by base_token_amount.
base_receiver_idbigintInternal surrogate key of the account that received the base token in this trade.
base_receiverstringXRP Ledger address of the account that received the base token in this trade.
counter_receiver_idbigintInternal surrogate key of the account that received the counter token in this trade.
counter_receiverstringXRP Ledger address of the account that received the counter token in this trade.
fulfilled_bystringExecution venue: AMM for AMM pool swaps, or the triggering transaction type (OfferCreate or Payment) for order-book fills.
amm_base_token_balance_beforedoubleAMM pool balance of the base token immediately before this swap; null for order-book trades.
amm_base_token_balance_afterdoubleAMM pool balance of the base token immediately after this swap; null for order-book trades.
amm_base_token_balance_deltadoubleChange in the AMM pool’s base token balance from this swap; negative when the pool sold base token, null for order-book trades.
amm_counter_token_balance_beforedoubleAMM pool balance of the counter token immediately before this swap; null for order-book trades.
amm_counter_token_balance_afterdoubleAMM pool balance of the counter token immediately after this swap; null for order-book trades.
amm_counter_token_balance_deltadoubleChange in the AMM pool’s counter token balance from this swap; negative when the pool sold counter token, null for order-book trades.
timestamptimestampUTC timestamp of the ledger close in which this trade was confirmed.
datedateCalendar date (UTC) of the ledger close, used for daily partitioning and time-series analysis.

Table Sample