SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPortfolioPlatformsV2();
const live = data.platforms.filter((platform) => platform.status === 'live');
console.log(live.map((platform) => platform.id));
curl --request GET \
--url https://data.solanatracker.io/v2/portfolio/platforms \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/portfolio/platforms"
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/portfolio/platforms', 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/portfolio/platforms",
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/portfolio/platforms"
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/portfolio/platforms")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/portfolio/platforms")
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{
"platforms": [
{
"id": "native-stake",
"name": "Native Stake",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fnative-stake.webp",
"website": "https://solana.com",
"services": [
{
"id": "stake",
"name": "Stake account",
"category": "staking"
}
],
"status": "live"
},
{
"id": "marinade",
"name": "Marinade",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fmarinade.webp",
"website": "https://marinade.finance/",
"services": [
{
"id": "ticket",
"name": "Marinade unstake ticket",
"category": "staking"
},
{
"id": "liquidity",
"name": "Marinade mSOL-SOL pool",
"category": "liquidity"
}
],
"status": "live"
},
{
"id": "jupiter-governance",
"name": "Jupiter Governance",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fjupiter-governance.webp",
"website": "https://vote.jup.ag/",
"services": [
{
"id": "stake",
"name": "Staked JUP",
"category": "staking"
}
],
"status": "live"
}
]
}{
"error": "<string>"
}Platforms
Plataformas DeFi de Solana cubiertas por Wallet V2
Las plataformas y servicios DeFi de Solana compatibles con la API Wallet V2, con logos, sitios web y estado.
GET
/
v2
/
portfolio
/
platforms
SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPortfolioPlatformsV2();
const live = data.platforms.filter((platform) => platform.status === 'live');
console.log(live.map((platform) => platform.id));
curl --request GET \
--url https://data.solanatracker.io/v2/portfolio/platforms \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/portfolio/platforms"
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/portfolio/platforms', 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/portfolio/platforms",
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/portfolio/platforms"
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/portfolio/platforms")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/portfolio/platforms")
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{
"platforms": [
{
"id": "native-stake",
"name": "Native Stake",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fnative-stake.webp",
"website": "https://solana.com",
"services": [
{
"id": "stake",
"name": "Stake account",
"category": "staking"
}
],
"status": "live"
},
{
"id": "marinade",
"name": "Marinade",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fmarinade.webp",
"website": "https://marinade.finance/",
"services": [
{
"id": "ticket",
"name": "Marinade unstake ticket",
"category": "staking"
},
{
"id": "liquidity",
"name": "Marinade mSOL-SOL pool",
"category": "liquidity"
}
],
"status": "live"
},
{
"id": "jupiter-governance",
"name": "Jupiter Governance",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fplatform-images.solanatracker.io%2Fjupiter-governance.webp",
"website": "https://vote.jup.ag/",
"services": [
{
"id": "stake",
"name": "Staked JUP",
"category": "staking"
}
],
"status": "live"
}
]
}{
"error": "<string>"
}Cada plataforma DeFi compatible con Wallet V2, con su logo, sitio web y servicios. Cada servicio tiene una
category: la categoría que reciben sus posiciones.
status es live cuando se devuelven las posiciones de la plataforma, y not_indexed cuando la plataforma aparece en la lista pero sus posiciones aún no se devuelven.
Usa el id de una plataforma como filtro platform en Get Wallet Positions.
SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPortfolioPlatformsV2();
const live = data.platforms.filter((platform) => platform.status === 'live');
console.log(live.map((platform) => platform.id));
¿Esta página le ayudó?