Get Swaps by Timestamp
This endpoint returns swap data for a given decentralized exchange (DEX). Supported chains: ethereum
, polygon
, optimism
, arbitrum
, base
, avalanche
.
Parameters
Parameter | Description | Type |
---|---|---|
chain_id | A keyword (i.e. "ethereum") or CAIP-2 identifier specifying the blockchain to query. | string |
exchange_name | The name of the decentralized exchange. | string |
contract_version | The version of the particular exchange contract. | string |
from_timestamp | The earlier timestamp to retrieve swap data between, inclusive (in seconds since the Unix epoch or ISO-8601 format). | date-time |
to_timestamp | The later timestamp to retrieve swap data between, inclusive (in seconds since the Unix epoch or ISO-8601 format). | date-time |
order | The order in which to retrieve the results (either asc or desc). | string |
limit | The maximum number of results to retrieve (default 100 ). |
string |
Supported Protocols
Protocol | |||
---|---|---|---|
03-swap-v1 | 03-swap-v10 | 03-swap-v11 | 03-swap-v12 |
03-swap-v13 | 03-swap-v14 | 03-swap-v15 | 03-swap-v16 |
03-swap-v17 | 03-swap-v18 | 03-swap-v19 | 03-swap-v2 |
03-swap-v20 | 03-swap-v3 | 03-swap-v4 | 03-swap-v5 |
03-swap-v6 | 03-swap-v7 | 03-swap-v8 | 03-swap-v9 |
0x-v1 | 0x-v2 | 0x-v3 | 1inch-v1 |
1inch-v10 | 1inch-v11 | 1inch-v12 | 1inch-v2 |
1inch-v3 | 1inch-v4 | 1inch-v5 | 1inch-v6 |
1inch-v7 | 1inch-v8 | 1inch-v9 | afro-dex-v1 |
airswap-legacy | airswap-v1 | airswap-v2 | airswap-v3 |
ambient-v1 | apeswap-v2 | atomic-blue-v1 | atomic-blue-v2 |
az-exchange-v1 | balancer-v1 | balancer-v1-forks | balancer-v2 |
bananagun-v1 | bancor-v1 | bancor-v2 | bean-dex-v1 |
bebop-v1 | bitcratic-v1 | bitcratic-v2 | bitox-io-v1 |
bzx-v1 | cityswap-v1 | clipper-v1 | coin-change-ex-v1 |
coinbase-v1 | collection-v1 | collection-v2 | cowswap-v1 |
cowswap-v2 | cowswap-v3 | cryptlo-v2 | curve-lending |
curve-metapool | curve-tricrypto | curve-v1 | curve-v2 |
ddex-hybrid | ddex-hydro | decentrex-v1 | decentrex-v2 |
decentrex-v3 | defi-swap-v1 | dex-ag-v1 | dex-ag-v2 |
dex-ag-v3 | dex-ag-v4 | dex-blue-v1 | dfx-v1 |
dfx-v2 | dodo-v1 | dodo-v2 | dodoswap-private |
dodoswap-stable | dodoswap-v1 | dodoswap-v2 | dutchx-v1 |
e-dex-v1 | elasticswap-v1 | enclaves-v1 | ether-next-v1 |
etherdelta-1-forks | etherdelta-v1 | etherdelta-v2 | etherdelta-v3 |
etherdelta-v4 | etherdelta-v5 | ethmall-v1 | ex-toke-v1 |
firebird-v1 | fraxswap-v1 | fraxswap-v2 | genieswap-v1 |
genieswap-v2 | genieswap-v3 | hashflow-v1 | hashflow-v2 |
kyber-v1 | kyber-v2 | kyber-v3 | makerdao-psm |
market-place-v1 | maverick-v1 | miniswap-v1 | mistx-v1 |
mstable-v1 | n-dex-market-v1 | oasis-v1 | odos-v1 |
open-ocean-v1 | open-ocean-v2 | pancakeswap-mm | pancakeswap-v2 |
pancakeswap-v3 | paraswap-v1 | paraswap-v2 | paraswap-v3 |
paraswap-v4 | paraswap-v5 | paraswap-v6 | paraswap-v7 |
pendle-v2 | polaris-dex-v1 | saddle-finance-metapool | saddle-finance-stableswap |
sakeswap-v1 | sashimiswap-v1 | seed_dex-v1 | seed_dex-v2 |
shibaswap-v2 | singular-x-v1 | smoothyswap-v1 | solidly-v1 |
solidly-v1-forks | sudoswap-v1 | sudoswap-v2 | sushiswap-v1 |
sushiswap-v3 | synapse-v1 | synthetix-v1 | tokenlon-v1 |
tokenlon-v2 | tokenlon-v3 | tokenlon-v4 | tokenlon-v5 |
tokenstore-v1 | tokenstore-v1-forks | tradex-one-v1 | unibot-v1 |
unicly-v1 | uniswap-v1 | uniswap-v2 | uniswap-v2-forks |
uniswap-v3 | uniswap-v3-forks | uniswap-x | unitrade-v1 |
unsheth-v2 | vanilla-v1 | xy-finance-v1 | zeedex-v1 |
zeedex-v2 | zerion-v1 | zerion-v2 | zkswap-v1 |
zkswap-v2 |
Response
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. |
curl -X GET \
'https://api.transpose.io/dex/swaps-by-timestamp?chain_id=ethereum&from_timestamp=2023-01-01&to_timestamp=2023-02-02' \
-H 'X-API-KEY: BtRVYj7dgnYUcr1gSSfWhmrTShIb8RBG' \
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.