Skip to main content
POST
/
v1
/
solana
/
dex
/
trades
/
get-trades
Get Trades
curl --request POST \
  --url https://refract.prismapi.io/v1/solana/dex/trades/get-trades \
  --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": [
    {
      "protocol": "<string>",
      "swap_type": "quote_token",
      "wallet": "<string>",
      "token": "<string>",
      "quote": "<string>",
      "position": "<string>",
      "direction": "buy",
      "position_state": "open",
      "token_amount": 123,
      "quote_amount": 123,
      "native_amount": 123,
      "usd_amount": 123,
      "pre_token_balance": 123,
      "post_token_balance": 123,
      "token_symbol": "<string>",
      "quote_symbol": "<string>",
      "token_price": 123,
      "quote_price": 123,
      "block_slot": 123,
      "block_time": 123,
      "tx_hash": "<string>",
      "trade_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 trades for.

token
string

Token address to retrieve trades 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 trades.

count
integer

Total number of matching items

cursor
string

Cursor for pagination

data
object[]