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 Wallet Address Mainnet Only

Solana Logo

Looking for swaps by wallet address on Solana?

Access swaps by wallet address data using our powerful Solana API

Explore Solana API
GEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/swaps

List all swap transactions (buy/sell) for a specific wallet. Optionally filter by tokenAddress for specific token swaps.

Note

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

PATH PARAMS
addressstringrequired
The wallet address token-transactions are to be retrieved for.
QUERY PARAMS
chainstring
The chain to query
tokenAddressstring
The token address to get transaction for (optional)
cursorstring
The cursor returned in the previous response (used for getting the next page).
limitnumber
The desired page size of the result.
fromBlocknumber

The minimum block number from which to get the token transactions

  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used.
toBlockstring
The block number to get the token transactions from
fromDatestring

The start date from which to get the token transactions (format in seconds or datestring accepted by momentjs)

  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used.
toDatestring

The end date from which to get the token transactions (format in seconds or datestring accepted by momentjs)

  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used.
orderstring
The order of the result, in ascending (ASC) or descending (DESC)
transactionTypesstring
Array of transaction types. Allowed values are 'buy', 'sell'.
Responses
200Returns swap transactions by wallet address.
400Bad Request
404Not Found
429Too Many Requests
500Internal Server Error
API KEY
curl --request GET \
--url 'https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/swaps?chain=eth&limit=25&order=DESC' \
--header 'accept: application/json' \
--header 'X-API-Key: YOUR_API_KEY'
Response Example
{
"page": "2",
"page_size": "100",
"cursor": "",
"result": [
{
"transactionHash": "0x2bfcba4715774420936669cd0ff2241d70e9abecab76c9db813602015b3134ad",
"transactionIndex": 1,
"transactionType": "buy",
"blockTimestamp": "2022-02-22T00:00:00Z",
"blockNumber": 21093423,
"subCategory": "accumulation",
"walletAddress": "0x2bfcba4715774420936669cd0ff2241d70e9abec",
"walletAddressLabel": "Murad Wallet",
"entity": "Murad",
"entityLogo": "https://entities-logos.s3.us-east-1.amazonaws.com/murad.png",
"pairAddress": "0x36a46dff597c5a444bbc521d26787f57867d2214",
"pairLabel": "BRETT/WETH",
"exchangeAddress": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",
"exchangeName": "Uniswap v2",
"exchangeLogo": "https://entities-logos.s3.us-east-1.amazonaws.com/uniswap.png",
"baseQuotePrice": "0.00003376480687",
"totalValueUsd": 1165
}
]
}