Skip to main content
GET
/
token
/
{network}
/
pairs
/
{pairAddress}
/
swaps
Get all swap related transactions (buy, sell, add liquidity & remove liquidity)
curl --request GET \
  --url https://solana-gateway.moralis.io/token/{network}/pairs/{pairAddress}/swaps \
  --header 'X-Api-Key: <api-key>'
{
  "page": 1,
  "pageSize": 100,
  "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...kJ8E_653QrA4Q8zb_9OCn6opE9aBo8PjqLeQU_VCaaw",
  "exchangeName": "Raydium AMM v4",
  "exchangeLogo": "https://entities-logos.s3.amazonaws.com/raydium.png",
  "exchangeAddress": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",
  "pairLabel": "BREAD/SOL",
  "pairAddress": "ALeyWh7zN979ZHUWY6YTMJC8wWowzdYqi8RRPRyB3LAd",
  "baseToken": {
    "address": "madHpjRn6bd8t78Rsy7NuSuNwWa2HU8ByPobZprHbHv",
    "name": "MAD",
    "symbol": "MAD",
    "logo": "https://ipfs.io/ipfs/QmeCR6o1FrYjczPdDDDm4623usKksjj9BQLu89WqV8jFZW?filename=MAD.jpg",
    "decimals": "18"
  },
  "quoteToken": {
    "address": "madHpjRn6bd8t78Rsy7NuSuNwWa2HU8ByPobZprHbHv",
    "name": "MAD",
    "symbol": "MAD",
    "logo": "https://ipfs.io/ipfs/QmeCR6o1FrYjczPdDDDm4623usKksjj9BQLu89WqV8jFZW?filename=MAD.jpg",
    "decimals": "18"
  },
  "result": [
    {
      "transactionHash": "3o9NfCBWaDEb8JLJGdp8tfWwXURNokanCvUJf9A9f5nFqmZkRvWcfhkek4t47UhRDSGKHsSzi8MBusin8H7x7YYD",
      "transactionType": "sell",
      "transactionIndex": 250,
      "subCategory": "sellAll",
      "blockTimestamp": "2024-11-28T09:44:55.000Z",
      "blockNumber": 304108120,
      "walletAddress": "A8GVZWGMxRAouFQymPoMKx527JhHKrBRuqFx7NET4j22",
      "baseTokenAmount": "199255.444466200",
      "quoteTokenAmount": "0.007374998",
      "baseTokenPriceUsd": 0.000008794,
      "quoteTokenPriceUsd": 237.60336565,
      "baseQuotePrice": "0.0000000370127",
      "totalValueUsd": 1.752324346
    }
  ]
}
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
pairAddress
string
required

The address of the pair to query

Example:

"Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE"

Query Parameters

limit
number
default:100

The limit per page

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

The cursor to the next page

order
enum<string>
default:DESC

The order of items

Available options:
ASC,
DESC
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)

transactionTypes
string
default:buy,sell,addLiquidity,removeLiquidity

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

Example:

"buy,sell,addLiquidity,removeLiquidity"

Response

200 - application/json
page
number
required
Example:

1

pageSize
number
required
Example:

100

cursor
string | null
required
Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...kJ8E_653QrA4Q8zb_9OCn6opE9aBo8PjqLeQU_VCaaw"

exchangeName
string | null
required
Example:

"Raydium AMM v4"

exchangeLogo
string | null
required
Example:

"https://entities-logos.s3.amazonaws.com/raydium.png"

exchangeAddress
string | null
required
Example:

"675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"

pairLabel
string | null
required
Example:

"BREAD/SOL"

pairAddress
string | null
required
Example:

"ALeyWh7zN979ZHUWY6YTMJC8wWowzdYqi8RRPRyB3LAd"

baseToken
object
required
quoteToken
object
required
result
object[]
required