Skip to main content
POST
/
v1
/
solana
/
dex
/
swaps
/
get-swaps
Get Swaps
curl --request POST \
  --url https://refract.prismapi.io/v1/solana/dex/swaps/get-swaps \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "wallet": "<string>",
  "token": "<string>",
  "limit": 20,
  "cursor": "<string>"
}
'
{
  "count": 123,
  "cursor": "<string>",
  "data": [
    {
      "swap_type": "quote_token",
      "protocol": "<string>",
      "wallet": "<string>",
      "token_in": "<string>",
      "token_out": "<string>",
      "token_symbol_in": "<string>",
      "token_symbol_out": "<string>",
      "token_amount_in": 123,
      "token_amount_out": 123,
      "token_price_in": 123,
      "token_price_out": 123,
      "pre_token_balance_in": 123,
      "pre_token_balance_out": 123,
      "post_token_balance_in": 123,
      "post_token_balance_out": 123,
      "usd_amount_in": 123,
      "usd_amount_out": 123,
      "block_slot": 123,
      "block_time": 123,
      "tx_hash": "<string>",
      "swap_index": 123
    }
  ]
}

Authorizations

X-Api-Key
string
header
required

Your Prism API key. You can get one for free in the Prism Dashboard.

Body

application/json
wallet
string

Wallet address to retrieve swaps for.

token
string

Token address to retrieve swaps for.

limit
integer
default:20

Maximum number of results to return.

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

Cursor to return the next page of results.

Response

List of swaps.

count
integer

Total number of matching items

cursor
string

Cursor for pagination

data
object[]