curl --get "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}" \
--header "x-api-key: YOUR_API_KEY" \
--data-urlencode "events=liquidity" \
--data-urlencode "enrich=identity" \
--data-urlencode "limit=50"import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getUserTokenTradeHistory('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', 'FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', {
events: 'all', // Use 'liquidity' for LP adds/removes only, or 'trades' for swaps.
enrich: 'identity',
limit: 100,
sortDirection: 'DESC',
});
import requests
url = "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"trades": [
{
"tx": "5V4apVkgHf49J5acYPiuh5rB89EGsF8ocSysgnD9vFfZsTtDamhN3MFDKJSq7Dn7Z6Y5XhjghuVYuvvYWnSFpnvW",
"amount": 90,
"priceUsd": 6,
"volume": 540,
"volumeSol": 3,
"type": "sell",
"wallet": "F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi",
"time": 1789722000000,
"program": "pumpfun-amm",
"pools": [
"9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2"
]
}
],
"nextCursor": null,
"hasNextPage": false,
"sortDirection": "DESC"
}Get User-Specific Token Trades
Retrieve token activity within this route’s token, pool and wallet scope. Use events=all to combine swaps with liquidity additions/removals, or events=liquidity for liquidity only. Omit events for the existing trades-only response. Add enrich=identity to identify wallets on either event type.
Liquidity rows use type: add_liquidity | remove_liquidity, a single pool, and exact string amounts in tokens[]; they do not contain swap prices, volume or PnL. See the liquidity guide for REST examples, pagination and live rooms.
curl --get "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}" \
--header "x-api-key: YOUR_API_KEY" \
--data-urlencode "events=liquidity" \
--data-urlencode "enrich=identity" \
--data-urlencode "limit=50"import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getUserTokenTradeHistory('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', 'FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', {
events: 'all', // Use 'liquidity' for LP adds/removes only, or 'trades' for swaps.
enrich: 'identity',
limit: 100,
sortDirection: 'DESC',
});
import requests
url = "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/trades/{tokenAddress}/by-wallet/{owner}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"trades": [
{
"tx": "5V4apVkgHf49J5acYPiuh5rB89EGsF8ocSysgnD9vFfZsTtDamhN3MFDKJSq7Dn7Z6Y5XhjghuVYuvvYWnSFpnvW",
"amount": 90,
"priceUsd": 6,
"volume": 540,
"volumeSol": 3,
"type": "sell",
"wallet": "F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi",
"time": 1789722000000,
"program": "pumpfun-amm",
"pools": [
"9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2"
]
}
],
"nextCursor": null,
"hasNextPage": false,
"sortDirection": "DESC"
}SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getUserTokenTradeHistory('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', 'FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', {
events: 'all', // Use 'liquidity' for LP adds/removes only, or 'trades' for swaps.
enrich: 'identity',
limit: 100,
sortDirection: 'DESC',
});
Authorizations
API Key for authentication
Query Parameters
Choose trades (default), all (swaps plus liquidity), or liquidity (add/remove actions only). All modes return a trades array. Invalid values return HTTP 400.
trades, all, liquidity Pass identity to attach wallet identity to every returned trade or liquidity event, using the same enrichment as token holders. Includes available KOL profiles, tags, trading platforms and profiles, developer/pool labels, curated labels, and SNS names. Unknown wallets return identity: null. Omit for unchanged responses and no identity lookups. all and * also enable identity; pool and developer are compatibility aliases.
Pass nextCursor back unchanged. Default trades use a timestamp; events=all and events=liquidity return an opaque string scoped to the token, pool, wallet, events and sortDirection. Keep these filters unchanged between pages.
Number of results, default 250, maximum 500. With events=all or events=liquidity the range is 1–500.
1 <= x <= 500Chronological order: DESC (newest first) or ASC (oldest first). Invalid values return HTTP 400.
ASC, DESC Set to true to add from/to token metadata to swaps. Liquidity rows retain their tokens array without swap metadata.
Set to true to keep swap legs involving the requested token. Liquidity actions are retained.
Response
Successful response
Was this page helpful?