The API is currently in development and is not yet available for production use. Please check back later.
cURL
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 } ] }
Returns swaps for a wallet, token or both.
Your Prism API key. You can get one for free in the Prism Dashboard.
Wallet address to retrieve swaps for.
Token address to retrieve swaps for.
Maximum number of results to return.
1 <= x <= 100
Cursor to return the next page of results.
List of swaps.
Total number of matching items
Cursor for pagination
Show child attributes
Was this page helpful?