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
Consulta actividad dentro del alcance de token, pool y wallet de este endpoint. Usa events=all para combinar swaps con depósitos y retiros de liquidez, o events=liquidity para obtener solo liquidez. Omite events para conservar la respuesta de swaps. Añade enrich=identity para identificar wallets en ambos tipos de evento.
Los eventos de liquidez usan add_liquidity o remove_liquidity, un único pool y cantidades exactas como cadenas en tokens[]; no incluyen precios de swap, volumen ni PnL. Consulta la guía de liquidez para ejemplos REST, paginación y salas en vivo.
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',
});
Autorizaciones
Clave API para autenticación
Parámetros de consulta
Elige trades (predeterminado), all (swaps y liquidez) o liquidity (solo depósitos y retiros). Todos los modos devuelven un array trades. Los valores no válidos devuelven HTTP 400.
trades, all, liquidity Usa identity para añadir la identidad actual de la wallet a cada swap o evento de liquidez: perfiles KOL, etiquetas, plataformas, roles de desarrollador/pool y nombres SNS disponibles. Las wallets desconocidas devuelven identity: null. Si se omite, no se consulta la identidad. all y * también la activan; pool y developer son alias de compatibilidad.
Devuelve nextCursor sin modificar. El modo predeterminado usa una marca de tiempo; events=all y events=liquidity usan una cadena opaca asociada al token, pool, wallet, events y sortDirection. Mantén esos filtros entre páginas.
Número de resultados: 250 por defecto, máximo 500. Con events=all o events=liquidity, el rango es 1–500.
1 <= x <= 500Orden cronológico: DESC (más recientes primero) o ASC (más antiguos primero). Los valores no válidos devuelven HTTP 400.
ASC, DESC Usa true para añadir metadatos de los tokens de origen y destino a los swaps. Los eventos de liquidez conservan su array tokens sin metadatos de swap.
Usa true para conservar los swaps que incluyan el token solicitado. Las acciones de liquidez se mantienen.
Respuesta
Successful response
¿Esta página le ayudó?