Tokens et NFTs (DAS)
getAssetsByOwner
Récupérez tous les NFT Solana, les NFT compressés et les tokens fongibles détenus par une adresse de portefeuille spécifique avec des options de tri et de pagination
POST
/
getAssetsByOwner
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetsByOwner",
"params": {
"ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
"page": 1,
"limit": 10
}
}
'import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetsByOwner",
"params": {
"ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
"page": 1,
"limit": 10
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetsByOwner',
params: {
ownerAddress: '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
page: 1,
limit: 10
}
})
};
fetch('https://mainnet.helius-rpc.com/?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://mainnet.helius-rpc.com/?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getAssetsByOwner',
'params' => [
'ownerAddress' => '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
'page' => 1,
'limit' => 10
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByOwner\",\n \"params\": {\n \"ownerAddress\": \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n \"page\": 1,\n \"limit\": 10\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByOwner\",\n \"params\": {\n \"ownerAddress\": \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n \"page\": 1,\n \"limit\": 10\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByOwner\",\n \"params\": {\n \"ownerAddress\": \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n \"page\": 1,\n \"limit\": 10\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"last_indexed_slot": 365750752,
"total": 1,
"limit": 1,
"page": 1,
"items": [
{
"interface": "V1_NFT",
"id": "JCfTS6dmJZY4NXhjMwHqayGGHUwxp59pzcYhZrYqMBce",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://www.hi-hi.vip/json/5000wif.json",
"files": [
{
"uri": "https://img.hi-hi.vip/json/img/5000wif.png",
"cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://img.hi-hi.vip/json/img/5000wif.png",
"mime": "image/png"
}
]
},
"authorities": [
{
"address": "2iVwwSHr7hGR6wxNuQM8ArQYnX6Mzy2yeFnhBGgQetRw",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": true,
"data_hash": "7zquDVS1VKu9HDh4WS4ray5ozLThiK6xrnFNhJtusj65",
"creator_hash": "6v7GeYRiVML5mG1kJqi6eujN9sPB3ziCZJF4Vartj1qd",
"asset_hash": "8gQZkgZ1L91qkNPtsiRGkRzpNcEfhBABEQr1D3wquB8H",
"tree": "BZNn9zX1MysbSvqyGZ33Seb8bvimaiE9fxmLKwX2Euae",
"seq": 251133,
"leaf_id": 250758
},
"grouping": [
{
"group_key": "collection",
"group_value": "723Vxwr6aYZHNqc8dVQVwchDHUR3cEwZA8zkejdYWKaS"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0,
"basis_points": 0,
"primary_sale_happened": false,
"locked": false
},
"creators": [
{
"address": "GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": false,
"delegated": true,
"delegate": "GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34",
"ownership_model": "single",
"owner": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 0
},
"mutable": true,
"burnt": false
}
]
},
"id": "text"
}{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Paramètres de requête invalides."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Échec de l'authentification. Clé API manquante ou invalide."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "Vous n'avez pas la permission d'accéder à cette ressource."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "Aucun actif trouvé pour le propriétaire spécifié."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Limite de taux dépassée. Veuillez réessayer plus tard."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Une erreur inattendue s'est produite sur le serveur."
},
"id": "1"
}Autorisations
Votre clé API Helius. Vous pouvez en obtenir une gratuitement dans le tableau de bord.
Corps
application/json
La version du protocole JSON-RPC.
Options disponibles:
2.0 Un ID pour identifier la requête.
Exemple:
"1"
Le nom de la méthode DAS à invoquer.
Options disponibles:
getAssetsByOwner Paramètres pour interroger les actifs numériques Solana par adresse propriétaire avec des options de filtrage et de pagination.
- Option 1
- Option 2
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?
⌘I
getAssetsByOwner
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetsByOwner",
"params": {
"ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
"page": 1,
"limit": 10
}
}
'import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetsByOwner",
"params": {
"ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
"page": 1,
"limit": 10
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetsByOwner',
params: {
ownerAddress: '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
page: 1,
limit: 10
}
})
};
fetch('https://mainnet.helius-rpc.com/?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://mainnet.helius-rpc.com/?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getAssetsByOwner',
'params' => [
'ownerAddress' => '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
'page' => 1,
'limit' => 10
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByOwner\",\n \"params\": {\n \"ownerAddress\": \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n \"page\": 1,\n \"limit\": 10\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByOwner\",\n \"params\": {\n \"ownerAddress\": \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n \"page\": 1,\n \"limit\": 10\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByOwner\",\n \"params\": {\n \"ownerAddress\": \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n \"page\": 1,\n \"limit\": 10\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"last_indexed_slot": 365750752,
"total": 1,
"limit": 1,
"page": 1,
"items": [
{
"interface": "V1_NFT",
"id": "JCfTS6dmJZY4NXhjMwHqayGGHUwxp59pzcYhZrYqMBce",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://www.hi-hi.vip/json/5000wif.json",
"files": [
{
"uri": "https://img.hi-hi.vip/json/img/5000wif.png",
"cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://img.hi-hi.vip/json/img/5000wif.png",
"mime": "image/png"
}
]
},
"authorities": [
{
"address": "2iVwwSHr7hGR6wxNuQM8ArQYnX6Mzy2yeFnhBGgQetRw",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": true,
"data_hash": "7zquDVS1VKu9HDh4WS4ray5ozLThiK6xrnFNhJtusj65",
"creator_hash": "6v7GeYRiVML5mG1kJqi6eujN9sPB3ziCZJF4Vartj1qd",
"asset_hash": "8gQZkgZ1L91qkNPtsiRGkRzpNcEfhBABEQr1D3wquB8H",
"tree": "BZNn9zX1MysbSvqyGZ33Seb8bvimaiE9fxmLKwX2Euae",
"seq": 251133,
"leaf_id": 250758
},
"grouping": [
{
"group_key": "collection",
"group_value": "723Vxwr6aYZHNqc8dVQVwchDHUR3cEwZA8zkejdYWKaS"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0,
"basis_points": 0,
"primary_sale_happened": false,
"locked": false
},
"creators": [
{
"address": "GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": false,
"delegated": true,
"delegate": "GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34",
"ownership_model": "single",
"owner": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 0
},
"mutable": true,
"burnt": false
}
]
},
"id": "text"
}{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Paramètres de requête invalides."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Échec de l'authentification. Clé API manquante ou invalide."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "Vous n'avez pas la permission d'accéder à cette ressource."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "Aucun actif trouvé pour le propriétaire spécifié."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Limite de taux dépassée. Veuillez réessayer plus tard."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Une erreur inattendue s'est produite sur le serveur."
},
"id": "1"
}