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
| Column | type | Description |
|---|---|---|
| offer_id | bigint | Surrogate key for the order-book offer execution record; null for AMM swaps. |
| swap_id | bigint | Surrogate key for the AMM pool swap record; null for order-book trades. |
| pool_id | bigint | Surrogate key for the AMM pool that fulfilled the swap; null for order-book trades. |
| pool_address | string | On-ledger account address of the AMM pool that executed the swap; null for order-book trades. |
| transaction_id | bigint | Internal surrogate key for the on-ledger transaction that triggered this trade. |
| transaction_hash | string | Cryptographic hash of the XRP Ledger transaction, usable for direct ledger lookup. |
| node_index | integer | Position of this trade within the transaction’s AffectedNodes list, distinguishing multiple fills in a single transaction. |
| transaction_type | string | XRPL transaction type that generated this trade (e.g. OfferCreate, Payment, AMMSwap). |
| transaction_result | string | XRPL engine result code for the transaction (e.g. tesSUCCESS); only successful trades are included in this view. |
| memo | string | Decoded MemoData from the first memo attached to the transaction, often used by apps to tag orders with routing or platform metadata. |
| transaction_fee | varchar | Network fee paid by the submitter for this transaction, denominated in XRP. Stored as a string; cast to a numeric type for arithmetic. |
| account_id | bigint | Internal surrogate key for the wallet that submitted the transaction. |
| account_address | string | XRP Ledger account address of the wallet that submitted the transaction. |
| destination_id | bigint | Internal surrogate key for the destination account specified in the transaction, if any; typically the recipient in a Payment. |
| destination_address | string | XRP Ledger account address of the transaction destination (e.g. payment recipient); null if no destination was specified. |
| base_token_id | bigint | Surrogate key of the base token in the trading pair; the base token is the one whose currency code comes first alphabetically. |
| base_token | string | Human-readable currency code of the base token (e.g. XRP, USD, BTC). |
| base_token_issuer | string | XRP Ledger account address of the entity that issued the base token; null for XRP, which has no issuer. |
| counter_token_id | bigint | Surrogate key of the counter (quote) token in the trading pair. |
| counter_token | string | Human-readable currency code of the counter token (e.g. XRP, USD, EUR). |
| counter_token_issuer | string | XRP Ledger account address of the entity that issued the counter token; null for XRP. |
| base_token_amount | double | Amount of the base token exchanged in this trade, in human-readable units (XRP in XRP, not drops). |
| counter_token_amount | double | Amount of the counter token exchanged in this trade, in human-readable units. |
| price | double | Trade price expressed as counter_token_amount divided by base_token_amount. |
| base_receiver_id | bigint | Internal surrogate key of the account that received the base token in this trade. |
| base_receiver | string | XRP Ledger address of the account that received the base token in this trade. |
| counter_receiver_id | bigint | Internal surrogate key of the account that received the counter token in this trade. |
| counter_receiver | string | XRP Ledger address of the account that received the counter token in this trade. |
| fulfilled_by | string | Execution venue: AMM for AMM pool swaps, or the triggering transaction type (OfferCreate or Payment) for order-book fills. |
| amm_base_token_balance_before | double | AMM pool balance of the base token immediately before this swap; null for order-book trades. |
| amm_base_token_balance_after | double | AMM pool balance of the base token immediately after this swap; null for order-book trades. |
| amm_base_token_balance_delta | double | Change 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_before | double | AMM pool balance of the counter token immediately before this swap; null for order-book trades. |
| amm_counter_token_balance_after | double | AMM pool balance of the counter token immediately after this swap; null for order-book trades. |
| amm_counter_token_balance_delta | double | Change in the AMM pool’s counter token balance from this swap; negative when the pool sold counter token, null for order-book trades. |
| timestamp | timestamp | UTC timestamp of the ledger close in which this trade was confirmed. |
| date | date | Calendar date (UTC) of the ledger close, used for daily partitioning and time-series analysis. |