Get Swaps by Wallet
This endpoint returns swap data for a given wallet address. 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 |
wallet_address | required The address of the wallet that is swapping tokens (supports ENS names). | 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 |
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-wallet?chain_id=ethereum&wallet_address=vitalik.eth' \
-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.