SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getFirstBuyers('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
curl --request GET \
--url https://data.solanatracker.io/first-buyers/{token} \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/first-buyers/{token}"
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/first-buyers/{token}', 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/first-buyers/{token}",
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/first-buyers/{token}"
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/first-buyers/{token}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/first-buyers/{token}")
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": "AfCgPU6SbS9zzDxrSVxcLpstbzVNn8XhXfPxVjRMsTr4",
"first_buy_time": 1753343475510,
"first_buy": {
"signature": "4qkrFNuaGEFjZWb372a1wS2hoh6pUQxcPLmtYzHyxR6CyiRG8ARrx6jjE9qkHCxd9okfvECZ1vLmG5EqQXPRMAVG",
"amount": 179650.478507,
"volume_usd": 0.905910489225518,
"time": 1753343475510
},
"first_sell_time": 1753343489226,
"last_transaction_time": 1753343489231,
"held": 1616854.306563,
"sold": 1077902.871042,
"sold_usd": 7.59465035,
"holding": 0,
"realized": 2.16077741,
"unrealized": 0,
"total": 2.16077741,
"total_invested": 8.15001443,
"buy_transactions": 9,
"sell_transactions": 6,
"total_transactions": 15,
"average_buy_amount": 0.90555716,
"average_sell_amount": 1.26577506,
"current_value": 0,
"cost_basis": 0
}
]PnL
Deprecated: Get First Token Buyers
deprecated
Deprecated. Use PnL V2 instead: GET /v2/pnl/tokens/{token}/first-buyers for chronological first buyers with token PnL, wallet PnL, identity, and holding state.
Retrieves the first 100 buyers of a token (since API started recording data) with PnL data for each wallet
GET
/
first-buyers
/
{token}
SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getFirstBuyers('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
curl --request GET \
--url https://data.solanatracker.io/first-buyers/{token} \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/first-buyers/{token}"
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/first-buyers/{token}', 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/first-buyers/{token}",
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/first-buyers/{token}"
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/first-buyers/{token}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/first-buyers/{token}")
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": "AfCgPU6SbS9zzDxrSVxcLpstbzVNn8XhXfPxVjRMsTr4",
"first_buy_time": 1753343475510,
"first_buy": {
"signature": "4qkrFNuaGEFjZWb372a1wS2hoh6pUQxcPLmtYzHyxR6CyiRG8ARrx6jjE9qkHCxd9okfvECZ1vLmG5EqQXPRMAVG",
"amount": 179650.478507,
"volume_usd": 0.905910489225518,
"time": 1753343475510
},
"first_sell_time": 1753343489226,
"last_transaction_time": 1753343489231,
"held": 1616854.306563,
"sold": 1077902.871042,
"sold_usd": 7.59465035,
"holding": 0,
"realized": 2.16077741,
"unrealized": 0,
"total": 2.16077741,
"total_invested": 8.15001443,
"buy_transactions": 9,
"sell_transactions": 6,
"total_transactions": 15,
"average_buy_amount": 0.90555716,
"average_sell_amount": 1.26577506,
"current_value": 0,
"cost_basis": 0
}
]SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getFirstBuyers('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
Authorizations
API Key for authentication
Path Parameters
Response
200 - application/json
Successful response
Show child attributes
Show child attributes
Was this page helpful?
⌘I