Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key

Get Swaps by Token Address Mainnet Only

Ethereum Logo

Looking for swaps by token address on EVM?

Access token swap data by token address using our EVM API.

Explore EVM API
GEThttps://solana-gateway.moralis.io/token/:network/:address/swaps

Get all swap related transactions (buy, sell) for a specific token address.

Note

Swaps data is synced and available only from September 2024 onwards. Data prior to this date is not included.

PATH PARAMS
networkstringrequired
The network to query
addressstringrequired
The address to query
QUERY PARAMS
limitnumber
The limit per page
cursorstring
The cursor to the next page
fromDatestring
The starting date (format in seconds or datestring accepted by momentjs)
toDatestring
The ending date (format in seconds or datestring accepted by momentjs)
orderstring
The order of the results, in ascending (ASC) or descending (DESC).
transactionTypesstring
Transaction types to fetch. Possible values: 'buy','sell' or both separated by comma
Responses
200
400Bad Request
404Not Found
429Too Many Requests
500Internal Server Error
API KEY
curl --request GET \
--url 'https://solana-gateway.moralis.io/token/mainnet/So11111111111111111111111111111111111111112/swaps?limit=25&order=DESC&transactionTypes=buy%2Csell' \
--header 'accept: application/json' \
--header 'X-API-Key: YOUR_API_KEY'
Response Example
{
"page": 1,
"pageSize": 100,
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Caaw",
"result": {
"transactionHash": "0xafc66b9b1802618f560be5244395f0fc0b95a1f1fdeee7a206acbb546c9e8a72",
"transactionIndex": 5,
"transactionType": "buy",
"blockNumber": 12345678,
"blockTimestamp": "2024-11-21T09:22:28.000Z",
"subCategory": "ACCUMULATION",
"walletAddress": "0x1c584a6baecb7c5d51caa0ef3a579e08bd49d4e5",
"pairAddress": "0xdded227d71a096c6b5d87807c1b5c456771aaa94",
"pairLabel": "USDC/WETH",
"exchangeAddress": "0x1080ee857d165186af7f8d63e8ec510c28a6d1ea",
"exchangeName": "Uniswap",
"exchangeLogo": "https://logo.moralis.io/0xe708_0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f_769a0b766bd3d6d1830f0a95d7b3e313",
"baseToken": "ETH",
"quoteToken": "USDT",
"bought": "",
"sold": "",
"baseQuotePrice": "0.01",
"totalValueUsd": 1230
}
}