Explore swaps
This tutorial demonstrates how to use our Swaps REST API to retrieve swap data across different blockchains, tokens, and pairs.
API Endpoint
Note: This API requires authentication using a Bearer token.
Path Format
The path follows this pattern:
Where:
chain
: Blockchain (ethereum, polygon, base, binance, solana, arbitrum, tron)network
: Network type (mainnet, testnet, etc.)token1
: First token symbol (USDC, USDT, WETH, etc.)token2
: Second token symbol (USDC, USDT, WETH, etc.)The final parameter is
all
, reserved for size bucket filtering (not currently active).
Example Usage
Sample curl reponse
The API returns swap data in JSON array format. Each swap entry contains:
Field Descriptions:
chain_name
: Blockchain nametx_hash
: Transaction hash of the swaptimestamp
: Unix timestamp of the swaptoken1_address
: Contract address of the first tokentoken1_symbol
: Symbol of the first tokentoken1_decimals
: Number of decimal places for token1token2_address
: Contract address of the second tokentoken2_symbol
: Symbol of the second tokentoken2_decimals
: Number of decimal places for token2token1_sender
: Address sending token1token2_sender
: Address sending token2token1_amount
: Amount of token1 swappedtoken2_amount
: Amount of token2 swappedprice_token1_in_token2
: Price of token1 denominated in token2 (scaled number)price_token2_in_token1
: Price of token2 denominated in token1 (scaled number)
Pagination Parameters
page
: The page number (starting from 0)pageSize
: Number of results per page
Last updated