Dex Swaps
The arbitrum.dex_swaps table provides indexed views of all DEX swaps transacted for the chain. All DEX swaps tables follows the same database schema presented below.
Columns
| Name | Type | Description |
|---|---|---|
| aggregator_name | text |
The name of the DEX aggregator that facilitated the DEX swap (null if not found). |
| block_number | integer |
The block number at which the DEX swap occurred. |
| contract_address | text |
The contract address of the pool that facilitated the DEX swap. |
| contract_version | text |
The version of the exchange contract (e.g. v1 or v2). |
| effective_price | numeric |
The price of the to-token denominated by the from-token (i.e. quantity_out / quantity_in). |
| exchange_name | text |
The name of the exchange that facilitated the DEX swap. |
| from_token_address | text |
The address of the token that was swapped in. |
| log_index | integer |
The log index at which the DEX swap occurred. |
| origin_address | text |
The address that submitted the transaction that contained the swap. |
| quantity_in | numeric |
The amount of the token that was swapped in. |
| quantity_out | numeric |
The amount of the token that was swapped out. |
| sender_address | text |
The address that sent the tokens to the pool in the swap. |
| timestamp | timestamp without time zone |
The timestamp at which the DEX swap occurred. |
| to_token_address | text |
The address of the token that was swapped out. |
| transaction_hash | text |
The transaction hash at which the DEX swap occurred. |
| __block_number | integer |
An internal identifier for the indexer that updates this row. Use block_number instead when querying. |
| __confirmed | boolean |
Flag indicating whether the transfer has been confirmed. |
Supported Protocols
| Protocol | |||
|---|---|---|---|
| 03-swap-v1 | 03-swap-v2 | 0x-v1 | 1inch-v1 |
| 1inch-v2 | 1inch-v3 | 1inch-v4 | 3xcalibur-v1 |
| arbether-v3 | arbiswap-v1 | arbswap-v1 | balancer-v2 |
| bitkeep-v1 | bitkeep-v2 | camelot-v1 | curve-metapool |
| curve-v1 | curve-v2 | dodo-v1 | dodo-v2 |
| dodoswap-private | dodoswap-stable | dodoswap-v1 | dodoswap-v2 |
| elkswap-v1 | firebird-v1 | genieswap-v1 | genieswap-v2 |
| gmx-vault | gumball-v1 | hop-v1 | kyber-v1 |
| kyber-v2 | kyber-v3 | magicswap-v1 | metamask-v1 |
| odos-v1 | okx-v1 | okx-v2 | open-ocean-v1 |
| owlswap-v3 | paraswap-v1 | paraswap-v2 | raidswap-v3 |
| rainbow-v1 | slingshot-v1 | slingshot-v2 | solidlizard-v1 |
| solidly-v1-forks | summaswap-v3 | sushiswap-v1 | swapfish-v1 |
| swapr-v1 | synapse-v1 | traderjoe-v2 | uniswap-v2-forks |
| uniswap-v3 | uniswap-v3-forks | zigzag-v1 | zigzag-v2 |
| zyberswap-v1 |
Indexes
| Index |
|---|
| block_number, log_index |
| __indexer_id, __block_number |
| __indexer_id WHERE __confirmed = false |
| transaction_hash, log_index |
| timestamp, log_index |
| from_token_address, timestamp, log_index |
| to_token_address, timestamp, log_index |
| from_token_address, to_token_address, timestamp, log_index |
| origin_address, timestamp, log_index |
| sender_address, timestamp, log_index |
| contract_address, timestamp, log_index |
| exchange_name, timestamp, log_index |
| exchange_name, from_token_address, timestamp, log_index |
| exchange_name, to_token_address, timestamp, log_index |
| exchange_name, contract_version, timestamp, log_index |
| aggregator_name, timestamp, log_index |
Got questions? Join our Discord
Discord is the primary home of the Transpose developer community. Join us to ask questions, share your work, and get help.