SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getWalletChartV2('CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i', {
interval: '1d', // Or '1h', up to 90 days.
timeFrom: Math.floor(Date.now() / 1000) - 30 * 86400, // Unix seconds.
includesPositions: true, // Leaves out the older tokens-only points.
});
console.log(data.change['24h'].percent, data.points.at(-1)?.usd);
curl --request GET \
--url https://data.solanatracker.io/v2/wallet/{wallet}/chart \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/wallet/{wallet}/chart"
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/v2/wallet/{wallet}/chart', 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/v2/wallet/{wallet}/chart",
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/v2/wallet/{wallet}/chart"
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/v2/wallet/{wallet}/chart")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/wallet/{wallet}/chart")
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{
"wallet": "CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i",
"interval": "1d",
"change": {
"24h": {
"usd": -158.388082,
"percent": -0.13
},
"30d": {
"usd": null,
"percent": null
}
},
"points": [
{
"time": 1787011200000,
"usd": 6923.059,
"sol": 91.06526,
"includesPositions": false,
"changePercent": null
},
{
"time": 1795132800000,
"usd": 122629.863201,
"sol": 1781.128012921,
"includesPositions": true,
"changePercent": null
},
{
"time": 1795219200000,
"usd": 122824.201652,
"sol": 1750.387522537,
"includesPositions": true,
"changePercent": 0.16
},
{
"time": 1795305600000,
"usd": 122665.81357,
"sol": 1778.432891944,
"includesPositions": true,
"changePercent": -0.13
}
]
}{
"error": "Invalid sort. Valid options are: value, amount, change24h"
}{
"error": "<string>"
}{
"error": "Wallet data is temporarily unavailable, please retry"
}Wallet
API del gráfico de patrimonio neto de wallets de Solana
Historial del patrimonio neto de una wallet de Solana por hora o por día, con posiciones DeFi incluidas y variación en 24h y 30d.
GET
/
v2
/
wallet
/
{wallet}
/
chart
SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getWalletChartV2('CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i', {
interval: '1d', // Or '1h', up to 90 days.
timeFrom: Math.floor(Date.now() / 1000) - 30 * 86400, // Unix seconds.
includesPositions: true, // Leaves out the older tokens-only points.
});
console.log(data.change['24h'].percent, data.points.at(-1)?.usd);
curl --request GET \
--url https://data.solanatracker.io/v2/wallet/{wallet}/chart \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/wallet/{wallet}/chart"
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/v2/wallet/{wallet}/chart', 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/v2/wallet/{wallet}/chart",
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/v2/wallet/{wallet}/chart"
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/v2/wallet/{wallet}/chart")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/wallet/{wallet}/chart")
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{
"wallet": "CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i",
"interval": "1d",
"change": {
"24h": {
"usd": -158.388082,
"percent": -0.13
},
"30d": {
"usd": null,
"percent": null
}
},
"points": [
{
"time": 1787011200000,
"usd": 6923.059,
"sol": 91.06526,
"includesPositions": false,
"changePercent": null
},
{
"time": 1795132800000,
"usd": 122629.863201,
"sol": 1781.128012921,
"includesPositions": true,
"changePercent": null
},
{
"time": 1795219200000,
"usd": 122824.201652,
"sol": 1750.387522537,
"includesPositions": true,
"changePercent": 0.16
},
{
"time": 1795305600000,
"usd": 122665.81357,
"sol": 1778.432891944,
"includesPositions": true,
"changePercent": -0.13
}
]
}{
"error": "Invalid sort. Valid options are: value, amount, change24h"
}{
"error": "<string>"
}{
"error": "Wallet data is temporarily unavailable, please retry"
}El patrimonio neto de la wallet a lo largo del tiempo, en USD y SOL. Cada punto es el patrimonio neto al final de esa hora o ese día (UTC).
- El patrimonio neto se registra para las wallets consultadas con Wallet V2 y se sigue registrando durante 30 días después de la última consulta. Consultar una wallet que aún no se registra empieza a registrarla.
- Los puntos anteriores al inicio del registro cuentan solo tokens, no posiciones DeFi, y tienen
includesPositions: false. PasaincludesPositions=truepara excluirlos. changePercentes la variación respecto al punto anterior. Esnulldonde el gráfico pasa de puntos solo de tokens a puntos completos.changecompara el último punto con 24 horas y 30 días antes. La variación de 30 días necesita un rango de más de 30 días.
time en la respuesta está en milisegundos Unix; time_from y time_to están en segundos Unix.
SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getWalletChartV2('CN8w8cuh87gZYjhpaPxbD78GTrBmUKmVysqgsC9uYu9i', {
interval: '1d', // Or '1h', up to 90 days.
timeFrom: Math.floor(Date.now() / 1000) - 30 * 86400, // Unix seconds.
includesPositions: true, // Leaves out the older tokens-only points.
});
console.log(data.change['24h'].percent, data.points.at(-1)?.usd);
Parámetros de ruta
Parámetros de consulta
Respuesta
El historial de patrimonio neto de la wallet.
¿Esta página le ayudó?