钱包 API(测试版)
获取钱包转账
分页检索Solana钱包地址的所有代币和SOL转账。
GET
/
v1
/
wallet
/
{wallet}
/
transfers
获取代币转账
curl --request GET \
--url 'https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key='import requests
url = "https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=', 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://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"signature": "5wHu1qwD7Jsj3xqWjdSEJmYr3Q5f5RjXqjqQJ7jqEj7jqEj7jqEj7jqEj7jqEj7jqE",
"timestamp": 1704067200,
"direction": "in",
"counterparty": "HXsKP7wrBWaQ8T2Vtjry3Nj3oUgwYcqq9vrHDM12G664",
"mint": "So11111111111111111111111111111111111111112",
"amount": 1.5,
"amountRaw": "1500000000",
"decimals": 9,
"symbol": "SOL"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "5wHu1qwD7Jsj3xqWjdSEJmYr3Q5f5RjXqjqQJ7jqEj7jqEj7jqEj7jqEj7jqEj7jqE"
}
}{
"error": "无效的钱包地址",
"code": 400,
"details": "'invalid-address'不是有效的Solana地址"
}{
"error": "需要API密钥。通过?api-key=xxx或X-Api-Key头传递",
"code": 401
}{
"error": "RATE_LIMIT_EXCEEDED",
"code": 429,
"details": "请求过多。请在 2 秒后重试。"
}{
"error": "INTERNAL_ERROR",
"code": 500,
"details": "发生意外错误。请重试。"
}每次请求消耗 100 点数。
请求参数
Solana 钱包地址(base58 编码)
返回的最大转账数量
上一个响应的分页游标
授权
ApiKeyQueryApiKeyHeader
作为查询参数传递的API密钥
路径参数
Solana 钱包地址(base58 编码)
Pattern:
^[1-9A-HJ-NP-Za-km-z]{32,44}$此页面对您有帮助吗?
⌘I
获取代币转账
curl --request GET \
--url 'https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key='import requests
url = "https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=', 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://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helius.xyz/v1/wallet/{wallet}/transfers?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"signature": "5wHu1qwD7Jsj3xqWjdSEJmYr3Q5f5RjXqjqQJ7jqEj7jqEj7jqEj7jqEj7jqEj7jqE",
"timestamp": 1704067200,
"direction": "in",
"counterparty": "HXsKP7wrBWaQ8T2Vtjry3Nj3oUgwYcqq9vrHDM12G664",
"mint": "So11111111111111111111111111111111111111112",
"amount": 1.5,
"amountRaw": "1500000000",
"decimals": 9,
"symbol": "SOL"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "5wHu1qwD7Jsj3xqWjdSEJmYr3Q5f5RjXqjqQJ7jqEj7jqEj7jqEj7jqEj7jqEj7jqE"
}
}{
"error": "无效的钱包地址",
"code": 400,
"details": "'invalid-address'不是有效的Solana地址"
}{
"error": "需要API密钥。通过?api-key=xxx或X-Api-Key头传递",
"code": 401
}{
"error": "RATE_LIMIT_EXCEEDED",
"code": 429,
"details": "请求过多。请在 2 秒后重试。"
}{
"error": "INTERNAL_ERROR",
"code": 500,
"details": "发生意外错误。请重试。"
}