Skip to main content
GET
/
token
/
{network}
/
{address}
/
swaps
Get all swap related transactions (buy, sell)
curl --request GET \
  --url https://solana-gateway.moralis.io/token/{network}/{address}/swaps \
  --header 'X-Api-Key: <api-key>'
{
  "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": {
        "address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
        "name": "Wrapped Ether",
        "symbol": "SYM",
        "logo": "https://example.com/logo-token1.png",
        "amount": "0.000014332429005002",
        "usdPrice": 3148.1828278180296,
        "usdAmount": 1230,
        "tokenType": "token1"
      },
      "sold": {
        "address": "0x176211869ca2b568f2a7d4ee941e073a821ee1ff",
        "name": "USDC",
        "symbol": "SYM",
        "logo": "https://example.com/logo-token2.png",
        "amount": "1000",
        "usdPrice": 0.9999999999999986,
        "usdAmount": -0.045138999999999936,
        "tokenType": "token0"
      },
      "baseQuotePrice": "0.01",
      "totalValueUsd": 1230
    }
  ]
}
Endpoint cost: CUs. Learn more about compute units.

Authorizations

X-Api-Key
string
header
required

Path Parameters

network
enum<string>
required

The network to query

Available options:
mainnet,
devnet
address
string
required

The address to query

Example:

"So11111111111111111111111111111111111111112"

Query Parameters

limit
number
default:100

The limit per page

Required range: 1 <= x <= 100
cursor
string

The cursor to the next page

fromDate
string

The starting date (format in seconds or datestring accepted by momentjs)

toDate
string

The ending date (format in seconds or datestring accepted by momentjs)

order
enum<string>
default:DESC

The order of the results, in ascending (ASC) or descending (DESC).

Available options:
ASC,
DESC
Example:

"DESC"

transactionTypes
string
default:buy,sell

Transaction types to fetch. Possible values: 'buy','sell' or both separated by comma

Example:

"buy,sell"

Response

200 - application/json
page
number
required
Example:

1

pageSize
number
required
Example:

100

cursor
string | null
required
Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Caaw"

result
object[]
required