Get Token Swaps by Pair
This endpoint returns all Token Swaps for a token pair, identified by the pair of contract addresses (supports pagination). Supported chains: ethereum
, polygon
, optimism
, arbitrum
, avalanche
.
Parameters
Parameter | Description | Type |
---|---|---|
chain_id | A keyword (i.e. "ethereum") or CAIP-2 identifier specifying the blockchain to query. | string |
token_one | required The contract address of the first token in the pair (supports ENS names). | string |
token_two | required The contract address of the second token in the pair (supports ENS names). | string |
occurred_after | The earlier swap date, inclusive (in seconds since the Unix epoch or ISO-8601 format). | date-time |
occurred_before | The later swap date, 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 |
curl -X GET \
'https://api.transpose.io/token/swaps-by-pair?chain_id=ethereum&token_one=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&token_two=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' \
-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.